/    Sign up×
Community /Pin to ProfileBookmark

how to ECHO statement with periods

Hi,

I have the following HTML code which seems to work fine:

<input type=”button” name=”goNow” value=”Lets Go” onClick=”parent.location=’Regular.html'” />

I am now developing PHP code that would ECHO the above as in

echo ‘<input type=”button” name=”goNow” value=”Lets Go” onClick=”parent.location=’Regular.html'” />’;

That is, I placed the entire line between single codes and start the statement with echo. It is not working and I suspect it’s because of the periods (.) which are concatenation operators; may be I’m wrong and it’s something else. Would someone provide me with directions on how to write the echo statement to produce the HTML line.

Thanks

DL

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMay 29.2008 — The problem is that you have un-escaped single quotes within a single-quoted string.
[code=php]
echo '<input type="button" name="goNow" value="Lets Go" onClick="parent.location='Regular.html'" />';
[/code]
Copy linkTweet thisAlerts:
@datalineauthorMay 30.2008 — Thanks NogDog!

DL
×

Success!

Help @dataline 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.15,
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,
)...