Jump to content

Redirect Problems


everlifefree

Recommended Posts

I'm trying to use this now and the redirect is all working fine expect I can't get it to pull up the different pages for different variables or what ever. Whether is has "is_rave" mark with a 1 or not it still just pulls up the last option. Any help now that I've really changed it?

 

//Profile Switching////////////////////////////////////////////////////////////////
	$rave_check = myF(myQ("
		SELECT * 
		FROM `[x]users` 
		WHERE `id`='".$_GET["id"]."'
		AND `is_rave` = '1'
		ORDER BY `id` DESC
	"));

$tpl -> AssignArray(array(
	"check.rave" => $rave_check["id"],
));

	$artist_check = myF(myQ("
		SELECT * 
		FROM `[x]users` 
		WHERE `id`='".$_GET["id"]."'
		AND `is_artist` = '1'
		ORDER BY `id` DESC
	"));

$tpl -> AssignArray(array(
	"check.artist" => $artist_check["id"],
));

	$club_check = myF(myQ("
		SELECT * 
		FROM `[x]users` 
		WHERE `id`='".$_GET["id"]."'
		AND `is_club` = '1'
		ORDER BY `id` DESC
	"));

$tpl -> AssignArray(array(
	"check.club" => $club_check["id"],
));


    if($rave_check=="'".$_GET["id"]."'")
      {
       header("Location: http://spadespace.com/?L=users.rave&id=".$_GET["id"]."");
       // exit the page to make sure nothing further is added to the headers.
       exit;
       }
     elseif($artist_check=="'".$_GET["id"]."'")
   {
    header("Location: http://spadespace.com/?L=users.artist&id=".$_GET["id"]."");
    // exit the page to make sure nothing further is added to the headers.
    exit;
       }
     elseif($club_check=="'".$_GET["id"]."'")
   {
    header("Location: http://spadespace.com/?L=users.club&id=".$_GET["id"]."");
    // exit the page to make sure nothing further is added to the headers.
    exit;
       }
     else
   {
    header("Location: http://spadespace.com/?L=users.profile1&id=".$_GET["id"]."");
    // exit the page to make sure nothing further is added to the headers.
    exit;
       }

 

Link to comment
https://forums.phpfreaks.com/topic/97564-redirect-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.