How could I essentially add multiple _POST values to my below statement.
- $sql = "INSERT INTO emails (emailaddress) // starting action
- VALUES ('".$_POST['email']."')"; // I would like to add more values to send here
How could I essentially add multiple _POST values to my below statement.
- $sql = "INSERT INTO emails (emailaddress) // starting action
- VALUES ('".$_POST['email']."')"; // I would like to add more values to send here
收起
foreach($_POST as $emailaddress){
$sql = "INSERT INTO emails (emailaddress) VALUES (" . $emailaddress . ")";
// Execute query here.
}
报告相同问题?