please can anyone tell me how i can create a form with a submit button using post.
create a form with a button with $post
Started by achi, Mar 08 2009 12:42 PM
6 replies to this topic
#1
Posted 08 March 2009 - 12:42 PM
|
|
|
#2
Posted 08 March 2009 - 12:52 PM
<form method="post" action="page.php"> <input type="text" name="field" value="default"> <input type="submit" name="send" value="Send"> </form>change the page.php to the name of the page which shall receive the post information.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#3
Posted 08 March 2009 - 01:00 PM
thanks orjan please do you know how i can include a drop down list menu or checkbox to it and make it return a value depending on the choice selected on the checkbox. i think i will have to use a if statement but dont know how to write it
#4
Posted 08 March 2009 - 01:03 PM
Checkbox:
Drop down menu:
<input type="checkbox" name="delivery" />Home delivery
Drop down menu:
<select name="dairy"> <option value="cheese">Cheese</option> <option value="eggs">Eggs</option> <option value="milk">Milk</option> </select>
Edited by Xav, 09 March 2009 - 09:08 AM.
#5
Posted 08 March 2009 - 04:07 PM
I would suggest you read the HTML tutorials at W3Schools Online Web Tutorials
Edited by WingedPanther, 09 March 2009 - 07:31 AM.
fix link
#6
Posted 09 March 2009 - 06:46 AM
Xav said:
Checkbox:
<input type="delivery" name="field" />Home delivery
Hmm.. no, that's not right.
<input type="checkbox" name="delivery" name="field" />Home delivery
works better.
WingedPanther said:
I would suggest you read the HTML tutorials at w3shools.com
Better to link to the real site. W3Schools Online Web Tutorials
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall


Sign In
Create Account

Back to top









