View Single Post
Old 06-26-2008, 11:20 PM   #16 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

When you're using single quotes (') you don't have to escape double quotes (") and visa versa. This isn't how I would do it normally, but to fit with the style of what you're doing;

PHP Code:
if ( ! isset($username))
{
    
$username '';
}

if ( ! isset(
$password))
{
    
$password '';
}

$szForm = <<<FORM
<form action="users.php" name="login" method="post"> 
<table> 
    <tr><td>username</td>
        <td><input type="text" name="username" value="
{$username}" /></td>
    </tr> 

    <tr><td>password</td>
        <td><input type="password" name="password" value="
{$password}" /></td>
    </tr>

    <tr><td colspan="2"><input type='submit' name='login' value='login' /></td></tr> 
</table> 
</form>
FORM;

echo 
$szForm
Typos and simple mistakes can happen to anybody at anytime, so never be afraid to view the source directly from your browser, or echo any variables to the screen temporarily to check them, and so on and so forth.
-m
delayedinsanity is offline  
Reply With Quote
The Following User Says Thank You to delayedinsanity For This Useful Post:
codefreek (06-26-2008)