textbox problem
Posted by: bunny (---.pub.ro)
Date: November 16, 2006 10:37PM

hellou, I'm a biginer of php and I'm using wamp5 version 1.6.6...when i open my page in broswer which contain an textbox, it's show me all i write to the value option, for example : value="<?=(isset($_POST['model']) ? $_POST['model']:""winking smiley?>" but, if i write with echo it's ok , for example : value="'.$_SESSION['model'].'"
so what can i do!?....sorry for bad english

Options: ReplyQuote
Re: textbox problem
Posted by: Arion (---.hsd1.co.comcast.net)
Date: November 17, 2006 12:26AM

I would suggest formatting your html first and then ECHOing it, for example:

$_POST['model'] = (isset($_POST['model']) ? $_POST['model'] : ""winking smiley;
$output = <<<HER
<form method='POST' action='process.php'>
        <input type='text' value='{$_POST['model']}' />
</form>
HER;
echo $output;

The method used above is called 'The HEREDOC statement' if you decide to look it up, it's quite useful and boosts performance as it doesn't cause the parser to break in and out of PHP.

Options: ReplyQuote
Re: textbox problem
Posted by: CyberSpatium (71.237.217.---)
Date: November 17, 2006 02:21PM

post your code please.


CyberSpatium
WAMP English Forum Admin

Options: ReplyQuote


Sorry, only registered users may post in this forum.