Re: Form Textarea question
by "Art Zoller Wagner" <art(at)zollerwagner.com>
|
Date: |
Tue, 18 Feb 2003 00:37:23 -0500 |
To: |
"Beauford.2002" <beauford.2002(at)rogers.com> |
Cc: |
"HWG Basics" <hwg-basics(at)hwg.org> |
References: |
p1 markone p12 markone2 p13 |
|
todo: View
Thread,
Original
|
|
Hi,
The purpose of <?= somevariable ?> is to print the php variable to the
screen when it is reloaded (probably because the user's data failed some
test you ran on it). It's sort of a shorthand echo or print command. If you
don't reload the data for the user you can eliminate <?=$_POST['msg'] ?>
It's just telling the browser to fill in the data.
I use the post method with my form. When the page reloads, I use the
variable sent by the browser: $_POST['msg'] to fill in that field again so
the user doesn't have to.
The parse error is might come about if you're using the get method.
Or it may be that your version of php doesn't allow this form of the
variable. You might have to use $HTTP_POST['msg'] with slightly older
versions.
A simpler possibility is that you didn't change my 'msg' to your 'comment',
like so:
<textarea name="msg" rows="5" cols="60" class="greyBg"><?=$_POST['comment']
?></textarea>
best wishes, Art
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA