ik wil zeg maar als iemand registreert dat hij persoonlijke informatie krijgt

maar die moet natuurlijk ook opvraagbaar zijn, bev: naam posts clicks punten etc...

hoe vraag je die informatie op? tot nu toe heb ik dit maar daarmee vraag je de eerst row op....


<?php
// Make a MySQL Connection
$query = "SELECT * FROM users";

$result = mysql_query($query) or die(mysql_error());


$row = mysql_fetch_array($result) or die(mysql_error());
echo $row['name']. " - ". $row['age'];
?>

=================


heb het opgelost dit is wat ik wou....


<?php
//connect



// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM users
WHERE username='damiaan'") or die(mysql_error());

// get the first (and hopefully only) entry from the result
$row = mysql_fetch_array( $result );
// Print out the contents of each row into a table

echo "</br><b>Points: </b></br>".$row['points'];
echo "</br> <b> Posts: </b></br>".$row['posts'];

?>
Wat wil je precies doen??
Een column, bijv name, voor één gebruiker opvragen?
Of één column voor alle gebruikers opvragen?
Gebruik while().

Reageren