Electronic ASEAN Food Composition Database
Thank you for log in | ||
$sid = $_SESSION["ss_id"]; if( !session_is_registered("txtName") || !session_is_registered("txtlname") || !session_is_registered("txtOffice") || !session_is_registered("txtContact") || !session_is_registered("txtEmail") ) { session_register("txtName"); $_SESSION["txtName"] = $_POST["txtName"]; session_register("txtlname"); $_SESSION["txtlname"] = $_POST["txtlname"]; session_register("txtOffice"); $_SESSION["txtOffice"] = $_POST["txtOffice"]; session_register("txtContact"); $_SESSION["txtContact"] = $_POST["txtContact"]; session_register("txtEmail"); $_SESSION["txtEmail"] = $_POST["txtEmail"]; } connectdb() ; $sql="select * from reg_users where id='$sid' and fileid='$fdl' "; $result=mysql_query($sql); $num=mysql_num_rows($result); $row = mysql_fetch_array($result); if($num>0) { $row[countdl]; $count = $row[countdl] + 1; $sql="update freebooks set countdl=$count where id='$sid' and fileid='$fdl' "; $result=mysql_query($sql) or die(mysql_errno()." ".mysql_error()); if ($result) { include("inc_s1.php"); } } else { $count = 1; $sql="insert into freebooks set id='$sid', name='" .$_SESSION["txtName"] . "', lname='" .$_SESSION["txtlname"] ."', country='" .$_SESSION["txtOffice"] ."', occupation='" .$_SESSION["txtContact"] ."', email='" .$_SESSION["txtEmail"] ."', countdl=$count, fileid='$fdl' "; $result=mysql_query($sql) or die(mysql_errno()." ".mysql_error()); if ($result) { include("inc_s1.php"); } } ?> |
(Last update: 23 February 2014 11.30 AM)