SHARE
TWEET

Untitled

a guest Jul 20th, 2017 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $dbhost = 'localhost';
  3. $dbuser = 'evohans_facebook';
  4. $dbpass = 'mother123';
  5.  
  6. $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die                      ('Error connecting to mysql');
  7.  
  8. $dbname = 'evohans_app1';
  9. mysql_select_db($dbname)  or die
  10. ('Error choosing table');
  11.  
  12. $friendid="123";
  13.  
  14.  
  15. if(!isset($_POST['submit']) OR $check=false){
  16.  
  17. include ("form.php");
  18. }
  19.  
  20.  
  21. $noun=$_POST['noun'];
  22. $verb=$_POST['verb'];
  23. $adjective=$_POST['adjective'];
  24. $date=date('Y-m-d');
  25. $rating=$_POST['rating'];
  26. $occupation=$_POST['occupation'];
  27. $place=$_POST['place'];
  28. $verbed=$_POST['verbed'];
  29. $verbing=$_POST['verbing'];
  30. $nounplural=$_POST['nounplural'];
  31. $emotion=$_POST['emotion'];
  32.  
  33.  
  34. if(isset($_POST['submit'])) {
  35. 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)) {
  36. $check=false;
  37. echo "Please fill out the form completely.";
  38. }
  39. else {
  40.  }
  41.  
  42. }
  43.  
  44.  
  45. if($check=true && isset($_POST['submit'])){
  46. mysql_query("INSERT INTO mad_user (uid, noun, verb, adjective, date, rating, occupation, place, verbed, verbing, nounplural, emotion)
  47. VALUES ('$friendid', '$noun', '$verb', '$adjective', '$date', '$rating', '$occupation', '$place', '$verbed', '$verbing', '$nounplural', '$emotion') ")  or die(mysql_error());
  48. echo "form complete";
  49.  
  50. }
  51. else { echo "FILL THE FORM"; }
  52. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top