Auto fill a text box with database information without leaving a page

curtismint

New Member
I have several forms on a page and they have to be filled in automatically by accessing a users ID and then filling the rest of the text boxes with the necessary information. Essentially an auto fill for the forms dependent on which RFID is entered into the first text box.\[code\]<html><head><?php$con = mssql_connect("123", "abc", "pass");if (!$con) { die('Could not connect: ' . mssql_get_last_message()); }mssql_select_db("db1", $con);$result = mssql_query("SELECT * FROM Scrabble");$row = array("RFID" => "", "Tile" => "", "TileScore" => "");$row = mssql_fetch_row($result)?></head><body> <form> <input type="text" name="RFID1"/> <input type="text" name="Tile1"/> <input type="text" name="TileScore1"/> <input type ="button" value="http://stackoverflow.com/questions/10564423/submit" onclick="RFID1.disabled=true" /> <td><input type="text" name="RFID2"/> <input type="text" name="Tile2"/> <input type="text" name="TileScore2"/> <input type ="button" value="http://stackoverflow.com/questions/10564423/submit" onclick="RFID2.disabled=true" /> <input type="text" name="RFID3"/> <input type="text" name="Tile3"/> <input type="text" name="TileScore3"/> <input type ="button" value="http://stackoverflow.com/questions/10564423/submit" onclick="RFID3.disabled=true" /> <form> </body> </html>\[/code\]I need it to take the Tile and TileScore from where the RFID is equal to what is entered in the text box. Is this possible without having to submit the page to allow the other forms to be filled in as well? I've been told it may be possible using AJAX but am unaware of a solution.This is using MSSQL, sadly there isn't an MSSQL tag.
 
Back
Top