Jump to content

Insert into fails


stijn0713

Recommended Posts

foreach (array_keys($_POST['cb'],'on') as $k) {
$query2 = "INSERT INTO deelname_respondent (respondent_id, groep_id, vergoeding, status_bevestigd) VALUES (%d, %d, %f, %d)"; 

		$id_respondent_on = $k;

		$bedrag_respondent_on = $_POST['bedrag'][$k];

		$email_respondent_on = $_POST['hf'][$k];

		$naam_respondent_on = $_POST['name'][$k];
$query2 = sprintf("$query2", $id_respondent_on, $_SESSION['gekozen_groep'], $bedrag_respondent_on, 0);

 

If i echo it out i get e.g.

 

INSERT INTO deelname_respondent (respondent_id, groep_id, vergoeding, status_bevestigd) VALUES (1, 88, 10,000000, 0)

INSERT INTO deelname_respondent (respondent_id, groep_id, vergoeding, status_bevestigd) VALUES (2, 88, 20,000000, 0)

 

Seems like it should get inserted?

the table name: deelname_respondent                                                    OK

column names: respondent_id, groep_id, vergoeding, status_bevestigd    OK

 

Link to comment
https://forums.phpfreaks.com/topic/265904-insert-into-fails/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.