Im working on a project where i want the user to enter his/her username and password and if it is correct have a php script fill in fields of a table below the small login section. Is this possible? This is what i have so far and im kinda stuck any suggestions are welcome. Keep in mind i need to combine data from 2 different tables so i used the LEFT JOIN in the query.
<?php
$connect = mysql_connect("localhost","*********","******") or die ("Couldn't Connect"); //host,username,password
mysql_select_db("virtua15_j*1**") or die ("Could not find database");
$query = mysql_query("SELECT * FROM jos_users LEFT JOIN jos_comprofiler ON jos_users.id=jos_comprofiler.id WHERE jos_users.id = $id");
?>
<html>
<form action="populate.php" method='post'>
<table>
<tr>
<td>VAE Username:</td>
<td><input type='text' name='username' value=''></td>
</tr>
<tr>
<td>VAE Password:</td>
<td><input type='password' name='password' value=''></td>
</tr>
</table>
<p><input type='submit' name='submit' value='Search & Populate!'></p>
</form>
<hr>
<form action="dafreg.php" method='post'>
<table>
<tr>
<td>Fristname:</td>
<td><input type='text' name='firstname' value='<?php echo $firstname; ?>'></td>
</tr>
<tr><td>Lastname:</td>
<td><input type='text' name='lastname' value='<?php echo $lastname; ?>'></td>
</tr>
<tr>
<td>Login:</td>
<td><input type='text' name='login' value='<?php echo $username; ?>'></td>
</tr>
<tr><td>Password:</td>
<td><input type='text' name='pass' value=''></td>
</tr>
<tr><td>Country:</td>
<td><input type='text' name='country' value=''></td>
</tr>
<tr><td>Pilot:</td>
<td><input type='checkbox' name='pilot' value=''></td>
</tr>
<tr><td>ATC:</td>
<td><input type='checkbox' name='atc' value=''></td>
</tr>
<tr><td>Email:</td>
<td><input type='text' name='email' value=''></td>
</tr>
</table>
<p><input type='submit' name='submit' value='Register'></p>
</form>
</form>
</html>