Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-05-2007, 08:44 AM
TcM's Avatar   
TcM TcM is offline
Code Warrior
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,332
Rep Power: 68
TcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of light
Default Enter Password first

I saw the tutorial on how to make simple register/lof in/log off system in the tutorials section, but it didn't work. Anyways I would like to know how to make just a simple password box and a button..if the password is correct then you enter in the next page. I can make it with JavaScript, but if someone views the source it can be easily detected, so I would like to use PHP.. any one can help me please?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 06-05-2007, 03:12 PM
Jaan's Avatar   
Jaan Jaan is offline
Mod
 
Join Date: Dec 2006
Location: Estonia
Age: 17
Posts: 930
Last Blog:
AdStar Ad Control Pa...
Rep Power: 16
Jaan is a jewel in the roughJaan is a jewel in the roughJaan is a jewel in the roughJaan is a jewel in the rough
Send a message via MSN to Jaan
Default

i guess it's like this

PHP Code:
<?php
// You must define your password below
$password "dang";
$pass $_POST['pass'];
$enter $_POST['enter'];

if(isset(
$enter) && $pass == $password){
// Change this http:// thingy to your page address
header("Location: http://yoursite.com");
}elseif(isset(
$enter) && $pass != $password){
echo 
"Your password is wrong!<br>";
echo 
"<form action='' method='post'>"
    
."Password: <input type='text' name='pass' size='30'>"
    
."<input type='submit' name='enter' value='Enter'>"
    
."</form>";
}else{

echo 
"<form action='' method='post'>"
    
."Password: <input type='text' name='pass' size='30'>"
    
."<input type='submit' name='enter' value='Enter'>"
    
."</form>";
}
?>
i hope it helped ^^
__________________


Cheap & Professional Web Design | Need help? Send a PM

Last edited by Jaan; 06-05-2007 at 03:17 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-13-2007, 09:03 AM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

You could always use .htaccess for this as well.
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-13-2007, 10:37 AM
Jaan's Avatar   
Jaan Jaan is offline
Mod
 
Join Date: Dec 2006
Location: Estonia
Age: 17
Posts: 930
Last Blog:
AdStar Ad Control Pa...
Rep Power: 16
Jaan is a jewel in the roughJaan is a jewel in the roughJaan is a jewel in the roughJaan is a jewel in the rough
Send a message via MSN to Jaan
Default

yea.. .htaccess is better for it ^^
__________________


Cheap & Professional Web Design | Need help? Send a PM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-14-2007, 11:02 AM
TcM's Avatar   
TcM TcM is offline
Code Warrior
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,332
Rep Power: 68
TcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of light
Default

Well thanks for helping me. Umm anyways I'm having 'problems' with .htaccess if you can help please see this:-
http://forum.codecall.net/search-eng...endly-url.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding a change password form InternetGeek Visual Basic Programming 11 02-16-2008 02:53 PM
Forgot Your Password On XP? pranky Tutorials 12 04-26-2007 10:08 AM
Critical Firefox hole allows password theft Jordan Technology Ramble 31 01-22-2007 10:48 AM
Client/Server Changing Password feature MrNobody Visual Basic Programming 1 11-19-2006 05:10 AM
Password Reset Disk PC101 Technology Ramble 0 09-12-2006 09:42 PM


All times are GMT -5. The time now is 04:18 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads