RE: [PHP] textfields showing php tags & code
| From: | Chris W. Parker | Date: | Wed, 21 Jan 2004 18:19:07 +0000 |
| Subject: | RE: [PHP] textfields showing php tags & code | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-175324@lists.php.net to get a copy of this message | ||
craig <mailto:php@lonsbury.com>
on Wednesday, January 21, 2004 9:24 AM said:
> This one has me stumped, it worked yesterday, but not today,
> and I didn't change anything (as far as I know).
>
> This is some of the code from a function which is now showing the
> <?php echo $quantity; ?> code inside the textareas, rather than
> the passed value from the function call.
>
> any ideas are greatly appreciated.
How about this instead?
function showForm($quantity='', $fname='', $lname='')
{
$output = <<<QQQ
<form action='orderX.php' method='post' name='orderForm'>
<table border='0'>
<tr>
<td align='right'>Quantity:</td>
<td><input name='quantity' type='text' size='3'
value='$quantity'>*</td>
</tr>
<tr>
<td align='right'>First Name:</td>
<td><input name='fname' type='text' size='25'
value='$fname'>*</td>
</tr>
<tr>
<td align='right'>Last Name:</td>
<td><input name='lname' type='text' size='25'
value='$lname'>*</td>
</tr>
</table>
</form>
QQQ;
return $output;
}
...
Chris.