Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Re: value submit button

    You can get the button value use code below:

    <?php echo $_POST[submit];?>
    <form method="post">
    <input type="submit" name="submit" value="submit1">
    <input type="submit" name="submit" value="submit2">
    </form>

    --
    ----------------------------------------------------------------------------
    Hu Zhenghui
    IBM Certified Solutions Expert IBM WebSphere Studio
    <New Intranet Series - Intranet DIY> ISBN 7-5606-1163-X
    <Flash MX Tutorial for Training> ISBN 7-900107-51-7
    mailto:webmaster@huzhenghui.51.net
    [url]http://huzhenghui.51.net[/url]
    ----------------------------------------------------------------------------
    "Florian SchäFer" <florian.schaefer@talknet.de> дÈëÏûÏ¢
    news:8f3tei$6cs$1@va.php.net...
    > Hallo out there,
    >
    > i hava an document, with one form and two Submit buttons.
    > How can i check in the target document wich button is pressed?
    > tried something like if ($submit == 'xxx') .
    > anyone has a hint?
    >
    >


    Hu Zhenghui Guest

  2. Similar Questions and Discussions

    1. Submit button style
      Hi, I am trying to change the style of a submit button ('<input type="submit" value="Update">') using stylesheets but everytime I use something...
    2. Submit button
      I have a web form with a few text fields some validataion and a submit button. When I click the submit bittin the serverside event does not...
    3. [PHP] using submit button and PHP-HELP
      thanx for your help, Ive got flu and all these small things seem to be escaping my eyes. I just want to ask you a small question: If i want this...
    4. using submit button and PHP-HELP
      Hi, I have a form that has a submit button in it, when the button is pressed I want it to reload the same page, with the same URL, however when I...
    5. Help with Submit button...
      Hi, I have a graphic, I wanted to use it for a submit button. For some reason it does not work.. it acts more of a link. The problem with...
  3. #2

    Default Re: [PHP] Re: value submit button

    Do some testing in a few browsers to see what happens when the user
    hits "enter" or "return", rather than clicking on the button(s)... I
    *think* you need to put in a hidden element. For example, if you
    wanted "submit2" to be the default value:

    <?=$_POST[submit]?>
    <form method="post">
    <input type="hidden" name="submit" value="submit2" />
    <input type="submit" name="submit" value="submit1" />
    <input type="submit" name="submit" value="submit2" />
    </form>


    Justin



    On Friday, August 1, 2003, at 02:36 PM, hu zhenghui wrote:
    > You can get the button value use code below:
    >
    > <?php echo $_POST[submit];?>
    > <form method="post">
    > <input type="submit" name="submit" value="submit1">
    > <input type="submit" name="submit" value="submit2">
    > </form>
    Justin French Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139