Tom
Tom

Reputation: 141

Why is my $_get not setting the variable to anthing?

I am working on a site and I am passing a variable through a url but my $_get isn't picking up the variable. Here is an example link : http://www.testbench.x10.mx/?voucher=4df97e819f8dc2aa62557410d2c40ce9&ticketid=7006133

and here is my code using $_get

$code = ($_get["ticketid"]);

Can someone explain what I did wrong, or if I didn't do something wrong just tell me that something else in the code must be interfering.Thank you, Thomas

Upvotes: 0

Views: 59

Answers (2)

Charming Prince
Charming Prince

Reputation: 487

use it this way:

$code = $_GET['ticketid'];

that way the php software will understand what you doing?

Upvotes: 0

Vikk
Vikk

Reputation: 3363

user $_GET instead of $_get

Upvotes: 5

Related Questions