Jump to content

Problem with displaying results from a sql query.


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.