NYCPHP Meetup

NYPHP.org

[nycphp-talk] need some form help...

Joshua S. Freeman jfreeman at amnh.org
Tue May 27 09:06:04 EDT 2003


Hi Aaron,

So... if, in my form, I want both the date to both be part of my form input
as well as displayed on the page when the page is loaded, how do I write
that code?


Say I have a webpage 'waspsurvey.php3' that contains my form.

When a surveyor loads that page in his/her browser, the form is displayed
for the surveyor to fill out.

At a point on the form, there is the parameter 'Date:'  so, I'd want
' $date = date("Y-m-d");
  print "$date";'
in waspsurvey.php3 so that the date will print in the page.. but.. what do I
do to capture "$date" so that it becomes part of my form input?  <input
type="hidden" name="date" value="$date"> ?

J.


the On 5/27/03 8:20 AM, "Aaron Fischer" <agfische at email.smith.edu> wrote:

> For date, In your php script that handles the form, you can do
> something like:
> 
> $date = date("Y-m-d");
> 
> Then you can insert $date along with your other form variables into the
> mysql table.
> 
> Aaron
> 
> 
>> 
>>> Another point of confusion... one of the fields in the survey form
>>> is 'survey_date'.
>>> 
>>> I have field of type 'date' in my 'specimen' table... I'd like to have
>>> the 'survey_date' be handled automagically for the surveyor by PHP and
>>> MySQL..
>>> any suggestions on how best to accomplish that?
> 
> 
> 
> --- Unsubscribe at http://nyphp.org/list/ ---
> 
> 
> 




More information about the talk mailing list