Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <form id="form1" name="form1" method="post" action="">
  2.  <p>
  3.    <label for="title">title</label>
  4.    <input type="text" name="title" id="title" />
  5.  </p>
  6.  <p>
  7.    <label for="game">game</label>
  8.    <input type="text" name="game" id="game" />
  9.  </p>
  10.  <p>
  11.    <label for="description">description</label>
  12.    <input type="text" name="description" id="description" />
  13.  </p>
  14.  <p>submit
  15.    <input type="submit" name="submit" id="submit" value="Submit">
  16.  </p>
  17.  <?php
  18. $Con = mysql_connect("localhost","mocha_wiki","muffins");
  19. if (!$Con)
  20. {
  21. die('Could not connect: ' . mysql_error());
  22. }
  23. mysql_select_db("mocha_PHP", $Con);
  24. if(isset($_POST['submit']))
  25. {
  26. mysql_query("UPDATE contacts SET Age = 15
  27. WHERE FirstName = Brandon AND LastName = Johnson");
  28. echo $_POST[description];
  29. }
  30. mysql_close($Con);
  31. ?>
  32. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement