管理者が特定の映画や特定の劇場のショーを追加できる管理ページを作成しています。管理者は、ショー、劇場名、映画名を追加できます。
これはコードの一部です..
<?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."."; }
選択した劇場IDと映画IDに映画名と劇場名を追加する方法が必要です.管理者に劇場と映画のIDではなく名前を表示することをお勧めします.
私はそれが明確であることを願っています..ありがとう