I am trying to make a webpage that connects to my SQL database and fetches information from a table and place it into a text box. The information it fetches is dependent on what is entered into another text box. Essentially its an "autofill" of information. I was curious whether this was possible.To create a better understanding here is a layout of text boxes:\[code\]<html><head><?php$con = mssql_connect("abc", "123", "password");if (!$con) { die('Could not connect: ' . mssql_get_last_message()); }mssql_select_db("db1", $con);$result = mssql_query("SELECT * FROM FormData");<head><title>test</title></head><body> <h1>test</h1> <form action="#"> <p>Enter ID</p> <input type="text" name="ID"/> <input type="text" name="NAME"/> <input type="text" name="LASTNAME"/> <input type ="button" value="http://stackoverflow.com/questions/10563594/submit" onclick="check(ID)" /> </form></body>\[/code\]Here an ID would be entered into a text box and then once the submit button was pressed, it would fetch the rest of the information from my sql database into the next boxes. I don't even know whether this is possible, whether I can use Javascript in conjunction with this or something. I searched but couldn't find much help on the subject. I'm not even sure if its possible to do "if" statements within SQL - whenever I try I end up with a 500 error due to improper syntax.