53329 Posted April 10, 2008 Share Posted April 10, 2008 I know you can easily add GET variables to something like include or file() but what about POST variables? I need to include a file but I also need to submit post variables when I do so. Is there an easy way to do this? Link to comment https://forums.phpfreaks.com/topic/100422-file-contents-with-post-variables/ Share on other sites More sharing options...
awpti Posted April 10, 2008 Share Posted April 10, 2008 <form action="/index.php?my_get_var=value"> No need to mix and match you could always use $_REQUEST instead of GET/POST. Link to comment https://forums.phpfreaks.com/topic/100422-file-contents-with-post-variables/#findComment-513602 Share on other sites More sharing options...
53329 Posted April 10, 2008 Author Share Posted April 10, 2008 I know what you're saying but my problem is that I have a dynamic file that generates different values based on post variables. You cannot substitute a $_GET for $_POST and get the same result server side. I read about curl functions that do this but I can't seem to get them to work. Link to comment https://forums.phpfreaks.com/topic/100422-file-contents-with-post-variables/#findComment-513618 Share on other sites More sharing options...
uniflare Posted April 10, 2008 Share Posted April 10, 2008 i think this is what you want: http://blog.mypapit.net/2006/02/sending-http-post-with-php-curl.html Link to comment https://forums.phpfreaks.com/topic/100422-file-contents-with-post-variables/#findComment-513621 Share on other sites More sharing options...
53329 Posted April 10, 2008 Author Share Posted April 10, 2008 Perfect, I owe ya one. Link to comment https://forums.phpfreaks.com/topic/100422-file-contents-with-post-variables/#findComment-513629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.