Jump to content

syntax help


justAnoob

Recommended Posts

i'm stumped.

 

<?php
echo '
<input type="text" name="username" value="Username" class="grey" size="15" onFocus="if(this.value==this.defaultValue) {this.value=''; this.className='black';}" onBlur="if(this.value=='') {this.value = this.defaultValue; this.className='grey';}" />

<input type="text" name="ptext" value="Password" size="15" class="grey" onClick="hidepass(this);"><input type="password" name="password" value="" size="15" class="black" style="display:none" onFocus="setEnd(this);" onBlur="if (this.value=='') {showpass(this);}">
';
?>

Link to comment
https://forums.phpfreaks.com/topic/184107-syntax-help/
Share on other sites

you got some single quotes in your string either escape them using "\" or use a heredoc string

<?php
echo <<< EOS
<input type="text" name="username" value="Username" class="grey" size="15" onFocus="if(this.value==this.defaultValue) {this.value=''; this.className='black';}" onBlur="if(this.value=='') {this.value = this.defaultValue; this.className='grey';}" />

<input type="text" name="ptext" value="Password" size="15" class="grey" onClick="hidepass(this);"><input type="password" name="password" value="" size="15" class="black" style="display:none" onFocus="setEnd(this);" onBlur="if (this.value=='') {showpass(this);}">
EOS;
?>

Link to comment
https://forums.phpfreaks.com/topic/184107-syntax-help/#findComment-971993
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.