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="" 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. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to