When a user browses visits my page, some PHP script in a PHP file is executed when they click on a button. I then want them to be taken to a different PHP file when they click on this, how can I do this?
are you trying to pass information along or just having it go to a new page?
Actually both 🙂 In one instance I'm passing information along and want to be taken to that PHP file and then on one of the other pages, I just actually want to go to a php file
<form name=\"name\" method=\"post\" action=\"yourPhpFileHere.php\"> <input type="submit" value="submit"> </form>
you can pass data if you need to -- i do it with hidden fields -- but you have to have your variables set up to do that.
Thats not what I mean. I have one PHP file, that needs to pass to another one. without any HTML
guigrrl has given you the answer. Set the action attribute of the form to the filename of that other PHP file.
markyoung1984 wrote:Thats not what I mean. I have one PHP file, that needs to pass to another one. without any HTML
I think you are asking how to do a redirect after you finish processing the posted data?
header("Location: http://www.example.com/"); / Redirect browser /
http://us3.php.net/manual/en/function.header.php