gwdtjuh
04-15-2004, 05:57 AM
Hello (again),
When i'm on the admin page and i fill in my question and answers and i press the submit button he only seems to save the question where the answers remain the same.
This is what is used to save (srry it's in dutch):
function opslaan () //Create function save
{
$db = new database();
$db->uitvoeren("UPDATE vraag SET vraag='$_POST[vraag]' WHERE id='$_POST[id]'");
$db->uitvoeren("UPDATE antwoord SET antwoord='$_POST[antwoord]' WHERE id='$_POST[antwoord_id]'");
}
This is what is in my template for the answers:
<input type="HIDDEN" name="antwoord_id[]" value="<#id#>">
<input type="TEXT" name="antwoord" size="50" value="<#antwoord#>">
I think i have to do something with $_POST[antwoord_id] but i can't figgure out what.
manny thx in advance... hope u know more of php then me ;)
When i'm on the admin page and i fill in my question and answers and i press the submit button he only seems to save the question where the answers remain the same.
This is what is used to save (srry it's in dutch):
function opslaan () //Create function save
{
$db = new database();
$db->uitvoeren("UPDATE vraag SET vraag='$_POST[vraag]' WHERE id='$_POST[id]'");
$db->uitvoeren("UPDATE antwoord SET antwoord='$_POST[antwoord]' WHERE id='$_POST[antwoord_id]'");
}
This is what is in my template for the answers:
<input type="HIDDEN" name="antwoord_id[]" value="<#id#>">
<input type="TEXT" name="antwoord" size="50" value="<#antwoord#>">
I think i have to do something with $_POST[antwoord_id] but i can't figgure out what.
manny thx in advance... hope u know more of php then me ;)