Jump to content

sql update script parse error


Recommended Posts

Hi, i got a sql update script that gives me errors . i show the code and the error below.

I would aprreciate some help with this.

 

                                                              / Thanks Lisa

 

 

select.php  error

 

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on line 13

 

<?

// 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>";

 

// Add a link with a parameter(id) and it's value.

echo '<a href="update.php?id='.$row['id'].'">Update</a>';

 

}

 

mysql_close();

?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/162220-sql-update-script-parse-error/
Share on other sites

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.