Jump to content

Need to get input field contents...


somo

Recommended Posts

when you sat date you mean the date the user post the form if so i got this ok.

$date=date("y/m/d"); year month day.

for debuging purpose the date will be shown in the input box you can easly put hidden ok.

<input type="text" name="date" value=<?echo $date; ?>">
No i have a mini calendar that gets the user to select a date which is autoimatically put into a field.

All i need to do is get the field contents e.g. 09 July 2006  and store this as a variable in php sp i can use that variabile in an amount of days calculation script.

[quote author=redarrow link=topic=99953.msg393922#msg393922 date=1152448832]
when you sat date you mean the date the user post the form if so i got this ok.

$date=date("y/m/d"); year month day.

for debuging purpose the date will be shown in the input box you can easly put hidden ok.

<input type="text" name="date" value=<?echo $date; ?>">
[/quote]
example form:
[code]
<form action = 'blah.php' method='post'>
  <input type = 'text' name = 'somefield'>
  <input type = 'submit' value='blah'>
</form>
[/code]
and then in blah.php you would get the info like so:
[code]
//example
echo $_POST['somefield']; //echos out what you put in the 'somefield' input field
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.