RedHat 7 vs. Windows 98
| From: | John Halladay | Date: | Fri, 23 Feb 2001 00:23:45 +0000 |
| Subject: | RedHat 7 vs. Windows 98 | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6895@lists.php.net to get a copy of this message | ||
This isn't an issue with RedHat Linux 7.0 but I'm getting a series of errors
from Windows 98. First, I'm getting an undefined variable error on the
following statement. (The database I'm using is MySQL.)
if (!$id) {
I've resolved a similar error by using isset() for if ($id) but when I do
the same for if (!$id) I get a parse error.
Second error. I'm getting an undefined variable error when I have a blank
form to make an insert. If I pull up a record to update in the form, there
is no error, only when I pull up a blank one. Linux seems to have place
holders in the forms and I don't get the error. Here is a part of the code
referred to in the error.
if (isset($id)) {
$sql="SELECT * FROM tblpeople WHERE id=$id";
$result=mysql_query($sql);
$myrow=mysql_fetch_array($result);
$id = $myrow["id"];
$parent_id = $myrow["parent_id"];
$spouse_id = $myrow["spouse_id"];
?>
If I haven't made any sense, please let me know how I can clarify.
Thanks.
John Halladay