Hello,
This is my case:
- In file abc.php, I have mentionned two other file as two tabs (tab1.php and tab2.php). Their links are: abc.php#tab1 and abc.php#tab2
- On tab2.php, I have a form:
<form action="" method="POST">
<select name="slot" id="slot">
<option value="1">
<option value="2">
<option value="3">
</select>
<input type="submit" value="Update" name="submit">
</form>
On abc.php, I place the update code:
<?php
global $wpdb;
if(isset($_POST['submit']))
{
$slot_new=$_POST['slot'];
$command = "UPDATE ab_slot SETslot
= '$slot_new' WHEREid
= 1";
$result = $wpdb->get_results($command);
echo "<p>Updated</p>";
}
?>
However, it don't work :(
And, how to do stay on abc.php#tab2 after click on Update button?
Please help me!