To echo, try the following:
Code:
<?php
// we must never forget to start the session
session_start();
$errorMessage = '';
if (isset($_POST['txtUserId']) && isset($_POST['txtPassword'])) {
include 'library/configure.php';
include 'library/open.php';
$userId = $_POST['txtUserId'];
$password = $_POST['txtPassword'];
echo 'Username: '.$userId.'<BR> Password: '.$password;
}
?>
<html>
<head>
<title>Basic Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
if ($errorMessage != '') {
?>
<p align="center"><strong><font color="#990000"><?php echo $errorMessage; ?></font></strong></p>
<?php
}
?>
<form action="" method="post" name="frmLogin" id="frmLogin">
<table width="400" border="1" align="center" cellpadding="2" cellspacing="2">
<tr>
<td width="150">User Id</td>
<td><input name="txtUserId" type="text" id="txtUserId"></td>
</tr>
<tr>
<td width="150">Password</td>
<td><input name="txtPassword" type="password" id="txtPassword"></td>
</tr>
<tr>
<td width="150"> </td>
<td><input name="btnLogin" type="submit" id="btnLogin" value="Login"></td>
</tr>
</table>
</form>
</body>
</html>
If the variables are being assigned properly (in other words, if you get the information you entered in the form returned back to you the exact same), then try typing in the query in phpmyadmin's SQL code execution thingy (can't remember actual name):
Code:
SELECT username FROM tbladmin WHERE username = '$userId' AND password = PASSWORD('$password')
Where userId is the username that was entered, and the password is the password that was entered.
Hope this helps.
Bookmarks