Jump to content

Selecting USERS and LINKING them


maxic0

Recommended Posts

Hi
I know how to select users out of a table and display them, but how can i select users out of a table and link them to a seperate page.

For example...

If select someone out the database called "Bob", then the link would be..
http://www.mydomain.com/members.php?user=bob

Please help me..
Thanks
Link to comment
Share on other sites

Thanks mate, ill try that in a bit.

I have another question...

When people change page on my site i only want the content bit to change..

Can i use a script like...

[code]
<?php
$page=$_GET['page'];
include "$page.php";
?>
[/code]

I dont think this would work, but is there a script similar to this?
Can you post it here please.

Thank you
Link to comment
Share on other sites

That will work, but it is dodgy, u will need to validate
What I would do is use a switch

switch($_GET["page"]){
case "about";
include("about.php");
break;

default:
include("home.php");
break;
}

But you do know this will still reload the page.
What I do is create a header and footer include
Include this on all page, and just naviagte to that page
Link to comment
Share on other sites

my basic page layout is
[code]
<?php
$page_title = "The Page Title";
require("inc/inc_header.php");
?>
This is my Content

<?php
require("inc/inc_footer.php");
?>
[/code]

in the inc header, I have the head, the page banner, the navigation
In the footer, I close the divs, and have my footer
If I want to change a link in the nav, in the footer or the header or something, I can in 2 seconds
And each page is called with a unique name

index.php
about.php
contact.php
Link to comment
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.