Hi,
I've begun noticing something that many websites seem to have php code in their addresses. For example: http://www.questionablecontent.net/view.php?comic=1103 . http://www.questionablecontent.net/view.php must be the actual page. But the next part is the ?comic=1103 . I'm guessing that this code establishes "comic" as a variable with a value of 1103. But I have no idea how to get a page to reference that variable. And multiple websites do this, even this forum ( viewforum.php?f=1 ). Does anyone know how to do this? Thank you so much for your help.
--Aaron "Saib" Babcock, http://www.bwsab.com
Variables in the Site Address?
Moderator: General Moderators
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: Variables in the Site Address?
Bwsab wrote:Hi,
I've begun noticing something that many websites seem to have php code in their addresses. For example: http://www.questionablecontent.net/view.php?comic=1103 . http://www.questionablecontent.net/view.php must be the actual page. But the next part is the ?comic=1103 . I'm guessing that this code establishes "comic" as a variable with a value of 1103. But I have no idea how to get a page to reference that variable. And multiple websites do this, even this forum ( viewforum.php?f=1 ). Does anyone know how to do this? Thank you so much for your help.
--Aaron "Saib" Babcock, http://www.bwsab.com
$getComicVariable = $_GET['comic'];
Re: Variables in the Site Address?
Thank you so much! This was exactly what I was looking for!