I am implementing the post method for the very first time and am looiking for some guidance.
What i am doing is submitting a value selected from a drop down list via a button. I don't understand the ways in which the method really works so therefore im finding it very hard to implement this. When you put the method in "post" and the action " url " into the form will this execute a post method anyway?
More or less what i want to know is how can i access the post method through an onclick event
To send a course name to from a html page to a php page which then selects the relevant course descriptor and displays it
The php page will have to be coded to read the name/value pairs sent by the html form.
The relevant data can then be displayed accordingly.
Thanks for that great resource
if i want the post method to only work when i press a button how can this be done?
can anyone direct me to any good resources to help me gain a better understanding?-
Can i ask you, if you were asked to send the information through a single
name being the course name and value being the educational code for the course what would you think?
Does it mean send the value like...
Last edited by code_worm; 12-07-2009 at 11:22 AM.
Use a submit button.
<input type="text" name="Multimedia" value="UCAS1234">
Thats no use...
I'm using a drop down list to display many courses
What i want to know is how can i get the value selected in the drop down list sent to my php form through the means of a button
<select name = "course" onchange="showSelection(this.value)">
<option value="Computer Science:UCAS G400">BSc/Bsc(Hons) Computer Science UCAS G400</option>
<option value="Computing for Business and e-Commerce:UCAS G501">BSc/Bsc(Hons) Computing for Business and e-Commerce UCAS G501</option>
<option value="Computing for Graphics and Animation:UCAS G450">BSc/Bsc(Hons) Computing for Graphics and Animation UCAS G450</option>
<option value="Computing for Internet and Multimedia:UCAS G401">BSc/Bsc(Hons) Computing for Internet and Multimedia UCAS G401</option>
<option value="Information Systems Technology:UCAS G502">BSc/Bsc(Hons) Information Systems Technology UCAS G502</option>
<option value="Multimedia Development:UCAS G451">BSc/Bsc(Hons) Multimedia Development UCAS G451</option>
It's in the form, it will be sent to the server script.
$post['course'] will contain the selected value
Yeah thats what i thought,but in the exercise i am doing the screen shots show that there is a submit query button. Would this button just be to direct you from the html selection page to the php page?
This would make sense to me as when it directs you the value of the drop down list will be and should be the correct choice
Thanks for the help and reassurance
yes, if the form action points to that page.
Originally Posted by code_worm
PHP Forms - The best form creator & processor solution since 2003
Create any kind of web form in several mouse clicks! Generate a code that can be easily copied and pasted to any web page PHP form
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)