PDA

View Full Version : profile script



Colin-Roberts
10-03-2007, 06:31 PM
i need the code that if its share.php?colin it shows just colin's info can anyone help?

<?php
include 'config.php';

if($_GET[user]) {

$query = mysql_query("SELECT * FROM profile WHERE name='$_GET[name'");)

$query = "SELECT name, lname, age FROM profile";
$result = mysql_query($query);

while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "Name:{$row['name']} <br>" .
"Last Name: {$row['lname']} <br>" .
"Age: {$row['age']} <br><br>";
}
?>

Splinter
10-03-2007, 07:23 PM
try this... [php]

Splinter
10-03-2007, 07:26 PM
Okay so I cant edit above post .. so try this try this...


<?php
include 'config.php';

if($_GET[user]) {

$query = mysql_query("SELECT * FROM profile WHERE name='".$_GET['name']."'");

$result = mysql_query($query);

while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "Name:{$row['name']} <br>" .
"Last Name: {$row['lname']} <br>" .
"Age: {$row['age']} <br><br>";
}
}
?>

Colin-Roberts
10-03-2007, 08:03 PM
nope thanx tho

Blob
10-03-2007, 08:10 PM
You cant have share.php?colin it has to be share.php?user=colin

Colin-Roberts
10-03-2007, 08:29 PM
ye sry thats what i ment it needs to be
so if you go to show2.php?user=colin
it shows my info in a chart like this:
http://colin-roberts.net/v2/show.php
and you change colin to say lainie it shows lainies info
if you trusted i can give you cpanel to get it to work.
+ rep to whoever

Want to hide these adverts? Register an account for free!