Jump to content

get variable out of a returned URL


jonnyfortis
Go to solution Solved by mac_gyver,

Recommended Posts

hello, i have a url returned from a payment centre and i need to use the information to make variables out of

 

for example

 

www.website.com/cancel.php?orderID=969&currency=GBP&amount=0%2E01&PM=&ACCEPTANCE=&STATUS=1&CARDNO=&ED=&CN=&TRXDATE=06%2F03%2F13&PAYID=719527322&NCERROR=&BRAND=&IP=86%2E130%2E167%2E99&SHASIGN=8D01371831130CFADEB12345678911391FD8332D6B

 

 

so i need the 

 

$orderID

$currency

$amount

 

etc....

 

how is this done?

 

thanks in advance

Edited by jonnyfortis
Link to comment
Share on other sites

Do you have error reporting turned on? If not, it would be wise to turn that on.

for one, you are missing semi colons. (';') on the echo's

 

and using var_dump() instead of echo is much better in cases like this.

Edited by DaveyK
Link to comment
Share on other sites

Do you have error reporting turned on? If not, it would be wise to turn that on.

for one, you are missing semi colons. (';') on the echo's

 

and using var_dump() instead of echo is much better in cases like this.

 

 

While it's a bad idea, it's perfectly valid syntax.

 

<?php echo 'foo' ?>
<?php echo 'bar' ?>

 

 

 

foobar
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.