Hi, This is the code for the above issue: The values passed are unimportant as they are for test purposes only. Everything seems to work OK except that the frame info shows an apparent spurious connection using the apache2 process userid. this is the calling page ~~~~~~~~~~~~~~~~~~~~~~~~ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8"> <TITLE></TITLE> <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Linux)"> <META NAME="AUTHOR" CONTENT="Paul Will"> <META NAME="CREATED" CONTENT="20080906;16484300"> <META NAME="CHANGEDBY" CONTENT="Paul Will"> <META NAME="CHANGED" CONTENT="20080906;16593200"> <LINK REL="stylesheet" TYPE="text/css" HREF="mystyle.css"> <script name="JavaScript" type="text/javascript"> <!-- function message_of_the_day() { window.open("LMmotd.php","pages","",""); } // END --> </script> </HEAD> <BODY LANG="en-GB" DIR="LTR" BACKGROUND="images/LMbgimage.jpg"> <CENTER> <FORM method="POST" action="LMmenu.php5" target="menu" onsubmit="message_of_the_day()"> <table CELLPADDING="3" CELLSPACING="0" RULES="rows" width="240"> <tr STYLE="background:silver; font-weight: bold"> <td colspan="5" align="center" valign="middle"><h3><u>Please enter your userid and password</u></h3></td> </tr> <tr> <td align="right">Userid:</td> <td><INPUT type="text" name="sqluser" size="12"></td> <td align="right">Password:</td> <td> <INPUT type="password" name="sqlpass" size="12"> </td> <td align="center"> <INPUT type="submit" name="submit" value="Login"> </td> </tr> </table> <input type="hidden" name="sqldb" value="lmts"> <input type="hidden" name="sqlhost" value="localhost"> </FORM> </BODY> </HTML> --------------------------------------------------------------------------- The values passed are as follows: sqluser = shelley sqlpass = abc123 sqldb = lmts sqlhost = localhost --------------------------------------------------------------------------- This is the page called ~~~~~~~~~~~~~~~~~~~~~~~ <?php #phpinfo(); # phpinfo displays the correct info. #exit; $sqldb = $_POST["sqldb"]; $sqluser = $_POST["sqluser"]; $sqlpass = $_POST["sqlpass"]; $sqlhost = $_POST["sqlhost"]; $link = mysql_connect($sqlhost, $sqluser, $sqlpass); print "DEBUG: $sqlhost, $sqluser, $sqlpass, $sqldb"; #This prints the correct info if(! $link) die("Unable to connect to MySQL server, check userid and password are correct.\n"); mysql_select_db($sqldb, $link) or die("Unable to logon to database, database may be offline. $sqldb: ".mysql_error()); . . . . . ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php