justsomeguy Posted July 14, 2007 Share Posted July 14, 2007 If you have a variable in the querystring like this:page.php?id=123You can read that value in $_GET['id'].A null value is a special value which indicates that the field does not have any value. A field would be null if you insert a row but leave out one of the fields, that field would have a null value. Link to comment Share on other sites More sharing options...
kanala Posted July 14, 2007 Author Share Posted July 14, 2007 If you have a variable in the querystring like this:page.php?id=123You can read that value in $_GET['id'].A null value is a special value which indicates that the field does not have any value. A field would be null if you insert a row but leave out one of the fields, that field would have a null value.Since my last post I have learnt so much about PHP and MySQL, thanks to justsomeguy's encouragement. I'v nearly finished the product page and nearly on the search box which looks easy. I'll get back to you when I'm done.Cheers mate Link to comment Share on other sites More sharing options...
kanala Posted August 3, 2007 Author Share Posted August 3, 2007 Ok it all works, but the results only show in rows. How do I make it so that the results show 4 columns of results and then some rows of 4 columns?e.g. <tr><td>echo some results here</td><td>echo some results here</td><td>echo some results here</td><td>echo some results here</td></tr>////next row<tr><td>echo some results here</td><td>echo some results here</td><td>echo some results here</td><td>echo some results here</td></tr>and so on... Link to comment Share on other sites More sharing options...
Synook Posted August 3, 2007 Share Posted August 3, 2007 echo "<table>\n";$column = 1;while($row = mysql_fetch_array($result)) { if ($column == 1) { echo "<tr>\n"; } echo "<td>" . $row['Item No.'] . " " . $row['Genre'] . "</td>\n"; if ($column == 4) { echo "</tr>\n"; $column = 1; } $column++;} Try that Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.