Click here to Skip to main content
15,566,185 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
QuestionPHP Member Pages... Need major help... Pin
thebiostyle1-Jan-10 8:46
thebiostyle1-Jan-10 8:46 
AnswerRe: PHP Member Pages... Need major help... Pin
Smithers-Jones1-Jan-10 12:09
Smithers-Jones1-Jan-10 12:09 
AnswerRe: PHP Member Pages... Need major help... [modified] Pin
enhzflep1-Jan-10 12:25
enhzflep1-Jan-10 12:25 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle1-Jan-10 17:14
thebiostyle1-Jan-10 17:14 
GeneralRe: PHP Member Pages... Need major help... Pin
enhzflep3-Jan-10 16:54
enhzflep3-Jan-10 16:54 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle3-Jan-10 17:28
thebiostyle3-Jan-10 17:28 
GeneralRe: PHP Member Pages... Need major help... Pin
enhzflep4-Jan-10 13:22
enhzflep4-Jan-10 13:22 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle22-Jan-10 17:09
thebiostyle22-Jan-10 17:09 
Okay... I've seemed to have used some common sense in putting this together... Now all I need is some help to finish it. The "memberlist" page shows fine... it's just the "profile" page... Here is the code for the part of the "memberlist" that will be used with the "profile" page... I want to know if I've done it practically right...

<?
$list_members = mysql_query("SELECT * FROM `members` ORDER BY id");
$list = mysql_fetch_array( $list_members ); 
while($list = mysql_fetch_array( $list_members ))
{
Print '<tr class="alt"><td><b>';
Print "<form action='profile.php' method='GET'>".$list['username']."<input type='hidden' name='username' value='".$list['username']."' /></b></td><td><input type='hidden' name='user' value='".$list['id']."' /><input type='submit' value='Visit' class='submit'/></form></td><td>".$list['country']."</td><td><a href='".$list['www']."'>".$list['www']."</a></td><td>".$list['browser']."</td></tr>";
}
?>


That is what I use to print out the table of members...


And here is the complete php for the "profile.php" page:

<? 
include_once"config.php";

$fetch_users_data = mysql_fetch_object(mysql_query("SELECT * FROM `members` WHERE username='".$_GET['username']."'"));

$fetch_users_id = mysql_fetch_object(mysql_query("SELECT * FROM `members` WHERE id='".$_GET['user']."'")); 

?>
<html>
<head>
	<title>Members - Profile - <? echo "".$fetch_users_data->username.""; ?> ~ Bio-Designs</title>
	
	<style type="text/css">
	<!--
	a {color: #000000; text-decoration: none;}a:link {color: #000000} a:visited {color: #000000} a:hover {color:#000000; width:7em} body{color: #FF0000} .dockmenu{ text-align: center; height: 50px; position: relative;}a.dockItem { text-align: center; color: #000;font-weight: bold; text-decoration: none; width: 50px; position: absolute; display: block; bottom: 0;}.dockItem img { border: none; margin: 0 auto 5px auto; width: 75%;}.dockItem span { display: none; positon: absolute;}.dockmenuContainer { height: 50px; left: 76px; position: absolute; top: 40px;}font {color: FF0000;}<!--BODY { scrollbar-arrow-color:#000000; scrollbar-track-color:#000000; scrollbar-shadow-color:#000000; scrollbar-face-color:#FF0000; scrollbar-highlight-color:#FF0000; scrollbar-darkshadow-color:#000000; scrollbar-3dlight-color:#FF0000; } table, td, th{border:0px 1px 0px 1px dashed #FF0000;
padding:2px 2px 2px 2px;} tr.alt { background-color: #FF0000; color: #000000; border: 1px dotted red;} 
//-->
	</style>
	
<link rel="icon" type="image/gif" href="http://i248.photobucket.com/albums/gg195/Bio-Gfx/thebiostylefavicon.gif">
</head>
<body bgcolor="#000000" onload="$_GET['user']">
<br />
	
	<div>
		<div style="text-align: center;">
		<img src="http://www.thebiostyle.com/biologoblackv1.0.png" /><br /><br />
<div align="center">
<span style="font-size: 24pt; color: rgb(255, 0, 0);"><u><b>Profile</b></u></span><br /><br />
<table cellspacing="4" cellpadding="4" style=" border:1px dotted red;">
<tr class="alt" style=" border:1px dashed red;">
<td><span style="font-size: 14pt; color: rgb(0, 0, 0);"><center><b><u>Username</u></b></center></span></td>
<td><span style="font-size: 14pt; color: rgb(0, 0, 0);"><center><b><u>Country</u></b></center></span></td>
<td><span style="font-size: 14pt; color: rgb(0, 0, 0);"><center><b><u>WWW</u></b></center></span></td>
<td><span style="font-size: 14pt; color: rgb(0, 0, 0);"><center><b><u>Browser</u></b></center></span></td></tr>
<?
$list_memberinfo = mysql_query("SELECT * FROM `members` WHERE id='".$_GET['user']."'");
$list = mysql_fetch_array( $list_memberinfo ); 
while($list = mysql_fetch_array( $list_memberinfo ))
{
Print '<tr class="alt"><td><b>';
Print "".$list['username']."</b></td><td>".$list['country']."</td><td><a href='".$list['www']."'>".$list['www']."</a></td><td>".$list['browser']."</td></tr><tr><td><span style="font-size: 14pt; color: rgb(0, 0, 0);"><left><b><u>About</u></b></left></span></td></tr><tr><td>".$list['about']."</td></tr>";
}
?>
</div>
</table>
<br /><br />
<span style="color: rgb(255, 0, 0);">| 2009-<script type="text/javascript">

var d = new Date();
document.write(d.getFullYear());

</script> Bio-Designs |</span><br style="color: rgb(255, 0, 0);" />
					
					<br />
</body>
</html>


It says this when I try to run the page... "
Parse error: syntax error, unexpected T_STRING in profile.php on line 42
"

Should the form method have been "POST"...? Please fix my errors for me... Thanks I tried my best.
GeneralRe: PHP Member Pages... Need major help... Pin
Graham Breach23-Jan-10 0:31
Graham Breach23-Jan-10 0:31 
GeneralRe: PHP Member Pages... Need major help... [modified] Pin
thebiostyle23-Jan-10 5:33
thebiostyle23-Jan-10 5:33 
AnswerRe: PHP Member Pages... Need major help... Pin
Graham Breach23-Jan-10 6:20
Graham Breach23-Jan-10 6:20 
QuestionRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 9:51
thebiostyle23-Jan-10 9:51 
AnswerRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 10:33
fly90423-Jan-10 10:33 
NewsRe: PHP Member Pages... Need major help... [modified] Pin
thebiostyle23-Jan-10 10:51
thebiostyle23-Jan-10 10:51 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 11:38
fly90423-Jan-10 11:38 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 11:47
thebiostyle23-Jan-10 11:47 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 12:00
fly90423-Jan-10 12:00 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 12:18
thebiostyle23-Jan-10 12:18 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 12:29
fly90423-Jan-10 12:29 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 12:23
fly90423-Jan-10 12:23 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 12:48
thebiostyle23-Jan-10 12:48 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle24-Jan-10 8:07
thebiostyle24-Jan-10 8:07 
AnswerRe: PHP Member Pages... Need major help... Pin
Graham Breach24-Jan-10 8:57
Graham Breach24-Jan-10 8:57 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle24-Jan-10 9:34
thebiostyle24-Jan-10 9:34 
QuestionAdd two difference items to shopping card-Paypal Pin
tktuan28-Dec-09 17:08
tktuan28-Dec-09 17:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.