Variables
Posted: Mon Aug 20, 2007 3:26 am
Hi There,
Im an absolute beginner when it comes to programming.
I am trying to write a function, but I wouldn't know where to start.
Essentially I have a database with a table named: products_order_links
within that table is a field called: paydotcomlink
What happens is that users submit a link, in which we have strip it down to its essential and reuse it for another function.
In all cases, people will enter code like this into the paydotcomlink field
<a href="https://paydotcom.com/sell.php?id=10533" target="_blank"><img border="0" src="https://www.paypal.com/en_US/i/btn/x-cl ... c.gif"></a>
What i wanna do is just strip down that code so that i only get the id "10533" and save it as a variable so i can reuse it elsewhere. Obviously, the ID changes everytime, so it is not always 10533 - which is why I need to save it as a variable.
Any suggestions?
Im an absolute beginner when it comes to programming.
I am trying to write a function, but I wouldn't know where to start.
Essentially I have a database with a table named: products_order_links
within that table is a field called: paydotcomlink
What happens is that users submit a link, in which we have strip it down to its essential and reuse it for another function.
In all cases, people will enter code like this into the paydotcomlink field
<a href="https://paydotcom.com/sell.php?id=10533" target="_blank"><img border="0" src="https://www.paypal.com/en_US/i/btn/x-cl ... c.gif"></a>
What i wanna do is just strip down that code so that i only get the id "10533" and save it as a variable so i can reuse it elsewhere. Obviously, the ID changes everytime, so it is not always 10533 - which is why I need to save it as a variable.
Any suggestions?