Hey all,
i'm new to PHP/SQL, and i've had a lot of trouble trying to write a small script. A friend of mine told me this was a good place to ask - so here I am!
Basically I want the script to take a username from a form, and then the data from the DB to be displayed on the next page based on the username entered.
Please don't laugh at my crappy coding 😛, i'm new to this, so this code is probably quite wrong. I was just hoping someone could give me a few tips, or point me in the right direction 😛
This is what I have so far -
<html>
<body>
<form action="username.php" method="post" name="UsernameSearchForm">
Username: <input type"text" name"ForumUsername">
<INPUT type="submit" name="Update" value="Update">
</form>
</body>
</html>
<?php
$db = mysql_connect("localhost", "******", "******");
@mysql_select_db("FBI_Order",$db);
$ForumUSername=$_GET['ForumUsername'];
$query = ("SELECT * FROM FBI_Applications WHERE $ForumUsername='ForumUsername'");
mysql_query($query);
$ForumUsername=('ForumUsername');
$Name=('Name');
echo "$ForumUsername";
echo "$Name";
mysql_close();
?>
Any tips? What am I doing wrong?