php5 vs php4
I have this:
PHP:<?
$title = "CSI Content Management | Add Global Content";
$keywords = "";
$description = "";
?>
<?php include("/srv/www/htdocs/cms-includes/top.php"); ?>
<div id="content">
<?php include("/srv/www/htdocs/cms-includes/mysql_config.php"); ?>
<?
if ($_POST['insert'] == 1)
{
mysql_query("insert into location values ('" . $_POST['id'] ."','" . $_POST['cu_id'] ."','" . $_POST['name'] . "')");
echo "<h1>Location/District added.</h1><br />\n";
}
else if ($_POST['insert'] == 2)
{
mysql_query("insert into building values ('" . $_POST['id'] . "','" . $_POST['loc_id'] ."','" . $_POST['name'] . "')");
echo "<h1>Building/Site added.</h1><br />\n";
}
else if ($_POST['insert'] == 3)
{
mysql_query("insert into server_os values (NULL,'" . $_POST['os_name'] . "','" . $_POST['env'] . "')");
echo "<h1>Server Operating System added.</h1><br />\n";
}
else
{ ?> <h1>Add Districts/Central Locations</h1> <? } ?>
<h2 style="margin-top: 20px;">Add Location/District</h2>
<form action="" method="POST">
<table><tr><th>Customer</th><th>Unique ID <a href="open-loc.php" target="_blank">[li]</a></th><th>Name</th></tr>
<tr><td>
<select name="cu_id">
<?
$result = mysql_query('SELECT * FROM customer ORDER BY name ASC');
while ($row = mysql_fetch_assoc($result))
{
?>
<option value="<?=$row['id'];?>"><?=$row['name'];?></option>
<?php
}
echo mysql_error();
?>
</select></td>
<td><input type="text" name="id" maxlength="25" /></td>
<td><input type="text" name="name" maxlength="110" /></td>
<td><input type="hidden" name="insert" value="1" /></td>
</tr>
<tr><td><input type="submit" /></td></tr>
</tr>
</table>
</form>
<hr style="margin: 60px;" />
<h2>Add Building/Site within a Location</h2>
<form action="" method="POST">
<table><tr><th>Location/District</th><th>Unique ID <a href="open-building.php" target="_blank">[li]</a></th><th>Building Name</th></tr>
<tr><td>
<select name="loc_id">
<?
$result = mysql_query('SELECT * FROM location ORDER BY name ASC');
while ($row = mysql_fetch_assoc($result))
{
?>
<option value="<?=$row['id'];?>"><?=$row['name'];?></option>
<?php
}
echo mysql_error(); ?>
</select></td>
<td><input type="text" name="id" maxlength="25" /></td>
<td><input type="text" name="name" maxlength="110" /></td>
<td><input type="hidden" name="insert" value="2" /></td>
</tr>
<tr><td><input type="submit" /></td></tr>
</tr>
</table>
</form>
<hr style="margin: 60px;" />
<h2>Add Operating System</h2>
<form action="" method="POST">
<table><tr><th>Operating System <a href="open-server-os.php" target="_blank">[li]</a></th></tr>
<tr>
<td><input type="text" name="os_name" maxlength="40" /></td>
<td>
<select name="env">
<option value="m">Microsoft</option>
<option value="u">Unix</option>
<option value="n">Novell</option>
</select>
</td>
</tr>
<tr><td><input type="hidden" name="insert" value="3" /><input type="submit" /></td></tr>
</tr>
</table>
</form>
</div>
</div>
<div id="bottom">
<p>© 2002, Computer Systems Integrators, Inc, All rights reserved.</p>
</div>
</body>
</html>
On one server, apache2/php4, it works FINE.
On another server, apache2/php5 it doesn't load anything past the mysql_connect, then after that it only loads one input dropdown.
wtf is going on, what huge difference am I missing
___________________
:: pop ::
