I am trying to send two arguments (textbox&value in checkbox) using form with specific row id
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['datef'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
$idw=$row['id'];
}
echo "</table>";
echo " </br>";
echo "<form action=\"checked.php\" method=\"POST\" enctype=\"multipart/form- data\" >";
echo "<input type=\"text\" name=\"ids\" value=\"$idw\" ><br>";
echo "<input type=\"checkbox\" name=\"check\" value=\"0\" ><br>";
echo "<p><input name=\"submit\" type=\"submit\" value=\"submit\" /></p>";
echo "</form>";
checked.php :
$idw=$_GET['ids'];
$check=$_GET['check'];
echo $idw;
echo $check;
if ($check==1){
$sql="UPDATE image_try SET checked=1 WHERE id=$idw";
$q=mysql_query($sql);}
the problem that checked.php did not receive the arguments from the form
Your form action is set to post and your checked.php is looking for GET values. Either change your form action to GET or change your variables in checked.php to $_POST