include("webmaster/db.php"); session_start(); if($_POST["action"]=="validate"){ /*$objRS=mysql_query("select * from energyquiz_member_master where username='".$_POST["username"]."' and password='".$_POST["password"]."'"); echo mysql_error(); if(mysql_num_rows($objRS)!=0){ $objdata=mysql_fetch_array($objRS);*/ if($_POST["password"]=="energy4u") { $sqlInsert="Insert into energyquiz_member_master(member_id,username,email,total) values (null,'".addslashes($_POST["username"])."','".addslashes($_POST["email"])."','')"; mysql_query($sqlInsert); echo mysql_error(); $energyquizid=mysql_insert_id(); $_SESSION["energyquizid"]=$energyquizid; $_SESSION["validUser"]=$_POST["username"]; $_SESSION["Useremail"]=$_POST["email"]; header("location:quiz.php"); } else { $msg="Password required.For a password contact info@brucesullivan.com.au"; } } ?>