Need Help With ?id=0&videos=0

I want to create a page like whatever.php?id=0&videos=0 but when I use notepad it wont save any help please. Am I using it correctly please help Im a begginer.

u wanna create a file called “whatever.php?id=0&videos=0” ?

thats not possible the file has to be called “whatever.php”. then u are able to view it throug the browser with http://domain/whatever.php?id=0&videos=0 and inside the script $_GET[‘id’] is set to 0 and $_GET[‘videos’] is set to 0 as well.

Thanks but do you have a link that explains more in detail?

I will try to clear this up a little better for you.

When you see this sort of thing in a url its put there by a link or some other way. Not by a file. For example:

Click Me
The file name is actually called whatever.php. You add on the ?id=0&video=0 part in the link only.

Now to retrieve these values you would want to use -

$_GET[’’]; Example: $id = $_GET[‘id’];

In this case: $id now would be equal to 0

Hope this helps. If you have more questions do a search for $_GET[’’]

edit: wrong topic

I put this:
$id = $_GET[‘id’];

In a .php file right?

But the thing is I want a page that is separated into sections the example I want to use is this site

how can i do that like have each id and stuff into different pages; look make different #'s for id=611 youll see

I appreciate your help thanks

i most cases u have a MySQL database and fetch the row with that id.

and then u can display the content that is in the other fields.

[php]mysql_qery( ‘SELECT * FROM urtable WHERE id=’.intval($_GET[‘id’]) );[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service