xcoderx Posted April 27, 2010 Share Posted April 27, 2010 ok i created the sql create table categories ( cat_id int(10) not null primary key auto_increment, cat_name varchar(255) not null); create table subcategories ( subca_id int(10) not null primary key auto_increment, subcat_url varchar(255) not null, subcat_image_url varchar(255) not null, cat_id int(10) not null); now how do i make a form to enter entries into category and subcategory? i want to display it like this category1 name: 1. subcat url subcat image 2. subcat url subcat image category2 name: 1. subcat url subcat image 2. subcat url subcat image help out someone. Link to comment https://forums.phpfreaks.com/topic/199903-how-to-display-category-results-and-enter-with-form/ Share on other sites More sharing options...
xcoderx Posted April 27, 2010 Author Share Posted April 27, 2010 something like this? <?php error_reporting(0); if(! $conn=mysql_connect("localhost", "root", "demo")) die("Could't connect to database server.."); mysql_select_db("cats",$conn) or die(mysql_error()); $result = "select * from categories, subcategories where categories.cat_id = subcategories.cat_id"; echo "<table border='1'>"; while($row = mysql_fetch_array( $result )) { but now im not sure how to go on Link to comment https://forums.phpfreaks.com/topic/199903-how-to-display-category-results-and-enter-with-form/#findComment-1049244 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.