I am getting this error:
Fatal error: Array callback has to contain indices 0 and 1 in C:\xampp\htdocs\phpprojects\plapp\worker.php on line 53
How can I solve that problem? What's wrong with what I am doing here?
$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";
}
}
change this
$asin = $_POST('asin');
to
$asin = $_POST['asin'];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With