6 Replies - 1676 Views - Last Post: 15 March 2012 - 10:09 AM Rate Topic: -----

#1 cruisinunlock  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-March 12

Viewing Profile

Posted 15 March 2012 - 09:06 AM

Attached Image
If you click the view profile the user will automatically see their profile when they login...
<?php
$host="localhost";
$username="root";
$password="";
$db_name="abelibrary";
$tbl_name="studinfo";

mysql_connect("$host","$username","$password") or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$conn = mysql_connect($host,$username,$password);

if(! $conn)
{
	die('Could not connect!' . mysql_error());
}

$uname=$_GET['uname'];

$sql = "SELECT * FROM $tbl_name WHERE uname='$uname' ";
$result = mysql_query($sql);
$data = mysql_fetch_array($result);
echo $data['studno'];

$count=mysql_num_rows($result);

if($count>=1){

if($r=mysql_query($sql)){

while ($row=mysql_fetch_array($r)){
	print"<p>
Student No:{$row['studno']}<br/>
Lastname:{$row['lname']}<br/>
Middlename:{$row['mname']}<br/>
Firstname:{$row['fname']}<br/>
Year:{$row['year']}<br/>
Course:{$row['course']}<br/>
Home Address:{$row['address']}<br/>
Contact No:{$row['contact']}<br/>
Email Address:{$row['email']}<br/>

</p>\n";

}
}}
else{
echo'No Record Found!</center><br />';
}
?>


This post has been edited by Jstall: 15 March 2012 - 09:35 AM
Reason for edit:: code tags


Is This A Good Question/Topic? 0
  • +

Replies To: Viewing Profile

#2 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1002
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Viewing Profile

Posted 15 March 2012 - 09:10 AM

Thanks, so are you having a specific problem?
Was This Post Helpful? 0
  • +
  • -

#3 cruisinunlock  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-March 12

Re: Viewing Profile

Posted 15 March 2012 - 09:16 AM

Yes ....if a user will login to my site and the user will click the view profile the user will automatically see their profile...
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8963
  • View blog
  • Posts: 33,623
  • Joined: 12-June 08

Re: Viewing Profile

Posted 15 March 2012 - 09:30 AM

Is that a statement of how thing are currently working, or how you want them to work?
Was This Post Helpful? 0
  • +
  • -

#5 cruisinunlock  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-March 12

Re: Viewing Profile

Posted 15 March 2012 - 09:53 AM

the way i want work
Was This Post Helpful? 0
  • +
  • -

#6 cruisinunlock  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-March 12

Re: Viewing Profile

Posted 15 March 2012 - 10:07 AM

hey
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8963
  • View blog
  • Posts: 33,623
  • Joined: 12-June 08

Re: Viewing Profile

Posted 15 March 2012 - 10:09 AM

What? Let's not bump posts irrationally.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1