croz27 Posted March 20, 2008 Share Posted March 20, 2008 Hi, Im having problems displaying the results of this sql query in my php page... heres what i have so far.. $sqlreviews = mysql_query("SELECT reviewText, reviewDate FROM nbc_bookreview WHERE bookISBN='".$_GET['bookISBN']."' ORDER BY reviewDate"); while($row = mysql_fetch_array($sqlreviews)) { echo $sqlreviews; ... I dont get any errors it just pops up resourceID etc' so im convinced it works, just displaying it wrong maybe? any ideas? merci Link to comment https://forums.phpfreaks.com/topic/97125-problem-with-displaying-results-from-a-sql-query/ Share on other sites More sharing options...
rhodesa Posted March 20, 2008 Share Posted March 20, 2008 <?php $sqlreviews = mysql_query("SELECT reviewText, reviewDate FROM nbc_bookreview WHERE bookISBN='".$_GET['bookISBN']."' ORDER BY reviewDate"); while($row = mysql_fetch_array($sqlreviews)) { print $row['reviewText']; print $row['reviewDate']; } ?> Link to comment https://forums.phpfreaks.com/topic/97125-problem-with-displaying-results-from-a-sql-query/#findComment-496991 Share on other sites More sharing options...
croz27 Posted March 20, 2008 Author Share Posted March 20, 2008 sometimes when you have been looking at code all day you miss the easiest mistakes like echo'ing your results. ) Link to comment https://forums.phpfreaks.com/topic/97125-problem-with-displaying-results-from-a-sql-query/#findComment-497181 Share on other sites More sharing options...
croz27 Posted March 20, 2008 Author Share Posted March 20, 2008 I have another problem if you are still about with your expertise... my form action is... echo "<form action=\"hello.php?helloNUM=<?php echo $_REQUEST['helloNUM'];?>\" method=\"get\""; this directs it back to the original hello.php page displaying the category in which helloNUM has been selected however how would i echo the text inputted into my form and refresh the hello.php once the submission button has been hit? many thanks. Link to comment https://forums.phpfreaks.com/topic/97125-problem-with-displaying-results-from-a-sql-query/#findComment-497182 Share on other sites More sharing options...
croz27 Posted March 21, 2008 Author Share Posted March 21, 2008 i have my code commented just not sure how to write it at this point, any examples? IF (there is text within the form field) UPDATE record and refresh hello.php ELSE return back to hello.php if there is no text and the submit button is pressed.. would appreciate any comments, seem to have hit a wall with this database drive site Link to comment https://forums.phpfreaks.com/topic/97125-problem-with-displaying-results-from-a-sql-query/#findComment-497241 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.