Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paypal PDT Return URL Parsing

Status
Not open for further replies.

Matt1998

Programmer
Nov 6, 2005
1
IE
Hiya, I'm really stumped :/

I have managed to grab the PDT paypal return URL (this could be any url with many query strings contained) - here is a sample of one i'm having problems with, but could be any URL with random names & values:-


Ok, now that's a bit of a mouthful and i can decode it etc... format it etc... but i'm having a nightmare being clever with it! - I want to dynamically add this to a database... the problem is this >>>item_number=<<< there can be multiple items (i.e. item_number1=) and corresponding descriptions with the same naming conventions.

I need to be able to dynamically write fields that *don't* currently exist into a database from the returned data and i'm lost how to do it... there could be 10+ items brought and paypal throws very weird data back so i want the database to be able to go (in pseudo code)

'split all the names and their variables - or make the name into a variable and assign it its value.

'add this data to a database

'if field does not exist then add it and the corresponding value

that's it!

I've tried a few while loops of the net but i think they've been .net ones...

Help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top