Notice: Undefined index: tu in D:\PHPWEB\enterPortal.php on line 3
Notice: Undefined index: tp in D:\PHPWEB\enterPortal.php on line 4
dbconnect.php
enterPortal.phpPHP Code:<?php
$host = "localhost";
$user = "root";
$password = "admin";
$conn = mysql_connect($host, $user, $password)
or die ("Could Not Connect to DB");
?>
index.phpPHP Code:<?php
include("dbconnect.php");
$muser = $_POST['tu'];
$mpass = $_POST['tp'];
$sd = mysql_select_db("ifl-sales", $conn)
or die ("Could Not Select DB");
$tableinsert = "select * from portalGuard where username = $muser and password = $mpass";
$sd = mysql_query($tableinsert, $conn);
if($user=$sd['username'])echo "Access denied!";
?>
i am sure i named it right.. what could be the problem..??PHP Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>IFL-SALES PORTAL</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#000000">
<?php include("enterPortal.php");?>
<div align="center"></div>
<div align="center"></div>
<form onSubmit="enterPortal" method="post">
<div align="center">
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"><table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<th nowrap bgcolor="#0000FF"><div align="center"><font color="#00FF00" size="+1">MEMBER
LOGIN</font></div></th>
</tr>
</table><p></p></td>
</tr>
<tr>
<td width="6%"><div align="right"><font color="#00FF00"></font></div></td>
<td width="27%"><font color="#00FF00"><strong>Username</strong></font></td>
<td width="67%"><input name="tu" type="text" size="32"></td>
</tr>
<tr>
<td><div align="right"><font color="#00FF00"></font></div></td>
<td><font color="#00FF00"><strong>Password</strong></font></td>
<td><input name="tp" type="password" size="32"> <input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</div>
</form>
</body>
</html>




Reply With Quote