Hi i need help with php
Posted: Wed Nov 04, 2009 2:14 pm
Hi i got a problem with my code
Im making an online game and i ran into problem:
im trying to get my username to fetch from a specific row (saved_id) and to show the username for the public
plz help me....
"im a newb so plz comment ure code so that i can understand it correctly" :-[
Im making an online game and i ran into problem:
im trying to get my username to fetch from a specific row (saved_id) and to show the username for the public
plz help me....
"im a newb so plz comment ure code so that i can understand it correctly" :-[
Code: Select all
<?php
include "../login/database.php"; //Fil för databasinställning
@$id=@$_GET[saved_id];
@$sql="SELECT * FROM konto"; //sätt upp sql fråga.
@$result=mysql_query(@$sql); //hämtar all info från tabell
echo "<table border='1'>";
while(@$row = mysql_fetch_array( @$result )) //hämtar info från tabell.
{
echo "<tr><td>";
echo @$row[fornamn]."'Where @$id=[saved_id]' </td><td>".@$row[efternamn]."'Where @$id=[saved_id]. </td>"; //skriver ut innehållet radvis (inom kaninöron = html kod)
echo "</tr>";
}
echo "</table>";
?>