|
Posted by vinnie on 06/08/07 15:17
On Jun 7, 2:59 pm, Michael Fesser <neti...@gmx.de> wrote:
> .oO(vinnie)
>
> >i insert the header in the name.php file that a basic form use to go
> >to a specific page if something happen, but it does not work...
> >Here is the code i use:
>
> ><?php
> >if ($_POST[name])
> > {
> > header ("Location:http://www.XXXXYYYY.com/home.html");
> > exit;
> > }
> >?>
>
> >What's wrong?
>
> Nothing, except for the missing quotes around your array key:
>
> if ($_POST['name']) {
> ...
>
> }
>
> Set error_reporting to E_ALL in your php.ini to see such mistakes. The
> rest of the code is correct, so the questions are
>
> * How is your form submitted (GET or POST)?
> * Does $_POST contain anything at all? Check with var_dump().
> * Does $_POST['name'] contain a value that evaluates to TRUE? Remember
> that empty strings and '0' will evaluate to FALSE.
> * What do you expect $_POST['name'] to be?
>
> Micha
Thanks, it worked!!!!
[Back to original message]
|