darantes Posted May 19, 2006 Share Posted May 19, 2006 Hi all !Let me see if anyone can help me with that. I spent hours and hours on this, but in the end, I abandoned cause I really think this has no solution. The whole thing is: * I have a login page;* I enter my username and password and click Login;* An ajax request queries the database to validate my login;* I receive the request response and, at this point, I deny the login or I grant it.* When granting the login, I call the next page and everything is ok, [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]unless if you want to send some variables to the next page.[!--colorc--][/span][!--/colorc--][!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]This is my blocking point[!--colorc--][/span][!--/colorc--]. The next page that is called when the login is well done I will need the user name, id, email, etc... My question is: How to send variables through POST or GET without submiting a form and thus reloading the page ?I tried to make another Ajax request to my next page, but it definitely makes no sense ! Also I thought using cookies would easily solve my problem, but I don't like the idea regarding that many users have cookies disabled on their browsers.I know it is possible to do because I see Gmail working like that ! But even tracking its login page java script source code, I didn't find out how they do it.One can say it is worthless because all this work will only prevent the page from reloading, and instead I could submit the form, but here my aim is to turn the pages every time more dynamic using new technologies and surely, giving the web a more beautiful look ;)Anyone have any idea ? Link to comment https://forums.phpfreaks.com/topic/10008-passing-parameters-using-java-script-to-another-php-and-open-it/ Share on other sites More sharing options...
nogray Posted May 25, 2006 Share Posted May 25, 2006 Have you tried domain.com/page.php?Var1=value&Var2=value2? This will send the variables as a get request. Also, you always can use sessions (in php) to store the data from one page to another. Link to comment https://forums.phpfreaks.com/topic/10008-passing-parameters-using-java-script-to-another-php-and-open-it/#findComment-38801 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.