PDA

View Full Version : Syntax Error


Dfraz
04-25-2008, 06:19 AM
Hey. One again I need help with this:<?php if($session->isAdmin())
<input name="email" type="text" id="email" value="<?php echo"$username"; ?>



I know I need something like: \ or ' but I sometimes forget where you put them and stuff.

But if you can help me I will thank you and give you some rep :thumbsup:


Thanks :D

abduraooft
04-25-2008, 07:52 AM
<?php
if($session->isAdmin())

echo "<input name=\"email\" type=\"text\" id=\"email\" value=\"{$username}\" />";
?> Or

<?php
if($session->isAdmin())
{
?>
<input name="email" type="text" id="email" value="<? echo $username; ?>" />
<?php
}
?>

Or

<?php
if($session->isAdmin())

echo '<input name="email" type="text" id="email" value="'.$username.'" />';
?>

Dfraz
04-25-2008, 06:04 PM
Ah that works.

Thanks :D You get rep