php guru help please
Qiuli Han
ivyharry at gmail.com
Sat Dec 23 02:13:12 UTC 2006
Hi php, sorry, ubuntu:
i know this is not right place to ask, but i am running LAMP on an ubuntu
6.01
so i have some code here in php gives me problem:
*Parse error*: syntax error, unexpected $end in *
/srv/www/htdocs/php/store/userdelGO.php* on line *68
*well
from experience i know it must be =<<< caused the problem
since if i comment out those 2 =<<< in my if statements it wont have any
problem
then i try to fix that =<<< problem
but no matter what i do it just.....u know....same error
here is my stupid code
open.php is the file i use to open the mysql connection
please help
thanks
<?php
$id=$_REQUEST['id'];
$del=$_REQUEST['del'];
echo $id;
include "open.php";
$query="select user_name, fname, lname from user where id=$id";
$run=mysql_query($query) or die (mysql_error());
$row = mysql_fetch_array($run,MYSQL_ASSOC);
$uname=$row['user_name'];
$fname=$row['fname'];
$lname=$row['lname'];
if ($del == "Yes") {
//echo "yes";
//mysql_query(delete from user where id=$id);
$yes=<<<QEW
<html>
<title>Confirmation</title>
<body>
<p> User $fname $lname with user name $uname has been deleted</p>
<br>
<br>
<a href="./userlist.php">Back to User List</a>
</body>
</html>
QEW;
echo $yes;
}
if ($del == "No") {
echo "no";
/*
$no=<<<EOD
<html>
<title>Confirmation</title>
<body>
<p> You cancelled deleting user $fname $lname with User name
$uname</p>
<br>
<p> User $fname stays in the database</p>
<br>
<a href="./userlist.php">Back to User List</a>
</body>
</html>
EOD;
echo $no;
*/
}
mysql_close();
?>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061222/633e13a8/attachment.html>
More information about the ubuntu-users
mailing list