ProWebTalk Webmaster Community  

Go Back   ProWebTalk Webmaster Community > Web Design and Development > Programming Discussion > PHP and MySQL

Reply
 
LinkBack Thread Tools Display Modes
Old 12-06-2008, 02:33 PM   #1 (permalink)
Junior Member
 
Join Date: Dec 2008
Posts: 6
[Unsecure] My first PHP script ever

This script was the very first working script I ever made a couple of years ago. Here is the HTML part:

index.html:
PHP Code:
<form action="login.php" method="post">
 <
input type="password" value="Password" name="password" />
 <
input type="submit" value="Login" />
</
form
login.php:
PHP Code:
<?php
$pass 
$_get['password'];
if(
$pass == thisisthepassword) {
include(
"/home.php");
} else {
echo 
"Password Incorrect";
}
?>
Yes I know, bad, very unsecure, yet easy.
Mike is offline   Reply With Quote
Old 12-06-2008, 02:40 PM   #2 (permalink)
Administrator
 
Chris's Avatar
 
Join Date: Oct 2008
Location: Pennsylvania
Posts: 1,082
Send a message via ICQ to Chris Send a message via AIM to Chris Send a message via MSN to Chris Send a message via Yahoo to Chris Send a message via Skype™ to Chris
I know you made it just to screw around most likely, but unless you were wanting to simply secure one part of the site so only people who know the password can enter, this wouldn't be of much use considering there is no user name or database sending/retrieving. (Nowadays cPanel has a built in function to secure a directory as well.)
Chris is offline   Reply With Quote
Old 12-06-2008, 02:53 PM   #3 (permalink)
Premium Member
 
Join Date: Nov 2008
Posts: 365
I remember that, was also something of the first i made
searchia is offline   Reply With Quote
Reply

Bookmarks


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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:49 PM.

Dedicated Hosting for this site provided by Versaweb

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0