Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 118,659 PHP Programmers for FREE! Ask your question and get quick answers from experts. There are 861 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



index.php?page=download ?

 
Reply to this topicStart new topic

index.php?page=download ?, help

Vetle
post 1 Jul, 2008 - 11:55 AM
Post #1


New D.I.C Head

*
Joined: 27 May, 2008
Posts: 13

i can make pages like index.php but not like index.php?page=download

how can i make that work?
User is offlineProfile CardPM

Go to the top of the page


Martyr2
post 1 Jul, 2008 - 12:02 PM
Post #2


Programming Theoretician

Group Icon
Joined: 18 Apr, 2007
Posts: 4,649



Thanked 121 times

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions


The ?page=download part is a variable being passed to index.php. You don't create it as a page. What that URL is saying is pass a variable named "page" with the value "download" to the page index.php.

index.php will be able to access that variable using $_GET["page"] which will return the value "download".

Hope that clears things up for you. If you want to know a little more about the $_GET superglobal array I mentioned here you can check out the PHP manual for it at the URL...

PHP.net manual page for $_GET[]

Good luck. smile.gif
User is offlineProfile CardPM

Go to the top of the page

JBrace1990
post 1 Jul, 2008 - 12:16 PM
Post #3


D.I.C Regular

Group Icon
Joined: 9 Mar, 2008
Posts: 461



Thanked 20 times

Dream Kudos: 350
My Contributions


as an addition to what the genius Martyr2 said:

GET is effective to use because it allows people to bookmark pages... it also allows people to use text links to go to somewhere instead of submit buttons...

when using these methods though, you're basically coding several pages into one... it's just preference, really... sometimes I try to get as last pages as I can (i made 2 pages for a pokeplushies clone), but other people like to keep them seperated because it makes the actual code on the page smaller, and it's therefore easier to troubleshoot...

but like I said, it's preference and in the real world you'll find pages of both types... one example of using GET is Google... if you go there and search for something, you'll see variable pop into the URL bar, and you can bookmark the page or send it to a friend with the variable still intact...
User is offlineProfile CardPM

Go to the top of the page

Vetle
post 1 Jul, 2008 - 12:18 PM
Post #4


New D.I.C Head

*
Joined: 27 May, 2008
Posts: 13

thank u so much biggrin.gif
User is offlineProfile CardPM

Go to the top of the page

JBrace1990
post 1 Jul, 2008 - 12:55 PM
Post #5


D.I.C Regular

Group Icon
Joined: 9 Mar, 2008
Posts: 461



Thanked 20 times

Dream Kudos: 350
My Contributions


of course... just let us know if you have any other questions about it, and we'll be more then willing to help you =)
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/12/08 03:55AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month