我收到此错误:
致命错误:数组回调必须在第53行的C:\ xampp \ htdocs \ phpprojects \ plapp \ worker.php中包含索引0和1
我该如何解决这个问题?我在这里做什么出了什么问题?
$results = mysql_query("SELECT asin_link FROM work WHERE email=$w_email");
while($row = mysql_fetch_array($result)) {
$work_link = $row['asin_link'];
echo '<a href="'.$work_link.'" target="'.$work_link.'">Visit Work link<br></a>';
echo '<form action="" method="post">
ASIN Number: <input type="text" name="asin"><br>
<input type="submit" value="Submit" name="submit">
</form>';}
if (isset($_POST['submit'])) {
$asin = $_POST('asin');
$qu ="INSERT INTO work (asin, email, asin_link) VALUES ('$asin', '$w_email','$work_link')";
if (mysql_query($qu)) {
echo "Your ASIN was received! Thanks";
}
}
答案 0 :(得分:28)
更改此
$asin = $_POST('asin');
到
$asin = $_POST['asin'];