-
profile script
i need the code that if its share.php?colin it shows just colin's info can anyone help?
PHP Code:
<?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>";
}
?>
-
-
Okay so I cant edit above post .. so try this try this...
PHP Code:
<?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>";
}
}
?>
-
-
You cant have share.php?colin it has to be share.php?user=colin
-
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