shoutdots Posted August 15, 2007 Share Posted August 15, 2007 Hello anyone know a simple tutorial for creating categories please post here. thank you Quote Link to comment Share on other sites More sharing options...
php_tom Posted August 15, 2007 Share Posted August 15, 2007 um, what kind of categories? Quote Link to comment Share on other sites More sharing options...
shoutdots Posted August 15, 2007 Author Share Posted August 15, 2007 i mean how to create main categories and sub categories for them, how to list all of them in a combo box etc Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted August 15, 2007 Share Posted August 15, 2007 um, what kind of categories? Quote Link to comment Share on other sites More sharing options...
MadTechie Posted August 15, 2007 Share Posted August 15, 2007 seams like a HTML question.. unless you mean dynamic drop downs see the ajax section Quote Link to comment Share on other sites More sharing options...
shoutdots Posted August 15, 2007 Author Share Posted August 15, 2007 its not an HTML question here is the tell : i need to make a directory , this directory needs categories for sure like ARTS , Computer and internet , business, this categories may need sub categories like web development > php programming . HOW TO MAKE THIS IN PHP ? i need to insert these categories in a mysql tables ... etc so any one can give me a tutorial for this cos i searched phpfreaks many times and google search without finding it . thanks Quote Link to comment Share on other sites More sharing options...
MadTechie Posted August 15, 2007 Share Posted August 15, 2007 seams like a HTML question.. unless you mean dynamic drop downs ------------> see the ajax section <------------------ Quote Link to comment Share on other sites More sharing options...
shoutdots Posted August 15, 2007 Author Share Posted August 15, 2007 !!! MadTechie THIS IS THE SECONDE TIME TO TELL YOU THIS IS NOT A HTML, AJAX QUESTION !!!!! look, i will give you a code i found it on the net to know what i exactly mean ! <? include("config.php"); echo"<form action=add_child_cat1.php method=post>"; echo"sub category : <input type=text name=child_cat_name>"; echo"<br>"; // here we will put the main categories in a combo box echo"<select name=cat_id>"; $sql = mysql_query("SELECT * FROM cat"); $num = mysql_num_rows($sql); for($i=1;$i<=$num;$i++) { $row = mysql_fetch_array($sql); $cat_id = $row[cat_id]; $cat_name = $row[name]; echo"<option value=$cat_id>$cat_name</option>"; } echo"</select>"; echo"<br>"; echo"<input type=submit value=submit>"; echo"</form>"; ?> did you know what i need now ? , i need to understand the code by a tutorial with explaining . Quote Link to comment Share on other sites More sharing options...
trq Posted August 15, 2007 Share Posted August 15, 2007 This tutorial may help you out. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted August 15, 2007 Share Posted August 15, 2007 ok that code will list names in a drop down box so do you want another drop down box that will be populated depending on the selection of the first one ? Quote Link to comment Share on other sites More sharing options...
shoutdots Posted August 15, 2007 Author Share Posted August 15, 2007 never mind , thanks for trying to help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.