2012-04-16 4 views
0

だけの事はここにオフヘッダは、()は単に私が最近変更されている

register_globalsの電源を入れているものは、ログインスクリプトの終わりではないん

$from = $_POST['from']; //convert form element to var 
//echo "got here, from is $from"; die; 

// test to prove $from is empty 
if($from == '') 
{ 
    $from = '/pages/reg2.html'; 
} 
header("Location: $from"); // this should redirect page 
+0

を動作するはずですしてみてくださいエラーログには何もありませんか? –

+0

ヘッダーの問題とは無関係ですが、 '== ''の代わりに' empty() 'を使用します。つまり、if(empty($ from))です。 – JimmyBanks

+0

スクリプトにデバッグ出力があるようです。 header()が実際に呼び出されていることを知っていますか? – jasonbar

答えて

0

は、このコードは

<?php 

if (isset($_POST['from']) && !empty($_POST['from'])) { 
$from = $_POST['from']; //convert form element to var 
//echo "got here, from is $from"; die; 

// test to prove $from is empty 
} 

if(empty($from)) 

{ 
    $from = '/pages/reg2.html'; 
} 

//if still doesnt work try to replace this line with : echo $from; exit(); 
//just for you to know at what point you are . 
header("Location: $from"); 
exit(); 




?> 
関連する問題