Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
2,394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?php
  2. $conn = mysqli_connect("xxx", "xxx", "xxx") or die('Could not connect: ' . mysqli_connect_error());;
  3. mysqli_select_db($conn, "xxx") or die('Could not connect: ' . mysqli_connect_error());;
  4. ?>
  5. <html>
  6. <head>
  7. <title>test</title>
  8. </head>
  9.  
  10. <body>
  11. <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST">
  12. <select id="Activ" name="Activ">
  13. <option value="1">Activ</option>
  14. <option value="0">Inactiv</option>
  15. </select>
  16. <input type="submit">
  17. </form>
  18. <?php echo $_POST['Activ'];
  19. mysqli_query($conn, "UPDATE useri SET Activ = '". $_POST['Activ'] ."'");
  20. echo "Succes!";
  21. ?>
  22. </body>
  23. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement