Form Data Not Sent by Browser

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vincecarney@gmail.com

    #1

    Form Data Not Sent by Browser

    I have a simple form that calls a .php script once submitted. It's
    currently on a Linux server. The form data is sent via method="post"
    but the data isn't being sent by the browser.

    I have tested the form and .php script on another server on a different
    network and it works fine.

    Anybody run into this issue???

  • pittendrigh

    #2
    Re: Form Data Not Sent by Browser

    You have to post the server-side code to get a real answer.

    But just as a guess, the server that 'works' probably has
    register_global s=on
    while the server that 'does not work' has
    register_global s=off

    If so, use the php manual to learn how to read the $_POST array

    Comment

    • vincecarney@gmail.com

      #3
      Re: Form Data Not Sent by Browser

      php script:

      <?php
      echo "$name";
      ?>

      html form:


      <form action="handle_ form.php" method="post">
      <fieldset><lege nd>Enter your information in the form below:</legend>
      <table width="100%" border="0">
      <tr>
      <td width="16%"><st rong>Name:</strong></td>

      If I use method="get" in the html form the data entered in the name
      text box is not sent to the URL.

      FYI - I already tried register globals = ON.
      <td width="84%"><in put type="text" name="name" /></td>
      </tr>
      </table>
      </fieldset>
      </form>

      Comment

      • Rik

        #4
        Re: Form Data Not Sent by Browser

        vincecarney@gma il.com wrote:[color=blue]
        > FYI - I already tried register globals = ON.[/color]


        And have you examined the $_POST or $_GET array?
        What does it say if your print_r() them? Also empty?

        Grtz,
        --
        Rik Wasmus


        Comment

        • v1nce

          #5
          Re: Form Data Not Sent by Browser

          Yes it's empty.

          In the HTML form using method="get" the data entered isn't even sent in
          the URL. Is this an Apache server configuration?

          This is crazy!

          Comment

          • Roland Böni

            #6
            Re: Form Data Not Sent by Browser

            vincecarney@gma il.com wrote:[color=blue]
            > php script:
            >
            > <?php
            > echo "$name";
            > ?>
            >
            > html form:
            >
            >
            > <form action="handle_ form.php" method="post">
            > <fieldset><lege nd>Enter your information in the form below:</legend>
            > <table width="100%" border="0">
            > <tr>
            > <td width="16%"><st rong>Name:</strong></td>
            >
            > If I use method="get" in the html form the data entered in the name
            > text box is not sent to the URL.
            >
            > FYI - I already tried register globals = ON.
            > <td width="84%"><in put type="text" name="name" /></td>
            > </tr>
            > </table>
            > </fieldset>
            > </form>
            >[/color]

            How are you sending the data. I don't see a submit button.

            Comment

            • JackM

              #7
              Re: Form Data Not Sent by Browser

              vincecarney@gma il.com wrote:[color=blue]
              > php script:
              >
              > <?php
              > echo "$name";
              > ?>
              >
              > html form:
              >
              >
              > <form action="handle_ form.php" method="post">
              > <fieldset><lege nd>Enter your information in the form below:</legend>
              > <table width="100%" border="0">
              > <tr>
              > <td width="16%"><st rong>Name:</strong></td>
              >
              > If I use method="get" in the html form the data entered in the name
              > text box is not sent to the URL.
              >
              > FYI - I already tried register globals = ON.
              > <td width="84%"><in put type="text" name="name" /></td>
              > </tr>
              > </table>
              > </fieldset>
              > </form>
              >[/color]

              Use print_r($_POST) ; on the handle_form.php to be sure that the info is
              being passed from the form. If it is there, does handle_form.php have a
              method coded on it to extract the variables? If not, you need to use
              $_POST['name'] when you call it.



              Jack

              Comment

              • v1nce

                #8
                Re: Form Data Not Sent by Browser

                I changed the PHP script with this:

                print_r($_POST) ;

                and it does return the values entered. What's my next step???

                Comment

                • Jerry Stuckle

                  #9
                  Re: Form Data Not Sent by Browser

                  vincecarney@gma il.com wrote:[color=blue]
                  > php script:
                  >
                  > <?php
                  > echo "$name";
                  > ?>
                  >
                  > html form:
                  >
                  >
                  > <form action="handle_ form.php" method="post">
                  > <fieldset><lege nd>Enter your information in the form below:</legend>
                  > <table width="100%" border="0">
                  > <tr>
                  > <td width="16%"><st rong>Name:</strong></td>
                  >
                  > If I use method="get" in the html form the data entered in the name
                  > text box is not sent to the URL.
                  >
                  > FYI - I already tried register globals = ON.
                  > <td width="84%"><in put type="text" name="name" /></td>
                  > </tr>
                  > </table>
                  > </fieldset>
                  > </form>
                  >[/color]

                  Check your html for errors - something may be causing the form to be not
                  processed properly. A validator is available at http://validator.w3.org/.


                  --
                  =============== ===
                  Remove the "x" from my email address
                  Jerry Stuckle
                  JDS Computer Training Corp.
                  jstucklex@attgl obal.net
                  =============== ===

                  Comment

                  • Good Man

                    #10
                    Re: Form Data Not Sent by Browser

                    "v1nce" <vincecarney@gm ail.com> wrote in news:1146164827 .696021.172640
                    @y43g2000cwc.go oglegroups.com:
                    [color=blue]
                    > I changed the PHP script with this:
                    >
                    > print_r($_POST) ;
                    >
                    > and it does return the values entered. What's my next step???[/color]

                    join 2003 and get your variables the proper way.

                    you shouldn't (and can't, according to your config) just get your text
                    field value by saying

                    echo $name;

                    first you need to get the variable from the $_POST array:

                    $name = $_POST['name'];
                    echo $name;

                    voila.


                    Comment

                    Working...