Prevent blank page after PHP input?

LuDaCriS66

Platinum Member
Nov 21, 2001
2,057
0
0
Okay, I have a simple little form on a web page that takes in user input using this simple PHP file and inserts it into a mysql database.

Whenever I input some data and hit the submit button, I get taken to a blank page. Therefore I have to hit the back button on the browser to get back to the webpage.

My quesiton is, how would I prevent it from just going to a blank page? Or basically, how can I make it so that I won't get this dead-end in my site
 

bontu

Member
Jan 14, 2000
182
0
76
well you can have that code redirect to another page afterward.

or include the code in another webpage if it recieved any arguments then itll store the information. so you have the form submit to that webpage instead of the blank.
 

LuDaCriS66

Platinum Member
Nov 21, 2001
2,057
0
0
Would you happen to know what the code is for it to automatically re-direct to a certain page?

Perhaps if there is a code to time it as well? For example, set it to re-direct after 3 seconds or so?
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
you send a header that says to go to a different location:

header("location: $url\r\n");

the \r\n are important.