The following is my coding:
<?php
session_save_path("session_data");
session_start();
session_register("ref_id");
session_register("log_err");
?>
<head>
</head>
<body>
<p>
<?php
include(".\include\connectTonedb.inc");
if ($HTTP_POST_VARS["btn_send"]!="") {
// select database
$sql = "Select * From referral where ref_id=$GvaUSER and ref_pwd='$GvaPWD'";
$result = mysql_query( $sql ) or die ("Invalid query");
$row = mysql_fetch_row($result);
$relative_url = "sagents-done.php";
if ( $row != NULL ) {
$log_err = "Login Successfully!!";
header("Location: http://localhost/T.one/sagents-done.php");
//header("Location:sagents-done.php");
}
else
$log_err = "Record has not found!!";
}
?>
<p></p>
<br>
Question 1:
I want to redirect another file after i login successfully, I tried two ways of headers (see the coding), both are not working at all, should i download header.inc file??
Question 2:
after login successfully, I want to make logid as session. I used mysql_fetch_row and mysql_fetch_arry methods both are not working at all, is there any sample code for me to look at?? Thank you.. Thank you so much...
balaburu