Current location: Hot Scripts Forums » Programming Languages » PHP » Please Help - Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

Please Help - Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

Reply
  #1 (permalink)  
Old 06-07-09, 07:17 PM
JordanM JordanM is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Please Help - Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

Hi,
Hope this is the right place to post this! , If not im sorry!
Im having the error :

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/fhlinux134/c/classifiedswindow.co.uk/user/htdocs/index.php on line 55

This effecting code is:

Code:
<form action='index.php' method='POST'>
I cannot see a problem.

Anyone got any ideas?

Thankyou ,
Jordan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-07-09, 08:14 PM
mdhall's Avatar
mdhall mdhall is offline
Aspiring Coder
 
Join Date: Oct 2003
Posts: 502
Thanks: 0
Thanked 0 Times in 0 Posts
Also show lines before and after this one, that often helps to narrow it down .... you may want to try changing the single quotes to double quotes.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 06-08-09, 05:45 AM
JordanM JordanM is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Problem still persisting

Hi There,
I have changed to double quotes however the same problem remains.
Here is a selection of code above and below (Not all but a fair amount)

Code:
//show data to user.

echo"

<table>
	<tr>
			<td>
			Info about the user who has posted.
			</td>
	</tr>
	<tr> 
			<td>
			Message
			</td>
	</tr>	
	
</table>

} 


//Horizontal Line
echo <hr>

//Form

echo "

<form action="index.php" method="POST">
<table width='100%'>
	<tr>
		<td width='18%'>
		Your Full Name:
		</td>
		<td>
		<input type='text' name='text' maxlength='35'>
		</td>
	</tr>
	<tr>
		<td>
		Your Email:
		</td>
		<td>
		<input type='text' name='email' maxlength='50'>
		</td>
	</tr>	
	<tr>
Thankyou,
Jordan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 06-08-09, 05:55 AM
mdhall's Avatar
mdhall mdhall is offline
Aspiring Coder
 
Join Date: Oct 2003
Posts: 502
Thanks: 0
Thanked 0 Times in 0 Posts
You have a few things out of whack ....

PHP Code:
//show data to user.

echo "
<table>
    <tr>
    <td>
    Info about the user who has posted.
    </td>
    </tr>
    <tr> 
    <td>
    Message
    </td>
    </tr>    
</table>"
;




//Horizontal Line
echo "<hr>";

//Form

echo "
<form action=\"index.php\" method=\"POST\">
<table width=\"100%\">
    <tr>
        <td width=\"18%\">
        Your Full Name:
        </td>
        <td>
        <input type=\"text\" name=\"text\" maxlength=\"35\">
        </td>
    </tr>
    <tr>
        <td>
        Your Email:
        </td>
        <td>
        <input type=\"text\" name=\"email\" maxlength=\"50\">
        </td>
    </tr>    
    <tr> 
Escape your quotation marks, and make sure your echo tags are closed as well.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 06-08-09, 06:03 AM
JordanM JordanM is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thankyou,

Hi There,

Changed the code and things like you suggested and now its working fine again
Thankyou Very Much

Jordan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 06-08-09, 04:30 PM
JordanM JordanM is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Another Problem.

Hey , Got another problem now after a bit more coding.

Im getting the error:

Parse error: syntax error, unexpected '/' in /home/fhlinux134/c/classifiedswindow.co.uk/user/htdocs/index.php on line 102

A bit of my code above this is:
Code:
<form action=\"index.php\" method=\"POST\">
<table width=\"100%\">
    <tr>
        <td width=\"18%\">
        Your Full Name:
        </td>
        <td>
        <input type=\"text\" name=\"text\" maxlength=\"35\">
        </td>
    </tr>
    <tr>
        <td>
        Your Email:
        </td>
        <td>
        <input type=\"text\" name=\"email\" maxlength=\"50\">
        </td>
    </tr>    
	   <tr>
        <td  valign='top'>
        Your Advert:
        </td>
        <td>
        <textarea cols='20' rows='2' name='message' maxlength='300'></textarea>
        <p>
		<input type='submit' name='submit' value='Post'>
		</td>
    </tr> "  
</table>
</form>
It seems the error is coming from
Code:
</table>
(Which is line 102)

Any Idea's on this?

Thankyou, Jordan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 06-08-09, 04:37 PM
mdhall's Avatar
mdhall mdhall is offline
Aspiring Coder
 
Join Date: Oct 2003
Posts: 502
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

        
</td>
    </
tr>  
</
table>
</
form>"; 
Actually, you can get by without the echo's and escapes and just use HTML if you want, as long as you go back into PHP when needed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 06-08-09, 04:52 PM
JordanM JordanM is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Hey there , thanks for your reply.
I've done that exactly as you stated but now its saying:
Parse error: syntax error, unexpected $end in /home/fhlinux134/c/classifiedswindow.co.uk/user/htdocs/index.php on line 105

which is ?>

Any Ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 06-08-09, 06:27 PM
Jcbones Jcbones is offline
Aspiring Coder
 
Join Date: Mar 2009
Location: North Carolina, USA
Posts: 414
Thanks: 4
Thanked 27 Times in 26 Posts
that means you have missed a bracket somewhere } somewhere, make sure you have matching opening brackets { and closing brackets }.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #10 (permalink)  
Old 06-08-09, 07:52 PM
JordanM JordanM is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Thankyou!

All Sorted!
Cheers
Thanks guys for yourself, I appreciate it

Jordan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
desoerate for help!!! Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting '] JavierVT PHP 7 09-07-08 08:31 PM
PHP Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRIN aprogrammer PHP 19 07-27-08 10:02 AM
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' Dr. Forensics PHP 3 07-15-06 03:54 PM
parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting '}' unlisted80 PHP 8 07-05-06 04:28 PM
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' HELP stormshadow PHP 2 06-27-06 09:27 AM


All times are GMT -5. The time now is 10:33 PM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.