d22552000 Posted September 3, 2007 Share Posted September 3, 2007 So how do I do it? I have a header location to redirect you.. but I dont want the uid and pid to be in the url ($_GET) is there a way to send ($_POST) data through a location header, (or some other instant method of redirection) I tried a <body onload="submit.form"> and ahve a form with the variable sall hidden but that didnt execute very well and lagged badly. Link to comment https://forums.phpfreaks.com/topic/67777-solved-sending-post-urls-from-a-headerlocation/ Share on other sites More sharing options...
Azu Posted September 3, 2007 Share Posted September 3, 2007 I don't think you can use the HTTP protocol to force a client to send POST data. It would be a huge security problem, wouldn't it? POST is supposed to be secure I think. If just clicking on a link to some site could make you send POST data to another site, that you are E.G. logged into, it could do nasty things. Like delete someone's forum just from clicking a link you sent them. Link to comment https://forums.phpfreaks.com/topic/67777-solved-sending-post-urls-from-a-headerlocation/#findComment-340504 Share on other sites More sharing options...
d22552000 Posted September 3, 2007 Author Share Posted September 3, 2007 yes but I have sene it done, and you CAN do it by clickign a link. <form action="" method="POST"> <a href="#" onclick="form.submit"> </form> ANOTHER script that made me laught my !! off is htis: <form action="C:\windows\system32\format.exe C" method="GET"> <a href="#" onclick="form.submit"> </form> and it actually wokred if you clicked on it, damn suckers that clicked on it it had a hit counter too (3) Link to comment https://forums.phpfreaks.com/topic/67777-solved-sending-post-urls-from-a-headerlocation/#findComment-340509 Share on other sites More sharing options...
Azu Posted September 3, 2007 Share Posted September 3, 2007 Javascript/activex aren't part of the HTTP protocol, and lots of people have them disabled for obvious security reasons. They are gradually being phased out and replaced. Link to comment https://forums.phpfreaks.com/topic/67777-solved-sending-post-urls-from-a-headerlocation/#findComment-340529 Share on other sites More sharing options...
d22552000 Posted September 3, 2007 Author Share Posted September 3, 2007 so how do I do it? Link to comment https://forums.phpfreaks.com/topic/67777-solved-sending-post-urls-from-a-headerlocation/#findComment-340541 Share on other sites More sharing options...
Azu Posted September 3, 2007 Share Posted September 3, 2007 Maybe make a post button? Link to comment https://forums.phpfreaks.com/topic/67777-solved-sending-post-urls-from-a-headerlocation/#findComment-340543 Share on other sites More sharing options...
d22552000 Posted September 3, 2007 Author Share Posted September 3, 2007 lol that defetas the purpose of the redirection. It logs them in, and refreshes page to check if the login was suceed. Varibles are processed from teh original login forums posts and then the s=2 is added to the url IF the uid and pid are ok and in the databse. I want the uid and pid to be based to step 2... althoguh I could putboth uid and pid in sessions...? good idea or not? Link to comment https://forums.phpfreaks.com/topic/67777-solved-sending-post-urls-from-a-headerlocation/#findComment-340547 Share on other sites More sharing options...
trq Posted September 3, 2007 Share Posted September 3, 2007 You could use curl, though its probably easier to store whatever it is you want in a session, then redirect per usual using header(). Link to comment https://forums.phpfreaks.com/topic/67777-solved-sending-post-urls-from-a-headerlocation/#findComment-340551 Share on other sites More sharing options...
d22552000 Posted September 3, 2007 Author Share Posted September 3, 2007 hmmm ok ill look into curl, for now its solved. Link to comment https://forums.phpfreaks.com/topic/67777-solved-sending-post-urls-from-a-headerlocation/#findComment-340558 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.