Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dbhost = 'localhost';
- $dbuser = 'evohans_facebook';
- $dbpass = 'mother123';
- $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
- $dbname = 'evohans_app1';
- mysql_select_db($dbname) or die
- ('Error choosing table');
- $friendid="123";
- if(!isset($_POST['submit']) OR $check=false){
- include ("form.php");
- }
- $noun=$_POST['noun'];
- $verb=$_POST['verb'];
- $adjective=$_POST['adjective'];
- $date=date('Y-m-d');
- $rating=$_POST['rating'];
- $occupation=$_POST['occupation'];
- $place=$_POST['place'];
- $verbed=$_POST['verbed'];
- $verbing=$_POST['verbing'];
- $nounplural=$_POST['nounplural'];
- $emotion=$_POST['emotion'];
- if(isset($_POST['submit'])) {
- if((!isset($noun)) OR (!isset($verb)) OR !isset($adjective) OR !isset($rating) OR !isset($occupation) OR !isset($place) OR !isset($verbed) OR !isset($verbing) OR !isset($nounplural) OR !isset($emotion)) {
- $check=false;
- echo "Please fill out the form completely.";
- }
- else {
- }
- }
- if($check=true && isset($_POST['submit'])){
- mysql_query("INSERT INTO mad_user (uid, noun, verb, adjective, date, rating, occupation, place, verbed, verbing, nounplural, emotion)
- VALUES ('$friendid', '$noun', '$verb', '$adjective', '$date', '$rating', '$occupation', '$place', '$verbed', '$verbing', '$nounplural', '$emotion') ") or die(mysql_error());
- echo "form complete";
- }
- else { echo "FILL THE FORM"; }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement