How to check the value of the database requested in the input?
$before=$_POST['before']; $after=$_POST['after']; if(!empty($before) && !empty($after)){ $query2 = mysql_query("UPDATE mytabl SET source='$after' WHERE source=$before "); $result= mysql_query("SELECT source FROM mytabl WHERE source='$before'"); ?> <pre> <?php echo $result; $r=mysql_fetch_assoc($result); print_r($r); ?> displays Resource id # 5