Moved IIS servers now code not working.
Posted: Thu Jan 24, 2008 3:42 am
hello
We recently moved our iis server to a new one, now something has broken.
All the reports still work so the connection with mysql is not the problem, the problem is
with a number of dropdown boxes linked to different tables within the mySql database.
Connection.php script
Query code within form
Dropdown field code
The dropdown field on the form has "; while($row=mysql_fetch_assoc($my_query2)) { echo "".$row['email'].""; } ?> " instead of the results from the query.
If I directly connect to the DB and run the query the results are displayed so the query string is correct.
Hope you can help
thanks
Geoff
We recently moved our iis server to a new one, now something has broken.
All the reports still work so the connection with mysql is not the problem, the problem is
with a number of dropdown boxes linked to different tables within the mySql database.
Connection.php script
Code: Select all
$localhost = 'localhost';
$user='root';
$pass='root';
$Database='vsi_projects';
$link = mysql_connect($localhost, $user, $pass);
$connection=mysql_connect("$localhost","$user","$pass") or die("I Couldn't connect");
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db($Database) or die(mysql_error());
Query code within form
Code: Select all
<?
include("connect.php");
$mode=$_GET["mode"];
if($mode=="add") {
$my_query = mysql_query ("SELECT * FROM email_sales_man;") or die ("failed");
$my_query2 = mysql_query ("SELECT * FROM engineer;") or die ("failed");
$my_query3 = mysql_query ("SELECT * FROM projectmembers;") or die ("failed");
?>
Code: Select all
echo"<select name=\"ENGINEER\">";
while($row=mysql_fetch_assoc($my_query2))
{
echo "<option value=\"".$row['email']."\">".$row['email']."</option>";
}
If I directly connect to the DB and run the query the results are displayed so the query string is correct.
Hope you can help
thanks
Geoff