SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Passing Parameters and using Form POST together

    hello everyone,

    i have only just started using php and have a question hopefully that has a simple answer.

    if i have a page that has a parameter that i need to pass to another page and on the same page i have a form that passes a user's input, what is the easiest way to accomplish this?

    for example, i have a page with a reference number to query a mysql database file, and on the same page i have an input box for a user's email address with a submit type button, how do i pass the reference number and the email address to a page that will be able to send an email message to the user's email address and also be able to use the reference number to get a record from the database file and place that record's values as the body of the email when the user clicks on submit?

    thanks in advance for any help.

    peter

  2. #2
    SitePoint Wizard bronze trophy devbanana's Avatar
    Join Date
    Apr 2006
    Location
    Pennsylvania
    Posts
    1,736
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    This is actually the wrong board. This should go in the regular PHP board.

    As for your issue, you could either use a hidden field to pass the parameter, or use sessions. Sessions would be recommended since hidden fields can be modified.

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    moved
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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