How to do this?

rbxlmadx

Member
Messages
32
Reaction score
1
Points
8
So let's say I have a link, example: http://www.google.com/index.php?Ads=12

(Not a real Lin, just for example), anyway, you see that twelve at the end? I want that twelve (the numeral) to be the thing I fetch from a table... So it would look like this in script:

http://www.google.com/index.php?Ads='$numbertwelve'

!!!!But!!!! I do not know how to fetch from a table so I simply can not make this happen, please someone, how can I fetch from a table so this function will work?
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
367
Points
83
Hi rbxlmadx,

In this situation, you could have a MySQL table containing all the data required. Then, you could retrieve the value of "ads" by using $_GET['ads'] in PHP, and pull the appropriate record from MySQL. ;)

Thank you,
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Code:
$id = $_GET['ads'];

//SANITIZE $id, and do something with it (call MySQL with PDO, etc)

That's pretty much all it is. How you're getting the records depends on a ton of factors.

Moved to Scripts & Third Party Applications
 
Top