Jump to content

[SOLVED] Social network profile.php need to be made how do i ?


Recommended Posts

Really yet you managed to write an file upload script fine? (google)

 

And you have more than 1000 pages for your site, yet you don't understand $_GET

 

http://forum.free-php.org.uk/index.php/topic,488.msg2491.html

http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=jamesxg1

Enough.

 

use $_GET['id'] to get an id from the URL (profile.php?id=1 for example)

 

$id = (int)$_GET['id'];

 

Then use a mysql Select query, using the ID aforementioned, to pull in the data for that user.

 

ok this is getting pafetic and really childish!, i am going to flag this as solved and leave it at that!, but just for future refrence i rekon anyone who doesnt have/ or know what something is they should either reaserch or ask a pro, and Prismatic, thankyou mate, your a star just got a line of code that has done it from that site :) thanks!, top man!

No offence but if you hace Asperger syndrome then you need to start and study the basics even more, your need to pay look at the minor details more than the whole plan..

and you would NOT be the type of person who can just jump in at the deep end trust me i know more about Asperger's than you may think and if you are the type or person who need to jump in at the deep end then you don;t have Asperger and if you do then you have never started anything!

No offence but if you hace Asperger syndrome then you need to start and study the basics even more, your need to pay look at the minor details more than the whole plan..

and you would NOT be the type of person who can just jump in at the deep end trust me i know more about Asperger's than you may think and if you are the type or person who need to jump in at the deep end then you don;t have Asperger and if you do then you have never started anything!

 

ok im going to end this once and for all!,

 

I know nothing about PHP,

 

check my previous post's i know litrully nothing!,

 

but here from me jumping into the deep end straight away i have made this!,

 

<?php
  	
  	if($_GET['order'] == "firstname")
  		$result = mysql_query("SELECT * FROM users ORDER BY firstname");
  	else if($_GET['order'] == "lastname")
  		$result = mysql_query("SELECT * FROM users ORDER BY lastname");
  	else if($_GET['order'] == "email")
  		$result = mysql_query("SELECT * FROM users ORDER BY email");
        else if($_GET['order'] == "gender")
  		$result = mysql_query("SELECT * FROM users ORDER BY gender");
  	else if($_GET['order'] == "firstname")
  		$result = mysql_query("SELECT * FROM users ORDER BY firstname");
  	else
  		$result = mysql_query("SELECT * FROM users ORDER BY lastname");
  
  	while($row = mysql_fetch_array($result))
  		{ 
  		?>
  
  	<center><tr>
  		<td align="center" width="177" bgcolor="#ffffff" height="27"><?php echo $row['firstname'];?></td>
            <td align="center" width="177" bgcolor="#ffffff" height="27"><?php echo $row['lastname'];?></td>
  		<td align="center" width="229" bgcolor="#ffffff" height="27"><?php echo $row['email'];?></td>
            <td align="center" width="229" bgcolor="#ffffff" height="27"><?php echo $row['gender'];?></td>
  </td>
  	</tr>
  
</center>
<?php 
  	}
  	?>

Guest
This topic is now 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.