I am working on a login page and its process and started having problem where the browser cannot detect the new changes I made to my PHP file.
Here's the HTML code for the login page (ptLogin.php):
<form name="ptlogin" method="post" action="ptLogin0.php">
<div align="center" class="style2"><br>
<table width="330" border="0">
<tr>
<td width="90" class="style5 style9">ID Pengguna</td>
<td width="11"><span class="style5 style9">:</span></td>
<td width="215"><input name="ptLoginId" type="text" class="style9" id="lectLoginId" size="25" maxlength="10"></td>
</tr>
<tr>
<td><span class="style5 style9">Katalaluan</span></td>
<td><span class="style5 style9">:</span></td>
<td><span class="style5 style9">
<label>
<input name="ptLoginPw" type="password" id="lectLoginPw" size="25" maxlength="10">
</label>
</span></td>
</tr>
</table>
<table width="142" border="0" align="center">
<tr>
<td width="54"><input name="Masuk" type="submit" id="Masuk" value="Masuk" class="style9"></td>
<td width="292"><input name="Kosongkan" type="reset" id="Kosongkan" value="Kosongkan" class="style9"></td>
</tr>
</table><label></label>
</div><br>
</form>
As you can see, I have ptLogin0.php for the form to process. However, when I run it on the browser (using Mozilla Firefox), after clicking the Submit (Masuk) button, it leads me to the previous link I was using (heaLogin.php to be exact).
I don't think it has anything to do with the process file, but here's the code for ptLogin0 anyway.
<?php
session_start();
/* include db connection file */
include("dbconn.php");
if(isset($_POST['Masuk']))
{
/* capture values from HTML form */
$pt_id = $_POST['ptLoginId'];
$pt_pw = $_POST['ptLoginPw'];
$sql= "SELECT * FROM hea WHERE pt_username= '$pt_id' AND pt_password= '$pt_pw'";
$query = mysql_query($sql) or die("Error: " . mysql_error());
$row = mysql_num_rows($query);
if($row == 0)
{ header("Location:heaLoginError.php"); }
else
{
$r = mysql_fetch_assoc($query);
$_SESSION['ptLoginId'] = $r['pt_username'];
$_SESSION['heaNokp'] = $r['pt_id']; /*1st var: textbox - 2nd var: db*/
header("Location:ptMainMenu.php");
}
} /*close isset*/
mysql_close($dbconn);?>
Hope someone can point me to the right direction, since this is the first time I've encountered this problem. Thanks.