Trying to process a GET url like the following one :
http://www.example.com/process.php?response=3&responsetext=Invalid Username&authcode=0&transactionid=0&avsresponse=N&cvvresponse=N&orderid=test&type=a uth&response_code=300
I need the code that will do the following :
Thanks, P_
[man]parse_url/man
Whoww, I did not expect such a fast response, thank u very much. Since I am an absolute beginner with PHP, can you tell me the whole code , also with the various if , from the opening tag to the closing tag of this php file. P_
Following my previous post I am meaning to include the syntax to the get/define the variables from the URL and then the various if else . P_
no answer ?
parse_url() is the answer, what have you done since bradgrafelman gave it to you?
This is what I wrote :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head>
<body> <?php $_GET["response"];?> <?php if ($response=="1") { parse_url([url]http://www.lasrocaresort.com);[/url] if ($response=="2") parse_url(http://www.lasrocaresort.com/diving.html);
}else{ parse_url(http://www.lasrocaresort.com/resort.html); } ?>
</body> </html>
Ans it's giving me Parse error: syntax error, unexpected ':' in xxxxxxxxxxxxx/credomatic2.php on line 12
P_
every open { needs a close }
and you want header(Location: ... for redirecting the client
Hmmm, I feel such a noob , now I get another error :
<body> <?php $_GET["response"];?> <?php if ($response=="1") {parse_url("http://www.lasrocaresort.com);} if ($response=="2") {parse_url(http://www.lasrocaresort.com/diving.html);} else {parse_url("http://www.lasrocaresort.com/resort.html");} ?>
</body>
Parse error: syntax error, unexpected T_LNUMBER in /xxxxxxxxxxxxxredomatic2.php on line 12