表单(操作)错误


A form (action) error

我有一个问题,我有一个页面和一个表单,我直接它自己编辑数据到数据库。我需要一种方法来使用的形式和重定向本身与action=editcinemas.php?cinema_id=影院ID

 <html>
<body>
<form name="form3" method="post" action="editcinemas.php"> //MY PROBLEM IS HERE I GUESS
    <td>
        <table>
        <?php
require('../classes/cinema_class.php');
$cinema=new cinema($_GET["cinema_id"]);
$cinemas = $cinema->get_all_cinemas();
foreach ($cinemas as $movie)
{
    $cinema_id = $movie['cinema_id'];
    $cinema_name = $movie['cinema_name'];
    $cinema_location = $movie['cinema_location'];
}
    echo "<input name='cinemaid' type='hidden' id='cinemaid' value=" . $cinema_id . '><br/>';
    echo "Cinema Name :";
    echo "<input name='cinemaname' type='text' id='cinemaname' value=" . $cinema_name . '><br/>';
    echo "Cinema Location :";
    echo "<input name='cinemalocation' type='text' id='cinemalocation' value=" . $cinema_location . '><br/>';
?>
</table>
<input type="submit" name="Edit" value="Edit">      <input type="reset" name="Reset" value="Reset"/><INPUT Type="button" VALUE="Back" onClick="history.go(-1);return true;">
</form>
</body></html>

<?php
$cinemaid=$_POST['cinemaid'];
$cinemaname=$_POST['cinemaname'];
$cinemalocation=$_POST['cinemalocation'];
if ($_POST) { 
if(empty($cinemaname)){  
echo  "Cinema Name is a must"; }
else{
$update_movie=mysql_query("UPDATE `memoire`.`cinema` 
                        SET `cinema_name`= '$cinemaname', `cinema_location`= '$cinemalocation' 
                        WHERE `cinema_id`='$cinemaid'");
if($update_movie)
{ header("Refresh: 0;url=../listallcinemas.php");}
else
{ echo "error in registration".mysql_error(); }
}
?>

只需添加它,像这样:

<form name="form3" method="post" action="editcinemas.php?cinema_id=<?php echo $_GET["cinema_id"]; ?>">