Reply
unexpected t_constant_encapsed_string error
Old 05-10-2006, 01:00 PM unexpected t_constant_encapsed_string error
Junior Talker

Posts: 3
I have this:
Parse error:syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
on line 56 and i don't know how to fix it as i can't see anything that is obviously wrong. I know i'm probably overlooking something incredibly simple but i wondered if you could help me. Here is the code. Edit:The line numbers are next to the lines.
PHP Code:
1<html>
2<head>
3<title>
4<?php
5
if(!isset($_COOKIE['User_Buggy']))
6{
7print("You Have Not Logged In");
8}
9else
10{
11$user=$_COOKIE['User_Buggy'];
12print("Welcome $user");
13}
14php?>
15</title>
16</head>
17<body>
18<?php
19
if(!isset($_COOKIE['User_Buggy']))
20{
21print("You Have Not Logged In");
22print("<br> Login <a href=\"http://www.thebuggychatroom.info/login.html\">here</a>");
23die(" ");
24}
25$user=$_COOKIE['User_Buggy'];
26$username="username";
27$pass="password";
28mysql_connect("localhost",$username,$pass) or die("Cannot connect to database");
29mysql_select_db("database") or die("Cannot select database");
30$query="SELECT *FROM accounts";
31$result=mysql_query($query);
32$num=mysql_numrows($result);
33$i=0;
34while($i<$num)
35{
36$ch_uname=mysql_result($result,$i,"username");
37if(ch_uname==$user)
38{
39$email=mysql_result($result,$i,"email");
40$avatar=mysql_result($result,$i,"avatar");
41$validate=mysql_result($result,$i,"validate");
42$c=1;
43$d=0;
44if($validate==$c)
45{
46print("Welcome $user");
47print("<br> Your avatar is <img src=\"http://$avatar\" width=\"300\" height=\"300\"><br>");
48print("<a href=\"http://www.thebuggychatroom.info\">[Home-</a>");
49print("<a href=\"http://articles.thebuggychatroom.info\">Articles-</a>");
50print("<a href=\"http://www.thebuggychatroom.info/logout.php\">Logout]</a>
51mysql_close();
52die(" ");
53}
54else
55{
56print("
You need to validate your account");
57print("
<br>");
58print("
<form action="vemail.php\" method=\"post\"><input typ=\"hidden\" 59name=\"email\"value=\"$email\"><input type=\"Submit\" value=\"Resend Validation 60Email\"></form>");
61mysql_close();
62die(" ");
63}
64$i++;
65}
66mysql_close();
67die("Your account may have been deleted and no longer exists on the database");
68php?>
69</body>
70</html>
Thank you for your help and thank you for taking some of your precious time to help me.

Last edited by Jabus10 : 05-10-2006 at 04:12 PM.
Jabus10 is offline
Reply With Quote
View Public Profile Visit Jabus10's homepage!
 
When You Register, These Ads Go Away!
Old 05-10-2006, 01:47 PM Re: unexpected t_constant_encapsed_string error
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
Converting Video For YouTube
Posts: 2,339
Name: Keith Marshall
Location: West Hartford, CT
Can you number the lines as it is in you script?
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 05-12-2006, 06:05 PM Re: unexpected t_constant_encapsed_string error
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
Converting Video For YouTube
Posts: 2,339
Name: Keith Marshall
Location: West Hartford, CT
Look at line 58 - You forgot to escape a double quote at <form action="...

__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to unexpected t_constant_encapsed_string error
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11620 seconds with 12 queries