Re: php guru help please



It appears as if those marks indicate a transaction block of some sort,
although I can't find any reference to it anywhere on php.net
And, never having seen them used in php before, I would say that the
error is truly a "syntax error" ...

but why not something like this -
if ($del == "Yes")
{
?>
<p> User <? echo $fname . ' ' . $lname ?> with user name $uname has
been deleted</p>
<br>
<br>
<a href="./userlist.php">Back to User List</a>
<?
echo $yes;
}

On Fri, 2006-12-22 at 21:13 -0500, Qiuli Han wrote:
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();

?>


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: php guru help please
    ... there should not have any space BEFORE "QEW;" ... I guess i cant really do it in php then ... > error is truly a "syntax error" ... ... > echo $yes; ...
    (Ubuntu)
  • Re: php guru help please
    ... And, never having seen them used in php before, I would say that the ... error is truly a "syntax error" ... ... > here is my stupid code ... > echo $id; ...
    (Ubuntu)
  • php guru help please
    ... i know this is not right place to ask, but i am running LAMP on an ubuntu ... so i have some code here in php gives me problem: ... echo $yes; ... You cancelled deleting user $fname $lname with User name ...
    (Ubuntu)
  • Re: php error
    ... echo "connection established"; ... Parse error: syntax error, unexpected T_VARIABLE in ... // I am using apache webserver 2.0 and php version 4.0 thankyou very ...
    (comp.lang.php)
  • NOCC Webmail <= 1.0 multiple vulnerabilities
    ... "NOCC is a webmail client written in PHP. ... remote code execution, there are two ways of execute arbitrary code on ... is defined in conf.php, by default no path is defined, but script suggests ... echo nl2br); ...
    (Bugtraq)