Jump to content

Problem with displaying results from a sql query.


croz27

Recommended Posts

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

<?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'];
  }
?>

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.

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 :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.