Call PHP function on click of HTML button?
Posted: Tue Jun 17, 2003 12:19 pm
Hi all,
I want to alter my php file so when the user clicks the button, it calls my php function. Here is the code.
<?
echo 'Username <input type="text" name="username" size="14" maxlength="14"><BR>';
echo 'Password <input type="password" name="password" size="14" maxlength="14">';
echo '<input type="submit" value="Submit">'; <--Here is the button
function checkPass(){ <--How do I call this function?
if($username=="forge" && $password=="order2002") {
include ("selectDocket.php");
}
else {
echo "You have not entered a valid username/password. Remember, they are case sensitive.";
}
}
?> [b][/b]
I want to alter my php file so when the user clicks the button, it calls my php function. Here is the code.
<?
echo 'Username <input type="text" name="username" size="14" maxlength="14"><BR>';
echo 'Password <input type="password" name="password" size="14" maxlength="14">';
echo '<input type="submit" value="Submit">'; <--Here is the button
function checkPass(){ <--How do I call this function?
if($username=="forge" && $password=="order2002") {
include ("selectDocket.php");
}
else {
echo "You have not entered a valid username/password. Remember, they are case sensitive.";
}
}
?> [b][/b]