taith Posted December 19, 2007 Share Posted December 19, 2007 does anyone know a way of php forcing POST data to be passed to the next page, without html output? Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/ Share on other sites More sharing options...
chigley Posted December 19, 2007 Share Posted December 19, 2007 Do you mean AJAX? Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418536 Share on other sites More sharing options...
Pancake Posted December 19, 2007 Share Posted December 19, 2007 $_SESSION['someSession'] = $_POST['someVal']; And use the $_SESSION['someSession'] on any future page. If you want to get rid of it: unset($_SESSION['someSession']); Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418540 Share on other sites More sharing options...
taith Posted December 19, 2007 Author Share Posted December 19, 2007 nope... php... so i can say <?force_post('name','value'); header("Location:;");?> and then on the new page, have $_POST[name]='value'; and no... not sessions... i wanna be able to go cross servers... Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418542 Share on other sites More sharing options...
haku Posted December 19, 2007 Share Posted December 19, 2007 If you want to be able to cross servers (or rather domains), you are probably going to have to use $_GET variables. Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418560 Share on other sites More sharing options...
taith Posted December 19, 2007 Author Share Posted December 19, 2007 i know you can $_POST cross servers... its just that i dont think sites (like paypal) would accept $_GET variables... i just trying to find a way to force them onto the next page... Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418564 Share on other sites More sharing options...
chigley Posted December 19, 2007 Share Posted December 19, 2007 cURL? Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418567 Share on other sites More sharing options...
taith Posted December 19, 2007 Author Share Posted December 19, 2007 cant use curl on paypal... i know curl can set its own post variables... but you cant say, set variable, and redirect there at the same time... Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418576 Share on other sites More sharing options...
chigley Posted December 19, 2007 Share Posted December 19, 2007 You keep using PayPal as an example.. what are you trying to do? Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418580 Share on other sites More sharing options...
taith Posted December 19, 2007 Author Share Posted December 19, 2007 paypal is just one example... i'm trying to shorten down my shopping cart system... so you "view cart" --> "billing info" --> "store billing info & redirect to paypal with form data(they require $_POST information(price, company, etc...))" Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418587 Share on other sites More sharing options...
taith Posted December 19, 2007 Author Share Posted December 19, 2007 i found a way around this (multiple form submissions(at the same time)) so this isnt of vital importance... i still would like to know/make an answer for this though :-) Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418684 Share on other sites More sharing options...
craygo Posted December 19, 2007 Share Posted December 19, 2007 you can always have it hidden then use a onclick command to submit it <form name=postform action="http://google.com" method=POST> <input type=hidden value="hello"> </form> <a href="javascript:document.postform.submit()">Hello</a> Ray Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418699 Share on other sites More sharing options...
taith Posted December 19, 2007 Author Share Posted December 19, 2007 the idea is to have it have a <form> submits to one page, stores the data into the session, and redirects to another page(paypal, etc...), however paypal needs its own $_POST data... if you redirect, it wont carry the first $_POST through to the next... :'( Link to comment https://forums.phpfreaks.com/topic/82342-forcing-_post-without-html/#findComment-418702 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.