php 3 to 4.3

From: Date: Thu, 03 Apr 2003 01:18:05 +0000
Subject: php 3 to 4.3
Groups: php.general 
Request: Send a blank email to php-general+get-142051@lists.php.net to get a copy of this message
Has anyone had issues with their php scripts not working after upgrading php from 3 to 4.3? I have simple page that inserts data into mysql db. The scripts worked fine until after the upgrade. Below is one of my php scripts. When I hit submit, nothing is added to the db :( <HTML> <HEAD><TITLE>Add Record</TITLE></HEAD> <BODY> <?php // code that will be executed if the form has been submitted: if ($submit) { // connect to the database include 'pwinfo.php'; $db = MYSQL_CONNECT($host,$user,$password); mysql_select_db("DB", $db); $sql = "INSERT INTO DB (value1, value2) VALUES ('$value1', '$value2')"; $result = mysql_query($sql); print ("Thank you! Information entered.\n"); MYSQL_CLOSE($db); } else { // else show the form to submit new data: ?> <form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data"> <table cellspacing=0 cellpadding=4 width="580" border=0 align="center" dwcopytype="CopyTableRow"> <tr bgcolor="#FFFF99"> <td valign=top align=left width="324"> <div align="right"><font face="Arial, Helvetica, sans-serif" size="3">value1:&nbsp;</font></div> </td> <td valign=top align=left width="385"> <div align="left"><font face="Arial, Helvetica, sans-serif" size="3"> <input type="text" size="55" name="value1"> </font></div> </td> </tr> <tr bgcolor="#FFFF99"> <td valign=top align=left width="324"> <div align="right"><font face="Arial, Helvetica, sans-serif" size="3">value2:&nbsp; </font></div> </td> <td valign=top align=left width="385"> <div align="left"> <font face="Arial, Helvetica, sans-serif" size="3"> <select name="value2" size="1"> <option><font face="Arial, Helvetica, sans-serif" size="3">Female</font></option> <option><font face="Arial, Helvetica, sans-serif" size="3">Male</font></option> </select> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></div> </td> </table> <p><input type="submit" name="submit" value="submit"> </form> <?php } ?> </BODY> </HTML> thanks in advance.

« previous php.general (#142051) next »