I am novice at sql and continue to having trouble in inserting data from a php form to the database.
All I get is a blank page rather than the page going to login page.
In addition the data is not being stored into the database. This is the script I am using:-
<?php
// Check Username code to be introduced
if (@$userName != "") {
include ("serverdtl.php")// Server Details
@$reGdate = date("d-m-y");
@$logDate = mktime("d-m-y-H-i-s");
@$regIP = getenv("REMOTE_ADDR");
@$logiNip = getenv("REMOTE_ADDR");
@$loginnUmber = count($loginnUmber++);
session_start();
//add member details
$connect = mysql_connect($host,$user,$password) or die ("Unable to connect to server!");
$db = mysql_select_db($database);
$sql = "INSERT INTO Auth_members (userName, emalAdd, password, reGdate, regIp,paymPr,valMem,logDate,logiNip,loginnUmber) VALUES ('@$userName',@$emailAdd','@$password','@reGdate', '@$regIp','@$paymPr','@$valMem', '@$logDate','@$logiNip','@$loginnUmber')";
mysql_query($sql);
mysql_close();
echo "
Member Created ! </p>";
header ("Location:
http://www.mysite.com/Memcon/Login.php");
exit;
}
?>
Please tell me what am I doing wrong?