Hello guys,
I have a really frustrating problem? My script is something like that:
if (isset($_POST[‘addrecords’])) {
//DISPLAYING SOME CONFIRMATION, ADDING SOME COMMENTS ETC
redirect(script.php?action=show&data_id=”.$data_id.””);
}
if ($action == “edit”) {
echo “<form name=’myform’ method=’post’ enctype=’multipart/form-data’>”;
echo “<input type=’text’ name=’data_id’ value=’$data_id’>”;
echo “<input type=’text’ name=’data_name’ value=’$data_name’>
<input type=’submit’ name=addrecords’ value=’Save’ class=’button’>
</form>”;
}
if ($action == “add”) {
echo $_POST[‘data_id’];
echo $
//INSERTING $_POST[‘data_id’] and $
}
I first edit the form ($action == “edit”) then i’m redirected to $_POST[‘addrecords’] and then when I confirm some things, script redirects to $action == “add” where I insert the records to database.
The problem is when i try to insert do database values $_POST[‘data_id’] and $
Laura?