Jump to content

?= pages


topflight

Recommended Posts

How can I make pages so that it the url is like ?=. Also is their a big reason why I should or shouldn't do that? Becuase in the futrure I want to make profile pages so that users can view their profile and I know in order to do that  I need to have ?= correct. So suggestions are welcome.

 

 

 

Thanks in Advanced

 

Link to comment
https://forums.phpfreaks.com/topic/128212-pages/
Share on other sites

Well in order to create a profile page for each user is that what I need to use?

 

All that you really need to use is their unique identifier whether it be their ID, name, email etc. because that's what you'll need to use to look up that person in the DB and pull out their information.  Thorpe has an excellent example that uses basic concepts for you to use.  :D

Link to comment
https://forums.phpfreaks.com/topic/128212-pages/#findComment-664060
Share on other sites

Great example thorpe. What I am currious is about some links has www.mysite.com/?=seahub what does that question mark mark and equal mark means. And is it a good think for use? Also if I do create that will I have to create less pages?

 

 

(i.e I have 4 rosters one for group A,B,C,D) Each group has a a certain amount of members in that group now inorder to show the roster for that indivual group will I have to create a whole new page or just use ?= and it will create and only show members in that certain group?)

 

Sorry if I sound confusing.

Link to comment
https://forums.phpfreaks.com/topic/128212-pages/#findComment-664079
Share on other sites

Great example thorpe. What I am currious is about some links has www.mysite.com/?=seahub what does that question mark mark and equal mark means. And is it a good think for use? Also if I do create that will I have to create less pages?

 

 

(i.e I have 4 rosters one for group A,B,C,D) Each group has a a certain amount of members in that group now inorder to show the roster for that indivual group will I have to create a whole new page or just use ?= and it will create and only show members in that certain group?)

 

Sorry if I sound confusing.

the question mark represents the beginning of the query string .. your example isn't on since following the '?' will be a name, ie. www.mysite.com/index.php?name=seahub

 

a better example would be www.mysite.com/index.php?userid=22 .. it's a way to carry values over various pages using the $_GET method.  so, what that link would do (if properly connected to a database), would extract information from the database where the userid is 22 using something like this:

 

$sql = sprintf("SELECT * FROM table WHERE userid=%d", $_GET['userid']);
// continue with sql...

/*don't use the above example as it carries no security*/

 

whether it's a good thing to use all depends on what you're trying to accomplish .. it is a common way to gather and extract information from users and against a database.

Link to comment
https://forums.phpfreaks.com/topic/128212-pages/#findComment-664107
Share on other sites

navagation.php

$switch = $_GET['q'];

if($switch == 'index'){
   include("index.php");
}

if($switch == 'games'){
  include("/pages/games.php");
}

 

usage: http://site.com/navagation.php?q=games ==> /pages/games.php

 

This is the easiest way for you to do what you wanted. But the best way would be to use a database.

Link to comment
https://forums.phpfreaks.com/topic/128212-pages/#findComment-670475
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.