/    Sign up×
Community /Pin to ProfileBookmark

Parse problem

hello, im new to PHP and this may be a problem solved easy, but im still not sure about waht im doing but are working on a code and the one bellow give me a parse error, anyone know why?

Parse error: parse error, unexpected T_STRING, expecting ‘,’ or ‘;’

[CODE]
<tr><td>Forum Hotlink:</td><td><input type=”text” name=”thetext” onClick=’highlight(this);’ size=”60″ value=”[URL=<? echo ‘http://’ .$domain .’][IMG]<? echo ‘http://’ .$domain.’/’.$tpath.$imgf; ?>[/IMG][/URL]”></td></tr>[/CODE]

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMay 18.2007 — Note, for forward compatibility and compatibility with servers that do not have short PHP tags enabled, you should always use [b]<?php[/b] instead of [b]<?[/b]. Other than that, I see no syntax errors and the code parses fine on my PC. The problem may actually be something in an earlier line that is only revealing itself on this line.

Also, if you use the [code=php] tag instead of the [code] tag around your code samples here, they'll will display a bit more nicely with color-coded syntax highlighting.
Copy linkTweet thisAlerts:
@izlikauthorMay 18.2007 — ow, im very very sorry, i posted you the totaly wrong code. this one bellow is the right one im having a problem with.


[code=php]<tr><td>Forum Hotlink:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60" value="[URL=<? echo 'http://' .$domain .'][IMG]<? echo 'http://' .$domain.'/'.$tpath.$imgf; ?>[/IMG][/URL]"></td></tr>[/code]
Copy linkTweet thisAlerts:
@NogDogMay 18.2007 — You do not close the first "<?" before the second "<?" starts.
Copy linkTweet thisAlerts:
@izlikauthorMay 19.2007 — hey again, i closed it now and still get the same parse error ?
[code=php]
<tr><td>Forum Hotlink:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60"
value="[URL=<? echo 'http://' .$domain .'][IMG]?><? echo 'http://' .$domain.'/'.$tpath.$imgf;
?>[/IMG][/URL]"></td></tr>[/code]
Copy linkTweet thisAlerts:
@NogDogMay 19.2007 — [code=php]
<tr><td>Forum Hotlink:</td><td><input type="text" name="thetext"
onClick='highlight(this);' size="60"
value="[url=http://<?php echo $domain;?>][IMG]http://<?php echo $domain.'/'.$tpath.$imgf;?>[/IMG][/url]">
</td></tr>
[/code]
×

Success!

Help @izlik spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...