$Name = $_REQUEST["name"]; //It is preferred to use the Facebook Graph API -> User -> Name for this. $Date = date(DATE_RFC822); // Submit results to database // Edit the entries enclosed with < and > accordingly. $con = mysql_connect("localhost","jeric",""); if (!$con) { die('Your results were not recorded. Server connection error.'); } if (!mysql_select_db("", $con)) { die('Your results were not recorded. Database error.'); } $query = "INSERT INTO user (uid, date_entered,intuitive,rational,orient_others,orient_self,morality,pragmatic,follower,innovator) VALUES ('$Name','$Date', '$N', '$R', '$O', '$S', '$M', '$P', '$F', '$I')"; if (!mysql_query($query)) { die ('
Your results were not recorded. Couldnt submit data.'); } mysql_close($con);