Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Aug 15th, 2007, 8:20 PM   #1
Kelvoron
Programmer
 
Kelvoron's Avatar
 
Join Date: Aug 2007
Location: Ohio
Posts: 46
Rep Power: 0 Kelvoron is on a distinguished road
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.
Kelvoron is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:15 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC