Jump to content

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

thorpe  already gave you a link to a thread with an example. 

 

to assign the link:

 

 echo "{$row['uname']}
";

 

$_GET the data from the link:

 

if (isset($_GET['member'])) {
echo $_GET['member'];
}

 

Please attempt to do something so we can help you.

Link to comment
https://forums.phpfreaks.com/topic/128212-pages/#findComment-670123
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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.