Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $conn = mysqli_connect("xxx", "xxx", "xxx") or die('Could not connect: ' . mysqli_connect_error());;
- mysqli_select_db($conn, "xxx") or die('Could not connect: ' . mysqli_connect_error());;
- ?>
- <html>
- <head>
- <title>test</title>
- </head>
- <body>
- <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST">
- <select id="Activ" name="Activ">
- <option value="1">Activ</option>
- <option value="0">Inactiv</option>
- </select>
- <input type="submit">
- </form>
- <?php echo $_POST['Activ'];
- mysqli_query($conn, "UPDATE useri SET Activ = '". $_POST['Activ'] ."'");
- echo "Succes!";
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement