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) } Link to comment https://forums.phpfreaks.com/topic/61972-is-there-a-way-to-tell-php-to-go-to-a-webpage/ 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 Link to comment https://forums.phpfreaks.com/topic/61972-is-there-a-way-to-tell-php-to-go-to-a-webpage/#findComment-308584 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'>"; Link to comment https://forums.phpfreaks.com/topic/61972-is-there-a-way-to-tell-php-to-go-to-a-webpage/#findComment-308592 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.