Page 1 of 1

header??

Posted: Tue Jul 01, 2003 10:23 am
by TLPD
i've this code (insert.php)
<?
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($dbname) or die("Unable to select database");

$query="INSERT INTO diemhk4 VALUES ('','$ten','$mssv','$ctdl','$dientu','$ktso','$ltdt','$toanrr','$cnxh','$anhvan','$pptinh','$thuchanh')";
mysql_query($query);
mysql_close();
$tr_url="http://localhost/hocphp/diemhk/add.html";
header("Location : $tr_url");
exit();
?>
i want that when i just finish input database at add.html ( this file is used to input data and then it 'll call insert.php file) it'll come back the add.html file to input again
but the code above didn't work although it inputs data successful

Posted: Tue Jul 01, 2003 10:54 am
by Wayne
try

Code: Select all

header("Location: $tr_url");

Posted: Tue Jul 01, 2003 9:05 pm
by TLPD
it's the same my code. but i don't understand why it couldn't work

Posted: Wed Jul 02, 2003 3:26 am
by Wayne
fussy about spaces, is it working now?