Hello,
I work with php4. There is two PHP scripts,when I run the "message.phtml", but the browser to display the following message:
location:http://127.0.0.1/site/homepage/message.phtml
Who can tell me why "header("location:$HTTP_REFERER")" does not redirect to "message.phtml".
My two scripts:
1.message.phtml:
...
<?//get data from database?>
...
<form action=mesg2db.phtml method=post>
...
2.mesg2db.phtml:
<?header("location:$HTTP_REFERER");
?>
<?php
if($name&&$message){
$message=ereg_replace("\r\n\r\n","\n<p>",$message);
$db_link=mysql_connect() or die ("Prpblem to connecting db_message");
$query="insert into db_message (name,message,date,email) values ('$name','$message',now(),'$email')";
$result=mysql_db_query("mylab_city",$query,$db_link);
}