Jump to content

Please help me - whats wrong with this code????


wispas

Recommended Posts

I got this code off a tutorial - copy and paste. look what it gives me. Please help me and tell me whats wrong.

 

<?

// Connect database

include("connectdb.php");

 

// Get all records in all columns from table and put it in $result.

$result=mysql_query("select * from phonebook");

 

/*Split records in $result by table rows and put them in $row.

Make it looping by while statement. */

while($row=mysql_fetch_assoc($result)){

 

// Output

echo "ID : $row['id'] <br/>";

echo "Name : $row['name'] <br/>";

echo "Email : $row['email'] <br/>";

echo "Tel : $row['tel'] <hr>";

}

 

mysql_close();

?>

 

Error Message:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /homepages/44/d195205520/htdocs/freezer/select.php on line 13

 

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.