0

hya i have 2 user goups in my website one for couples and one for singles what im wanting to know is when a couple registers how can i direct them to a couples directory ive tried the following but its not doing it can anyone help with this

if( $gender == 'female' ) {
        //Redirect administrators to the dashboard
        header("location: registration2.php");
    } elseif ( $gender == 'males' ) {
        //Redirect shop managers to the dashboard
        header("location: registration2.php");;
    } elseif ( $gender == 'couples' ) {
        //Redirect editors to the dashboard
        header("location: cregistration2.php");
    } elseif ( $gender == 'tvtscd' ) {
        //Redirect authors to the dashboard
        header("location: registration2.php");
    }
3
Contributors
7
Replies
35
Views
2 Years
Discussion Span
Last Post by edbr
0
if( $gender == 'female' || $gender == 'males' || $gender == 'tvtscd' ) {  //why female singular / males plural?? 
    header("Location: registration2.php");
}else{
    header("Location: cregistration2.php");
}
exit;

Ensure that the locations exist. Are your swingers getting lost?

Edited by diafol

0

hi hun this works when choosing a couple but when choosing a male or female it goes straight to cregistration2php not registration2.php hun

0

This mens $gender does not hold ny of those values then. If you echo $gender to the screen and comment out (//) the headers, you should see what they hold.

0

its not echoing anything through ive refreshed the page with echo $gender; inside and // the headers hun

as in

    if( $gender == 'female' || $gender == 'males' || $gender == 'tvtscd' ) {  //why female singular / males plural?? 

        echo $gender;
    //header("Location: registration2.php");
}else{
    //header("Location: cregistration2.php");
}
exit;

Edited by janicemurby: Missed code out

0

As I thought. Your code is knackered somewhere earlier.

0

as the comented refer to different /members, it looks like a modyfied script. i would check the form field names that sends to this. just a guess

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.