Form data not passing to PHP handler

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alain  no spam please

    Form data not passing to PHP handler

    Using a basic PHP file to handle incoming form data of a single text
    field, I have determined that the contents of the input is not being
    passed. The PHP reports the variable as empty...

    I suspect the reason it is getting "lost" on the way there is that the
    form is part of an include (header.html) rather than hard coded into
    the main page. So its link to the PHP handler is not direct. Is that
    possible? I was using GET method but to eliminate issues such as
    superglobals being off, I switched over to POST, at least for now and
    until I get it working...

    Can anyone please help me out?
  • Juha Suni

    #2
    Re: Form data not passing to PHP handler

    Alain no spam please wrote:[color=blue]
    > Using a basic PHP file to handle incoming form data of a single text
    > field, I have determined that the contents of the input is not being
    > passed. The PHP reports the variable as empty...
    >
    > I suspect the reason it is getting "lost" on the way there is that the
    > form is part of an include (header.html) rather than hard coded into
    > the main page. So its link to the PHP handler is not direct. Is that
    > possible? I was using GET method but to eliminate issues such as
    > superglobals being off, I switched over to POST, at least for now and
    > until I get it working...
    >
    > Can anyone please help me out?[/color]

    Using includes or "hard coding" in the same file has no difference
    whatsoever.

    use $_POST["variable"] (or $_GET["variable"]) in the handling PHP-page,
    instead of $variable.
    read why: http://www.php.net/register_globals

    --
    Suni

    Comment

    Working...