Código PHP:
<?php
/////////////////////////////////////////////////////////
////////////////// Informació //////////////////////////
///////////////////////////////////////////////////////
$_GET[usuari] = $usuari;
$data= date('l d, F Y');
echo 'Hi, ' . $usuari . ' today is ' . $data . '<br />';
echo '<h1> Community: </h1>';
echo 'You can: <br /> <li /> <a href="upload.php?usuari=' . $usuari . '&id=' . $id . '">Suggest a thing that other users and visitors can rate it <a/><br />';
echo '<h2>Or</h2>';
echo '<li /><a href="vote.php?usuari=' . $usuari . '&id=' . $id . '">Vote users things <a/>';
echo '<h1> User details </h1>';
?>
<?php
///////////////////////////////////////////////////////
////////////////////// MySql /////////////////////////
/////////////////////////////////////////////////////
$connection = mysql_connect('localhost', 'root', '972190131')
or die('Could not connect. Please contact the webmaster (webmaster@localhost). The error is: ' . mysql_error());
mysql_select_db('rateit') or die('Could not select database. Please contact the webmaster (webmaster@localhost)');
$query = 'SELECT * FROM users WHERE username ="' . $usuari . '";';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
?>
</body>
</html>
La tabla es asi:
id user_id name surname adress tel city state username password
![](http://127.0.0.1/phpmyadmin/themes/original/img/b_edit.png)
![](http://127.0.0.1/phpmyadmin/themes/original/img/b_drop.png)
1 52145 francesc bruguera osor 2147483647 sopa spain frins 972190131
¿Como puedo hacer para que el id este en una variable, el user_id, y todas las columnas de la tabla?