can you program php and mysql code syntax issue with script
i need this so that a logged in user id is used and only that user can view hes / her own data from a sql query using php and not all data i can provide more info on request

(look for <<< )

    <center>
    <title>J~Net Balance Accounts</title>
     <?php 
     // Connects to your Database 
     mysql_connect("localhost", "root", "password") or die(mysql_error()); 
     mysql_select_db("messages") or die(mysql_error()); 
     $data = mysql_query("SELECT * FROM users WHERE id=$id") <<<<
     or die(mysql_error()); 
     Print "<table border cellpadding=3>"; 
     while($info = mysql_fetch_array( $data )) 
     { 
     Print "<tr>"; 
     Print "<th>User:</th> <td>".$info['user_name'] . "</td> "; 
     Print "<th>Balance:</th> <td>".$info['balance'] . " </td></tr>"; 
     } 
     Print "</table>"; 
     ?> 
can you program php and mysql code syntax issue with script
===

i need this so that a logged in user id is used and only that user can view hes / her own data from a sql query using php and not all data i can provide more info on request

(look for <<< )

    <center>
    <title>J~Net Balance Accounts</title>
     <?php 
     // Connects to your Database 
     mysql_connect("localhost", "root", "password") or die(mysql_error()); 
     mysql_select_db("messages") or die(mysql_error()); 
     $data = mysql_query("SELECT * FROM users WHERE id=$id") <<<<
     or die(mysql_error()); 
     Print "<table border cellpadding=3>"; 
     while($info = mysql_fetch_array( $data )) 
     { 
     Print "<tr>"; 
     Print "<th>User:</th> <td>".$info['user_name'] . "</td> "; 
     Print "<th>Balance:</th> <td>".$info['balance'] . " </td></tr>"; 
     } 
     Print "</table>"; 
     ?> 