justAnoob Posted December 5, 2009 Share Posted December 5, 2009 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 More sharing options...
rajivgonsalves Posted December 5, 2009 Share Posted December 5, 2009 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 More sharing options...
justAnoob Posted December 5, 2009 Author Share Posted December 5, 2009 thank you, just escaped them, I'm still new to PHP, and I keep forgetting about that. Thanks again. Link to comment https://forums.phpfreaks.com/topic/184107-syntax-help/#findComment-971999 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.