RE: [PHP] php 3 to 4.3
| From: | John W. Holmes | Date: | Thu, 03 Apr 2003 01:24:59 +0000 |
| Subject: | RE: [PHP] php 3 to 4.3 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142053@lists.php.net to get a copy of this message | ||
REGISTER_GLOBALS, REGISTER_GLOBALS, REGISTER_GLOBALS!!!!
Do you always upgrade your programs without reading anything about the
changes in the new version???? If so, I have a new version of <insert
software name here> that I'd like you to load on your computers. Please
contact me off-line...
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
-----Original Message-----
From: Jennifer Fountain [mailto:JFountain@rbinc.com]
Sent: Wednesday, April 02, 2003 8:18 PM
To: php-general@lists.php.net
Subject: [PHP] php 3 to 4.3
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: </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:
</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>
</font></div>
</td>
</table>
<p><input type="submit" name="submit"
value="submit">
</form>
<?php
}
?>
</BODY>
</HTML>
thanks in advance.