![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Aug 2007
Location: Ohio
Posts: 46
Rep Power: 0
![]() |
releasing a veriable?
hey guys i am playing around with php trying to get a head start as i will be having a class on it in three weeks and i was wondering how to release a veriable? meaning i have a form you input what will eventuly become a pass word right now it is dog, and when you input dog, for the time beeing it says thank you for loging in, any other time it says sorry your not in the database, the problem i am having is once you hit submit and dog is the veriable $pass it will continue to stay as $pass when you refresh it. wich is a good thing in the long run, but i need to be able to release the veriable, or log out if you will.
heres my code: <font class="phpexample">
<form method="post">
Yourname:<input type="text" name="pass">
<input type="submit" value="submit">
</form>
<?
$pass=$_POST['pass'];
if($pass == "dog")
{
print("Thank you for loging in");
}
else{
print("sorry not in data base");
}
?>thanks in advanced
__________________
Good better best, never let it rest, untill your good is better and your better is the best. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|