Looks good to me, but as Peter said, see if you really are getting something in ['img'] try print_r($row) or var_dump($row) to make sure
-----Original Message----- From: Bruce Levick [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 10:01 AM To: Martin Towell Subject: RE: [PHP] select * From ???? Here is the display code that I started with. <?php // Request the text From Illustrations table $result = mysql_query( "SELECT * FROM Illustrations"); if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit(); } // Display the text of each joke in a paragraph while ( $row = mysql_fetch_array($result) ) { print"<td><tr>$row[titletext]<br></td></tr>"; print"<td><tr>$row[img]<br></td></tr>"; } ?> Not sure why it only displays just the titletext. -----Original Message----- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 8:47 AM To: Bruce Levick; [EMAIL PROTECTED] Subject: RE: [PHP] select * From ???? can you post some more of your code? I think, if it's not too big, the entire while loops Martin -----Original Message----- From: Bruce Levick [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 9:45 AM To: [EMAIL PROTECTED] Subject: [PHP] select * From ???? Hi, Am just a newbie at this and was going great until I have hit this smell snag. I am connecting to mysql and all works well there. I query a table "Illustrations" ($query = "SELECT * FROM Illustrations";), and want to print the values of two columns ("titletext" & "img")within each row as the request loops. Print "<td><tr>$row[titletext]<br></td></tr>"; Print "<td><tr>$row[img]<br></td></tr>"; The code inplace seems all ok, but for some reason I am only being returned the value of "titletext" and not also the value of "img". Am I to be setting a new value for returning the info within "img"?? (eg $row2). I am sorry if this is hard to understand and also a silly Q, I am two days into learning this stuff. All I want to do is to return these two values from within the table. "titletext" and "img". They are both text fields. Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php