0
我正在製作一個管理頁面,管理員可以爲特定電影和特定劇場添加節目。管理員可以添加節目,劇院名稱和電影名稱。輸出變量
這是一些代碼..
<?php
$showdatetime=$_POST['showdatetime'];
$movieid=$_POST['movieid'];
$theaterid=$_POST['theaterid'];
if(empty($showdatetime)){
echo "Show time is a must";
}
else
{
$querycinema=mysql_query("SELECT show.show_datetime, show.theater_id, show.movie_id, theater.theater_name, movie.movie_name FROM `show`
JOIN theater ON theater.theater_id = show.theater_id
JOIN movie ON movie.movie_id = show.movie_id
WHERE show.show_datetime='$showdatetime' AND show.theater_id='$theaterid' AND show.movie_id='$movieid' ");
$checkcinema=mysql_num_rows($querycinema);
if($checkcinema != 0)
{
echo "Sorry, ".$showdatetime." is already been scheduled for movie".$movieid." in theater ".$theaterid.".";
}
else
{
$insert_user=mysql_query("INSERT INTO `show` (show_datetime, movie_id, theater_id) VALUES ('$showdatetime','$movieid', '$theaterid')");
其工作正常,但我有
echo "Sorry, ".$showdatetime." is already been scheduled for movie".$movieid." in theater ".$theaterid."."; }
我需要一種方法來增加影片的名字和劇院名稱問題movieid和movieid選擇cz最好顯示管理員的名字不是劇院和電影的ID。
我希望這是明確的.. 謝謝
謝謝你...... :) – ouzoumzak 2013-04-29 16:17:43
@ouzoumzak沒問題:) – alexn 2013-04-29 16:17:52