behzad Posted February 22, 2008 Share Posted February 22, 2008 Hi there guys I have a website that I had created while ago. The site at one point jumps from non secure side to secure side, in transition the page will pass some form data with a help of JavaScript to automatically submit form. The client now has some issues with site, telling me some of his clients can not complete the pages and he like to change the JavaScript to php. The problem was the non secure side of the site (http) is not on the same place as the (https) therefore the session variables where impossible. I am thinking if there is a way of instead of using JavaScript use php to auto redirect. I appreciate any help Quote Link to comment Share on other sites More sharing options...
vicodin Posted February 22, 2008 Share Posted February 22, 2008 Store the variables in a db. Quote Link to comment Share on other sites More sharing options...
behzad Posted February 22, 2008 Author Share Posted February 22, 2008 I have stored many variables in the database before this point, but 2 of the variables gets posted to the secure side to collect those many other related variables. Quote Link to comment Share on other sites More sharing options...
vicodin Posted February 22, 2008 Share Posted February 22, 2008 Are you saying that non ssl is on 1 server and ssl is on a totally different server Quote Link to comment Share on other sites More sharing options...
behzad Posted February 22, 2008 Author Share Posted February 22, 2008 Yes apparently, according to the host and when I saw the sessions are different on http and https. Quote Link to comment Share on other sites More sharing options...
vicodin Posted February 22, 2008 Share Posted February 22, 2008 To pass anything to a totally different server you need to use curl... Iv never had to use this so i cant help you there but look up php and curl and see if that can help you Quote Link to comment Share on other sites More sharing options...
behzad Posted February 22, 2008 Author Share Posted February 22, 2008 I just read about it too. I have absolutely no idea what it is all about. How could I use this with the form that I have? The form has two hidden fields that should submit to https. Quote Link to comment Share on other sites More sharing options...
vicodin Posted February 22, 2008 Share Posted February 22, 2008 Iv never had to deal with ssl... which i could be more help but i cant... sorry Quote Link to comment Share on other sites More sharing options...
aschk Posted February 22, 2008 Share Posted February 22, 2008 Store your session information in the database. You're probably going ??? right now This should get you started http://www.developertutorials.com/tutorials/php/saving-php-session-data-database-050711/page1.html Quote Link to comment Share on other sites More sharing options...
behzad Posted February 22, 2008 Author Share Posted February 22, 2008 Thanks, I have all the variable values in the database. Like This: I save all variables and data in the DB and reference them with a variable "x" for retrieval. I sent "x" as post to https url address => url get the "x" value retrieves the exact data from DB => outputs all the info I put into it when I was in http session. Now remember the sessions are not the same on http and https (they are like two different machine I don't no) 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.