daily pastebin goal
73%
SHARE
TWEET

Untitled

a guest Apr 9th, 2015 245 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php ob_start();
  2.  
  3. $con = mysql_connect("localhost","lipedns_jq","pass");
  4.  
  5. if (!$con)
  6.   {
  7.   die('Could not connect: ' . mysql_error());
  8.   }
  9.  
  10. mysql_select_db("lipedns_jq", $con);
  11.  
  12. if ($_POST['checkvalue']!='false') $checkvalue = $_POST['checkvalue'];
  13. else $checkvalue = 0;
  14. if ($_POST['check']=="true" || $_POST['check']=="on" || $_POST['check']=="checked"  ) $check = 1;
  15. else $check = 0;
  16.  
  17.  
  18. $qstring="UPDATE test_autosave SET name = '".$_POST["name"]."' ,";
  19. $qstring .= " email = '".$_POST["email"]."',";
  20. $qstring .= " textarea = '".$_POST["textboxarea"]."',";
  21. $qstring .= " selectfield = '".$_POST["selectfield"]."',";
  22. $qstring .= " checkbox = ".$check.",";
  23. $qstring .= " radio = '".$_POST["radios"]."',";
  24. $qstring .= " checkbox = '".$check."',";
  25. $qstring .= " checkboxvalue = '".$checkvalue."'";
  26. $qstring .= " WHERE id =".$_POST['id']."";
  27. echo $qstring;
  28. mysql_query($qstring);
  29.  
  30.  
  31. $return_loc = "autosave_demo2.php";
  32. //header("Location: ".$return_loc);
  33.  
  34. mysql_close($con);
  35. ob_end_flush(); ?>
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