Hi,
I have a script that takes the form contents and inserts into the MySQL database. The form elements are written out dynamically via PHP. The form looks like this:
<form... etc.>
<input type="text" name="edu[]" />
<input type="text" name="edu[]" />
<input type="text" name="edu[]" />
</form>
On the page that processes the form, my script looks like:
$v = $_POST['edu'];
$del5 = mysql_query("Delete From new_resume_education Where resume_id = '$res_id'");
if ($v!=""){
foreach ($v as $v => $valuev) {
if ($valuev!="") {
$sqlv = "insert into new_resume_education(new_education_id, resume_id, new_education)
values('NULL', '$res_id', '".addslashes($valuev)."'";
$resultv = mysql_query($sqlv);
}
}
}
Unfortunately it is not working...it simply ignores the $valuev so no records are added to the DB. If anyone has any ideas I would be very grateful.