...

View Full Version : write to database and go to url problem



elfeste
11-11-2006, 09:06 PM
I have a php script which will write data entered from a form into a database table.

However, what I want the script to do is to write the data and then goto a new webpage.

Does anyone know the code to finish the script and allow the new page to be loaded into the browser?

TIA:)

goughy000
11-11-2006, 09:31 PM
<?php
// do database stuff


// this will send the user to example.com
header("Location: http://example.com");
?>


make sure theres no output at all on the page otherwise you will get "header already sent" errors

output includes whitespace before or after the <?php and ?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum