monkeybidz Posted July 10, 2008 Share Posted July 10, 2008 I have a form that is in http page, but needs to redirect to a secure page. Current code is like this: <form action="<?=$routeme?>" method="post" name="zipcodestuff" target="_self" id="zipcodestuff"> $routeme = "sell.php"; Link to comment https://forums.phpfreaks.com/topic/114023-redirect-to-https-from-http/ Share on other sites More sharing options...
trq Posted July 10, 2008 Share Posted July 10, 2008 Your question? / Problem? Link to comment https://forums.phpfreaks.com/topic/114023-redirect-to-https-from-http/#findComment-586030 Share on other sites More sharing options...
monkeybidz Posted July 10, 2008 Author Share Posted July 10, 2008 I need the form to go from an unsecure page to a secure page. Do I need to define the entire url like: $routme = "https://www.mysite.com/sell.php"; Link to comment https://forums.phpfreaks.com/topic/114023-redirect-to-https-from-http/#findComment-586033 Share on other sites More sharing options...
Guest Xanza Posted July 10, 2008 Share Posted July 10, 2008 Try integrating simple PHP redirection into your script... It's easy, and good to work with: <?php $links = array( "sell" => "sell.php" //http://site.com/redirect.php?r=sell ); header("Location:" . $links[$_GET['r']]); exit; ?> usage: <form action="http://site.com/redirect.php?r=sell" method="post" name="zipcodestuff" target="_self" id="zipcodestuff"> That should set you in the right direction. Link to comment https://forums.phpfreaks.com/topic/114023-redirect-to-https-from-http/#findComment-586035 Share on other sites More sharing options...
trq Posted July 10, 2008 Share Posted July 10, 2008 Do I need to define the entire url like Of course. Link to comment https://forums.phpfreaks.com/topic/114023-redirect-to-https-from-http/#findComment-586044 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.