optikalefx Posted July 27, 2007 Share Posted July 27, 2007 Like i have an if statement that checks info from a database, basically a password. how would i write the goto webpage code? like i have if (pass == $pass_ { (some gotowebpage code) } Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted July 27, 2007 Share Posted July 27, 2007 use header here like: if (something){ header ('location: webpage.php')}; Hope this will help Quote Link to comment Share on other sites More sharing options...
optikalefx Posted July 27, 2007 Author Share Posted July 27, 2007 yea thats what i need, one other thing though I was using a form to and a submit button to go to the next page, basically you enter the password, the data gets sent to a php process page, and if the password was correct, it would display a continue button. well what ill use that code you gave me is to just go to the next page, but when i used the form, i was able to send a hidden variable. how can i still send the hidden variable? if ($mypass == "123456") { echo "<FORM METHOD='POST' ACTION='http://www.4tenproductions.com/jrlistpage.php'>"; echo "<INPUT type='hidden' name='table' value='JohnRobberts'>"; echo "<center>Correct<br>"; echo "<input type='submit' value='Continue'></form>"; } else if ... thats what i have and if i change it to ur code it becomes if ($mypass == "123456") { header ('location: http://www.4tenproductions.com/jrlistpage.php)}; so how do i send this variable echo "<INPUT type='hidden' name='table' value='JohnRobberts'>"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.