if statements
| From: | mike@stratabase | Date: | Fri, 11 Feb 2000 21:01:55 +0000 |
| Subject: | if statements | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10158@lists.php.net to get a copy of this message | ||
i am getting some errors with the else arguments teh username and password variables are coming frm
a form please help tell me whats wrong!!!
Mikey T
MYSQL_CONNECT($hostname,$username) OR DIE("Unable to connect to database");
@mysql_select_db("$dbName") or die("Unable to select database"); ?>
<?if (isset($username) && isset($password)) {
$result = mysql_query ("SELECT * FROM users
WHERE username = '$username'
and password = '$password'
and validuser = '1'
and item like '%tnc%'");
if ($row = mysql_fetch_array($result)) {
$result2 = mysql_query ("SELECT * from TNC
where entryID = $entryID
");
if ($row2 = mysql_fetch_array($result2)) {
?>
<table border="1" cellpadding="2" cellspacing="0"
width="90%" align="center" bgcolor="EBCF01"
bordercolor="EBCF01">
<tr>
<td><font face="verdana" size="4"
color="000000"><B><?echo $row2[issueTitle]?></B></font>
<p><font face="verdana" size="2" color="000000"><?echo
$row2[issueContent] ?></font>
</td>
</tr>
</table>
<?} else {
include("checkpassword.php")
}
} else {
include("checkpassword.php")
echo "wasnt defined";}?>