Contact Jan Thomas Consulting

September 4, 2007

Use php to pass parameters in the url

Filed under: Programming Techniques — jan @ 11:57 am

I want to pass the parameter topic on the url like this:

http://www.cycsf.org/eventdetails.php?topic=1

Here’s how it can be done in php:

if (isset($_GET['topic']))
$topic_id = (get_magic_quotes_gpc()) ? $_GET['topic'] : addslashes($_GET['topic']);
else
$topic_id = ””;

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress