Jump to content

members page unique page


sandbudd

Recommended Posts

I have a members login page that works where people can log in change pass etc... what I am trying to do is when some one logs in it gives them a folder that only they can view with different files.  I have tried several options to call this folder without success.  Here is the members page.  I created a field in my table called site where I want them to have a link to click to their password protected folder but can't seem to get it to work.  I am sure that is an echo statement but getting frustrated.  Thanks.

 

<?php 
require_once('settings.php');
checkLogin('1 2');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="css/styles.css" rel="stylesheet" type="text/css" />

</head>

<body>

<div id="container" style="text-align:center;width:230px;">

<?php
echo 'Hello <em><b><u>' . get_username ( $_SESSION['user_id'] ) . '</u></b></em>!<br />You are now logged in.<br /><br /><a href="update_profile.php" title="update your profile">Click here</a> to update your profile.';


/* we show the manage users link only if the logged in member has admin rights */
if ( isadmin ( $_SESSION['user_id'] ) ):
?>
<br /><br />
It seems that you're an admin. You may <a href="manage_users.php" title="manage users">manage users</a> or <a href="admin_settings.php" title="edit site settings">edit site settings</a>.
<?php
endif;
?>
<br /><br />

<a href="logout.php">logout</a>

</div>

</body>

</html>

Link to comment
https://forums.phpfreaks.com/topic/133425-members-page-unique-page/
Share on other sites

okay if I do this it displays the correct file how do I make it a link?

 

<?php 
require_once('settings.php');
checkLogin('1 2');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="css/styles.css" rel="stylesheet" type="text/css" />

</head>

<body>

<div id="container" style="text-align:center;width:230px;">

<?php
echo 'Hello <em><b><u>' . get_username ( $_SESSION['user_id'] ) . '</u></b></em>!<br />You are now logged in.<br /><br /><a href="update_profile.php" title="update your profile">Click here</a> to update your profile.';

$query = "SELECT * FROM `" . DBPREFIX . "users` WHERE `ID` = " . $db->qstr ( $_SESSION['user_id'] );
$row = $db->getRow ( $query );


$result = mysql_query($query);

while($row = mysql_fetch_array($result)){


echo $row['site'];

}




/* we show the manage users link only if the logged in member has admin rights */
if ( isadmin ( $_SESSION['user_id'] ) ):
?>
<br /><br />
It seems that you're an admin. You may <a href="manage_users.php" title="manage users">manage users</a> or <a href="admin_settings.php" title="edit site settings">edit site settings</a>.
<?php
endif;
?>

<br /><br />

<a href="logout.php">logout</a>

</div>

</body>

</html>

  • 2 weeks later...

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.