isset problem

From: Date: Sun, 17 Dec 2000 19:13:19 +0000
Subject: isset problem
Groups: php.general 
Request: Send a blank email to php-general+get-30754@lists.php.net to get a copy of this message
Hello, I am new to php 4. I am trying to modify a script I downloaded to add more than the name to a mysql database, I wanted first and last name. The question is, why does php accept the following: <? if (isset($firstname) && isset($phone)< { mysql_connect("localhost", "surreal", "123654"); $query = "INSERT INTO mytable VALUES ('$firstname', '$lastname', '$phone ')"; $result = mysql_db_query("example", $query); if ($result) { echo "<$firshname $lastname was added to the database</p>"; } } ?> But when I change the first one line to this: <? if (isset($firstname) && isset($lastname) && isset($phone)< { I then get a parse error? how can I specify more than 2 issets in one line? Thanks, Doug

« previous php.general (#30754) next »