avilable在庫数のドロップダウンメニューリストを作成したいと思います。これは今まで私が行ったコードですが、まったく動作しません。このエラーが表示されます:PHPを使用したドロップダウンメニューリスト
Parse error: syntax error, unexpected 'basket' (T_STRING), expecting ',' or ';'
<?php
include("db.php");
//create a variable called $pagename which contains the actual name of the page
$pagename="Product Information";
//call in the style sheet called ystylesheet.css to format the page as defined in the style sheet
echo "<link rel=stylesheet type=text/css href=mystylesheet.css>";
//display window title
echo "<title>".$pagename."</title>";
//include head layout
include ("headfile.html");
echo "<p></p>";
//display name of the page and some random text
echo "<h2>".$pagename."</h2>";
//retrieve the product id passed from the previous page using the $_GET superglobal variable
//store the value in a variable called $prodid
$prodid=$_GET['u_prodid'];
//echo "<p>Selected product Id: ".$prodid;
//query the product table to retrieve the record for which the value of the product id
//matches the product id of the product that was selected by the user
$prodSQL="select prodId, prodName, prodPicName,
prodDescrip , prodPrice, prodQuantity from product
where prodId=".$prodid;
//execute SQL query
$exeprodSQL=mysql_query($prodSQL) or die(mysql_error());
//create array of records & populate it with result of the execution of the SQL query
$thearrayprod=mysql_fetch_array($exeprodSQL);
//display product name in capital letters
echo "<p><left><b>".strtoupper($thearrayprod['prodName'])."</b></left>";
echo "<p><img src=images/".($thearrayprod['prodPicName']).">";
echo "<p><left>".($thearrayprod['prodDescrip'])."</left>";
echo "<br>";
echo "<br>";
echo "GBP<left> ".($thearrayprod['prodPrice'])."</left>";
echo "<br>";
echo "<br>";
echo "Number in stock:<left> ".($thearrayprod['prodQuantity'])."</left>";
//display form made of one text box and one button for user to enter quantity
//pass the product id to the next page basket.php as a hidden value
echo "<form action="basket.php" method=post>";
echo "<p><span style="text-align: center";>Enter required Quantity: ";
echo '<select name="options">';
for($i=1; $i<=4; $i++)
{
echo "<option value=".$i.">".$i."</option>";
}
echo '</select>';
echo "<input type=hidden name=h_prodid value=".$prodid.">";
echo "<input type=submit value='Add to Basket'>";
echo "</span>";
echo "</form>";
//include head layout
include("footfile.html");
?>
送信ボタンは 'for()'ループ内にあってはなりません。 – Barmar
ループの後に ''もありません。 – Barmar
あなたは ''と一致するものがなく、