Jump to content

[SOLVED] Redirect?


unidox

Recommended Posts

I have some code:

 

<?php
if ($_COOKIE['uniqueid']) {
?>
<?php
    global $levels;
    $a = $_COOKIE['access'];
    $pass = $_COOKIE['key'];
    $user = $_COOKIE['uniqueid'];
    $result = MYSQL_QUERY("SELECT * FROM cp_users ORDER BY user_id ASC") or die (mysql_error());
    $rows = mysql_num_rows($result);
    $b = $mysql[access];
    while ($mysql=mysql_fetch_array($result)) {
    if (($a == $mysql[access]) && ($pass == $mysql[password]) && ($user == $mysql[username])) {
    if ($a <= $levels[links]) {

 

but I keep getting an error:

 

The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

 

But I changed to:

 

<?php
if ($_COOKIE['uniqueid']) {
?>
<?php
    if ("1" == "1") {
    if ("1" == "1") {

 

So its obviously not the code underneath.

 

Please help

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

I have this in one of the includes:

 

    if(isset($_POST['reset'])) {
mysql_query("UPDATE `cp_layout` SET info = 'roster,sponsors:matches,servers' WHERE type='layout';");
header("location: http://www.clanspage.net/index.php?page=admin_layout");
    } else {
$l1 = ($_POST['l1'] == "none" || $_POST['l1'] == "") ? "" : $_POST['l1'] . ",";
$l2 = ($_POST['l2'] == "none" || $_POST['l2'] == "") ? "" : $_POST['l2'] . ",";
$l3 = ($_POST['l3'] == "none" || $_POST['l3'] == "") ? "" : $_POST['l3'] . ",";
$l4 = ($_POST['l4'] == "none" || $_POST['l4'] == "") ? "" : $_POST['l4'] . ",";
    $l5 = ($_POST['l5'] == "none" || $_POST['l5'] == "") ? "" : $_POST['l5'] . ",";
    $l6 = ($_POST['l6'] == "none" || $_POST['l6'] == "") ? "" : $_POST['l6'] . ",";
$lc = substr("$l1$l2$l3$l4$l5$l6",0,strlen("$l1$l2$l3$l4$l5$l6")-1);
$r1 = ($_POST['r1'] == "none" || $_POST['r1'] == "") ? "" : $_POST['r1'] . ",";
$r2 = ($_POST['r2'] == "none" || $_POST['r2'] == "") ? "" : $_POST['r2'] . ",";
$r3 = ($_POST['r3'] == "none" || $_POST['r3'] == "") ? "" : $_POST['r3'] . ",";
$r4 = ($_POST['r4'] == "none" || $_POST['r4'] == "") ? "" : $_POST['r4'] . ",";
    $r5 = ($_POST['r5'] == "none" || $_POST['r5'] == "") ? "" : $_POST['r5'] . ",";
    $r6 = ($_POST['r6'] == "none" || $_POST['r6'] == "") ? "" : $_POST['r6'] . ",";
$rc = substr("$r1$r2$r3$r4$r5$r6",0,strlen("$r1$r2$r3$r4$r5$r6")-1);
$type = $lc . ":" . $rc;

mysql_query("UPDATE `cp_layout` SET info = '$type' WHERE type='layout';");
header("location: http://clanspage.net/index.php?page=admin_layout");

 

But I dont think it will make much of a difference

Link to comment
https://forums.phpfreaks.com/topic/69257-solved-redirect/#findComment-348011
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.