I've followed every piece of advice (quotes, no quotes, $...) and nothing works. Here is the snippet of code that's generating the error. This woks fine in PHP 5, but I have to upgrade to 7. Warning if for line 71, which corresponds to where query3 starts.
if($numRows == 0) {
$query3 = "INSERT INTO comments (article_id, status, date_posted, feedback, visName, visEmail, notify) VALUES ('".$_POST[article_id]."', '0', NOW(), '$visFdbk', '$nameOfVis', '$emailOfVis', 'y');";
}else{
$query4 = "INSERT INTO comments (article_id, status, date_posted, feedback, visName, visEmail, notify) VALUES ('".$_POST[article_id]."', '0', NOW(), '$visFdbk', '$nameOfVis', '$emailOfVis', '');";
}
}
Earlier in code, I define this: $numRows = mysql_num_rows($r);
Thanks in advance for any help you can lend.