Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
parse error, unexpected T_STRING
Old 08-12-2007, 04:47 PM parse error, unexpected T_STRING
Experienced Talker

Posts: 37
Trades: 0
I Have been going crazy over this simple problem...I just can't figure it out!!

Somone wanna take a shot at it?

i have a parse error, unexpected T_STRING in line 129 :


$fontString http://<input type='text' width='15' name='image' value=\"$image\"> $fontString<a href='http://$image' target='blank'>Click To Preview</a>



can anyone tell me whats wrong in there?
vanhell06 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-12-2007, 04:51 PM Re: parse error, unexpected T_STRING
Average Talker

Posts: 22
Trades: 0
Sorry I'm a bit confused with that snippet of code :P
Can you post the surrounding code as well?
I don't understand why there is $fontString http:// at the beginning
__________________

Please login or register to view this content. Registration is FREE

web apps, video tutorials, resources
deltawing1 is offline
Reply With Quote
View Public Profile
 
Old 08-12-2007, 05:01 PM Re: parse error, unexpected T_STRING
Experienced Talker

Posts: 37
Trades: 0
im trying to make this in my site man look this pic:
http://i61.photobucket.com/albums/h44/Vanhell06/MIo.jpg

here the whole code:

<tr><td width=50% bgcolor=$tableColor>

$fontString

Personal Image:

</td><td width=50% bgcolor=$tableColor>

$fontString http://<input type='text' width='15' name='image' value=\"$image\"> $fontString<a href='http://$image' target='blank'>Click To Preview</a>

</td></tr>
<tr><td width=50% bgcolor=$tableColor>

$fontString

Sizes:

</td><td width=50% bgcolor=$tableColor>
$fontString
Width:<input type='text' width='5' name='width' value=\"$width\" size='3'> Height:<input type='text' width='5' name='height' value=\"$height\" size='3'></td></tr>
<tr><td bgcolor=$tableColor colspan=2>
<tr><td width=50% bgcolor=$tableColor>

$fontString

Personal Image Preview:

</td><td width=50% bgcolor=$tableColor>");
if($image == NULL) echo("
$fontString Image Preview cannot Be shown beause you have no link currently typed in.");
else echo("
<img src='http://$image' width='$width' height='$height'></img>");
echo("
</td></tr><br>

thanks for helping me dude.
vanhell06 is offline
Reply With Quote
View Public Profile
 
Old 08-12-2007, 05:28 PM Re: parse error, unexpected T_STRING
Experienced Talker

Posts: 34
Name: Dan
Trades: 0
unexpected T_STRING generally means that it's found text that's not normal code outside of " " quotes or ()'s. The code you've shown us I can't see anything wrong with it. But not having the entire code in front of me, it's hard to tell.
What I will ask though, I presume the line in error is the one under "Personal Image" in your example. Are you echoing this, or outputting by closing and re-opening <?php ?> tags? Might be worth just checking all your quoting, and that you've escaped everything you need to around that area.
It's also worth noting, and that to minimize the risk of getting these sorts of errors when you're outputting a lot of HTML in a PHP script to output all your HTML outside <?php ?> tags, and use <?=$var_name?> to put in variable names. This method allows you to use as many quotes, brackets, and the likes, without it upsetting PHP. Using echo(".."); might be good for outputting just things like single variables, words, etc, but for large amount of content, try close the PHP tag, put your content in, and open the tag again to close your if statement or whatever you have.

Hope this helps.
__________________

Please login or register to view this content. Registration is FREE

1Gb hosting from as little as £1.49/€2.20/$3 /month - No kidding!
danneh3826 is offline
Reply With Quote
View Public Profile Visit danneh3826's homepage!
 
Reply     « Reply to parse error, unexpected T_STRING
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





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



Page generated in 0.20926 seconds with 12 queries