ToonMariner Posted July 12, 2007 Share Posted July 12, 2007 Hi guys, Sure this should be simple but I can't find any info on it. I need to use a set of header functions to emulate the submitting of a form using the post method. can't use url data in the header('Location: ....'); so I was someone could enlighten me as to how I could acheive sending 3 or 4 variable - value pairs to a specified url simply using a set of header() functions... thanks in advance.. Link to comment https://forums.phpfreaks.com/topic/59605-post-data-using-header/ Share on other sites More sharing options...
tapos Posted July 12, 2007 Share Posted July 12, 2007 u can use session to pass the variables. -- Tapos Pal Link to comment https://forums.phpfreaks.com/topic/59605-post-data-using-header/#findComment-296195 Share on other sites More sharing options...
mmarif4u Posted July 12, 2007 Share Posted July 12, 2007 if i get ur q correctly: header('Location: script.php?id=$id&name=$name&phone=$phone and so on...'); Also u can use session to pass variables. Link to comment https://forums.phpfreaks.com/topic/59605-post-data-using-header/#findComment-296199 Share on other sites More sharing options...
ToonMariner Posted July 12, 2007 Author Share Posted July 12, 2007 Sorry guys. The page to post to is on a different server so sessions won't help and I can't pass the data via the url. It has to appear as though the data had been posted via a form to the other site. I could redirect to a script on my site that auto submits a form but that requires javascript to be enabled and that is not always the case for some of the potential users... Link to comment https://forums.phpfreaks.com/topic/59605-post-data-using-header/#findComment-296233 Share on other sites More sharing options...
tapos Posted July 12, 2007 Share Posted July 12, 2007 if u can not use url n session to pass data, then u must use form and post method . -- Tapos Pal Link to comment https://forums.phpfreaks.com/topic/59605-post-data-using-header/#findComment-296242 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.