Re: Confusing POST behavior -- doing it twice?



Shelly wrote:

> (posted previously on comp.lang.php but no response received.
> Cross-posted in the dreamweaver forum)
>
> I am confused about what goes on with method POST. Here is an overview of
> a my code, sketching it out:
>
> <?php
> if (isset($_POST['Submit']) && $_POST['Submit']=="Submit") {
> ---Do a bunch of stuff---
> if (isset($_SESSION['Error'])) unset($_SESSION['Error']);
> if (strcmp($A, "any") {
> // Verify that a Zip code is numeric and is five digits
> If (!is_numeric($_POST($zip)) strlen($_POST($zip)) != 5) then {

Hi,

Shouldn't this be:
$_POST["zip"] instead of $_POST[$zip] ??

Are you expecting a posted name/value with 'zip' as name?

$_POST[$zip] will try to fetch WHATEVER $zip will be, probably nothing.



Regards,
Erwin Moller
.



Relevant Pages