www.webdeveloper.com
Results 1 to 11 of 11

Thread: post method

  1. #1
    Join Date
    Dec 2009
    Posts
    7

    post method

    Hi guys

    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


    Thanks CW

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    To do what exactly?
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Dec 2009
    Posts
    7
    To send a course name to from a html page to a php page which then selects the relevant course descriptor and displays it

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    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.
    http://www.tizag.com/phpT/forms.php
    At least 98% of internet users' DNA is identical to that of chimpanzees

  5. #5
    Join Date
    Dec 2009
    Posts
    7
    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:value" pair

    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...

    Multimedia:UCAS1234


    Thanks
    Last edited by code_worm; 12-07-2009 at 10:22 AM.

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Use a submit button.

    http://myphpform.com/

    Code:
    <input type="text" name="Multimedia" value="UCAS1234">
    At least 98% of internet users' DNA is identical to that of chimpanzees

  7. #7
    Join Date
    Dec 2009
    Posts
    7
    Thats no use...

    I'm using a drop down list to display many courses

    HTML Code:
    			<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>
    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

  8. #8
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    It's in the form, it will be sent to the server script.
    $post['course'] will contain the selected value
    At least 98% of internet users' DNA is identical to that of chimpanzees

  9. #9
    Join Date
    Dec 2009
    Posts
    7
    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

  10. #10
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Quote Originally Posted by code_worm View Post
    Would this button just be to direct you from the html selection page to the php page?
    yes, if the form action points to that page.
    At least 98% of internet users' DNA is identical to that of chimpanzees

  11. #11
    Join Date
    Dec 2009
    Posts
    2

    Thumbs up 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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles