Page 1 of 1

do i have to have curl installed?

Posted: Thu Jan 19, 2012 7:21 am
by chopficaro
i am trying to make a redirect post request in php
i dont have direct access to the server, so i cant install things
this is such a simple thing, isnt there a way to do this without curl or httprequest extensions installed?

Re: do i have to have curl installed?

Posted: Thu Jan 19, 2012 8:21 am
by Eric!
What is a redirect post request? Posting and redirecting are different things. Are you just trying to redirect the browser to another URL?

header("Location: http://domain.com/newurl.html");

Re: do i have to have curl installed?

Posted: Thu Jan 19, 2012 12:29 pm
by chopficaro
when the user clicks on a button i want php to make a decision based on variables and then visit a link with post variables

Re: do i have to have curl installed?

Posted: Thu Jan 19, 2012 1:57 pm
by califdon
chopficaro wrote:when the user clicks on a button i want php to make a decision based on variables and then visit a link with post variables
You do realize that by the time the user can see a web page, PHP is no longer in the picture; it is a server side language, is interpreted by the web server before anything is sent to the browser and there is no PHP code remaining. A user's actions can only be detected by a client side language, such as Javascript.

Re: do i have to have curl installed?

Posted: Thu Jan 19, 2012 2:04 pm
by chopficaro
wtf i am so stupid

Re: do i have to have curl installed?

Posted: Thu Jan 19, 2012 3:11 pm
by califdon
Nah, it's a common mistake. You get focussed on something and miss the obvious.