DIsplay home page after submitting form?

newbie

New member
I am using dadabik 4.0 alpha. Everything seems to be working fine but I have noticed that whenever I submit information or edit already existing user information, I see the form again with a message on the top saying that the update was successful. What I would like to happen here is that the home page be displayed if the submission was successful. Is there a way to do this?
 

alpha2zee

Well-known member
What about adding this line
[pre]
header('Location:'.$site_url.$dadabik_main_file.'?table_name='.urlencode($table_name));
[/pre]
before the closing } in this block of code in case edit in index.php?
[pre]
if (isset($just_updated) && $just_updated == "1") {
//txt_out("<h3>".$normal_messages_ar["update_result"]."</h3>");
txt_out("<p>".$normal_messages_ar["record_updated"]."</p>");
}
[/pre]
If you set $insert_again_after_insert to 0 in config.php, then after inserting new record (not editing), you will be taken to the 'home' page.



Post Edited (11-27-05 18:44)
 
Top