SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    text box entry problems....

    hey guys!

    I have multiple text boxes for the client to key in stuff, then hit a Submit button. Problem is, I have many diff. areas of text entry with more than 1 submit button. I would like to page to refresh itself via PHP_SELF (I know how to do this), and have the new page reflect the submitted info.

    I use this command for my buttons:
    PHP Code:
    <INPUT TYPE="submit" VALUE="Confirm Update"
    I would like to have many submit buttons, but each one is different in the sense that each submit button refreshes the page with different information (I do this via control structures on the same page, like:

    if ($submit)
    {
    .....
    }


    simple question:
    Any idea how I can vary my submit buttons, so that I can have multiple control structures like the above, with each submit leading to only certain info of the page loaded?

    Thanks!

  2. #2
    :) delemtri's Avatar
    Join Date
    Jun 2001
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    if ($submit)
    {
    if (
    $var1) {
    // display stuff for $var1
    } elseif ($var2) {
    // display stuff for $var2
    } elseif ($var3) {
    // display stuff for $var3
    // etc.
    }
    else
    {
    // stuff


  3. #3
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey yeah! now why didn't I think of that...

    thanks!!


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
  •