Query Strings, how do you do it? |
Query Strings, how do you do it? |
![]()
Post
#1
|
|
![]() Mel Blanc was allergic to carrots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 ![]() |
I was wondering how you could make those url's that have a question mark and a few equal signs and such at the end of a url. I belive they are called query strings, right? How can I do it to like make a page go to a next page such as this where it has "?page=2". I know it has to something with PHP and I tried googling tutorials but I just don't understand. Can someone please explain how to do this like if I wanted to make the page go the second page using a simple HTML "a" tag? Thanks.
![]() |
|
|
![]() |
![]()
Post
#2
|
|
![]() Mel Blanc was allergic to carrots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 ![]() |
Could I also put PHP includes in there?
|
|
|
![]()
Post
#3
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrator Posts: 2,648 Joined: Apr 2008 Member No: 639,265 ![]() |
Could I also put PHP includes in there? Yes. You can put in any PHP code you want. However, you really should ask yourself why you're using the query string. If you're using it for, e.g., pagination in a blog, then good. But don't use the query string to specify wildly different pages (i.e., don't do something like "index.php?page=main", "index.php?page=about", etc. -- in other words, don't make one big "index.php" file that handles your entire site). |
|
|
![]() ![]() |