Code: Select all
<?php echo '<input class="x"
onfocus="HideContent("btn")"
name="username"
type="text"
id="username"
value= ' . $user . ' >';
?>
$user has been defined.
HideContent is already defined.
Moderator: General Moderators
Code: Select all
<?php echo '<input class="x"
onfocus="HideContent("btn")"
name="username"
type="text"
id="username"
value= ' . $user . ' >';
?>
Code: Select all
<?php
echo "<input class=\"x\"
onfocus=\"HideContent('btn');\"
name=\"username\"
type=\"text\"
id=\"username\"
value=\"{$user}\" />";
?>Code: Select all
echo '<input class="x"
onfocus="HideContent(\'btn\');"
name="username"
type="text"
id="username"
value="{$user}" />';
Except your code doesn't work. Can't evaluate variables inside single quotes.egg82 wrote:Keep it simpleCode: Select all
echo '<input class="x" onfocus="HideContent(\'btn\');" name="username" type="text" id="username" value="{$user}" />';
Code: Select all
echo '<input class="x"
onfocus="HideContent(\'btn\');"
name="username"
type="text"
id="username"
value="' . $user . '" />';