![]() | |||||||
Show certain tutorials. Hi, I have a tutorial site here at www.x6core.com, and people submit tutorials, how would i make it so when the submit the choose a catorogry for the tutorial? I think on say the photoshop page the code could be something like this, but im not sure. Can someone help please? P.S All the records are in a mysql database. Code:
Im not sure how to show all records that meet criteria. |
We need to know more ... When the tutorials are posted you you can decide for a category ? If yes then you can select them. If not the single posibility is to look in title after "category" like "photoshop". Your tutorials are in sql database or are simple text files on harddrive ? Regards Adrian |
My tutorials are all stored in a mysql database and i want it so when people submit them they can choose the catogoru. |
do you have a pre-defined list if you sign up to http://aysha.hostmatrix.org/ and see the form for submitting a tutorial should show you a good example. |
Your site support adding categorys ? otherwise you need to change your database and all ... Regards |
I know i will change the database and everything but i want the predifined list then a page that shows all the ones in which the catogory is photoshop. |
OK first what is ur pre-defined list |
umm not quite getting wht your saying? try: PHP Code: PHP Code: |
Is more easy in this way ... PHP Code: if you trto doit with if's you will need to add a if for each category added Regards |
^^ what goes in the orange area? |
that is a comment |
right, i like the way this one is made and i want to use it: Code:
I dont know how to intergrate it with this: Code:
I think it should be: Code:
Is this correct?? |
i think what you want to do is SELECT * FROM tutorials WHERE cat = 'photoshop' then loop through the results. |
Thanks, ive done a copy with my code and get this error: Code:
In Code:
|
you're missing the closing } for the while($row = mysql_fetch_array... statement. generally when you get an error like that on the last line that's what it is. |
I have done this and its has worked the WHERE cat=photoshop. Where can i put a statement if there is no tutorials?? |
also now what has happened is that it wont display the site and tutorial name, check here: http://www.x6core.com/?id=photoshoptutorials But all i have changed is the where cat = photoshop, if you want to see my code its here: Code:
|
can anyone help me please? |
after you run the mySQL query add this: PHP Code: i'm not sure if this is what you're looking for or not. hope it helps. |
Fixed thanks everyone. |
| All times are GMT -7. The time now is 01:53 PM. |
Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0