I have a table called logtable, In side of logtable has two fields (id and password). the following is my coding:
<?php
session_save_path("session_data");
session_start();
session_register("id");
session_register("log_err");
?>
<?
$sql = "Select * From logtable where id=$in and password='$pwd'";
$rows = mysql_query( $sql );
$row = mysql_fetch_row($rows);
if ( $row )
$log_err = "Login Successfully!!";
$id=$row["id"];
echo $id;
else
$log_err = "Record has not found!!";
}
?>
after i put the id into session and try to display the value, however, the value of $id is always empty.. (ps. database has value for sure)
how can i get the value from table and put into session and display it??
thank you so much...