form and submit key

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sonnich

    form and submit key

    Hi

    one thing more.

    Say, I have a <formwith a text input and a submit button - how do I
    then get the data when reloading or how?

    Sorry, this is probably simple... but to me it is new.

    BR
    Sonnich

  • Gulasch

    #2
    Re: form and submit key

    Sonnich schrieb:
    Hi
    >
    one thing more.
    >
    Say, I have a <formwith a text input and a submit button - how do I
    then get the data when reloading or how?
    >
    Sorry, this is probably simple... but to me it is new.
    >
    BR
    Sonnich
    >
    If you have for example

    --snip 1.php--
    <form method=post action=2.php>
    <input type=text name='something '>
    <input type=submit value='Send'>
    </form>
    --snap 1.php--

    you can read the contents of the text-field in 2.php by using
    $_POST['something'].

    So for example you could do

    --snip 2.php--

    echo "Hello ". $_POST['something'] ."!";

    --snap 2.php--

    Comment

    Working...