dimanche 6 septembre 2015

Basic PHP validation if statement resulting blank page

So I have this code for validation:

if(file_exists($p))
{
    if($n=="")
    {
        header("location:register.php?error=Fill the Name of the skateboarder");
    }
    ...... A LOT MORE AND SUCCESS TO VALIDATE THE DATA.........
    else if(isset($_REQUEST['countries']) && $_REQUEST['countries'] == 'empty') { 
        header("location:register.php?error=Please select a country");
    }
    else if($_REQUEST['countries'] !== 'ID') 
    { 
        if($arrival=="")
        {
            header("location:register.php?error=Fill Complete Flight information above");
        }

        else if($flight=="")
        {
            header("location:register.php?error=Fill your flight number");
        }

        else($origin=="")
        {
            header("location:register.php?error=Fill your flight Origin");
        }

    }
    else
    {
        header("location:register.php?error=TEST SUCCESS, THE COUNTRY IS $country"); } }
else { bla bla }

I've been debug all the way, one by one. If I don't fill the form (especially for the last three input, $arrival, $flight, and $origin) the validation is working. But if I fill completely, when I submit the data the screen goes complete white. I can consider my self as 'pretty much experienced' in this kind of validation.

But this time, i've been search all over the places including here, but it doesn't help.

Really appreciate for the help.

Aucun commentaire:

Enregistrer un commentaire