php guru help please
Qiuli Han
ivyharry at gmail.com
Sat Dec 23 03:16:55 UTC 2006
I think i know where the problem is now!
there should not have any space BEFORE "QEW;"
>_<
i just want it looks better
Qiuli
On 12/22/06, Qiuli Han <ivyharry at gmail.com> wrote:
>
> Thanks John
> Actually I just did what u said before I get your reply
> the reason why did that was because i thought it is easier to debug
> and on the other hand i used to work with Perl which i used print qq~
> everywhere to print about a website
> so i assumed that it will work the same way as =<<<
>
> I guess i cant really do it in php then
> Thanks!
>
> Qiuli
>
> On 12/22/06, John Dangler <jdangler at atlantic.net> wrote:
> >
> > 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 at lists.ubuntu.com
> > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061222/46f6e6d9/attachment.html>
More information about the ubuntu-users
mailing list