8. Done! */ //edit: connection details $user='username'; $password='password'; $host='localhost'; $database='generic'; $table='generic'; //connect to db server and db mysql_connect($host,$user,$password); mysql_select_db($database) or die('Unable to select database '.mysql_error()); //grab data from db where id is id from query string //edit: variable names $result=mysql_query("SELECT page1, ip_number FROM $table WHERE identification=$_GET[op56]") or die ('Select failed! '.mysql_error()); //get results as an array $row = mysql_fetch_row($result); //assign first elements of array to $answer, array numbering starts from 0 $answer1 = $row[0]; $answer2 = $row[1]; //close db connection mysql_close(); ?>