Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 07-29-2008, 07:02 PM   #1
Baseband Member
Join Date: Apr 2006
Posts: 47
Question [PHP] Login and Security help

I have made a posting script (a kind of shout box system)
I need to have a way to make sure that whatever script is being processed is coming from the same server (i know there is a way to do this) but how?
and also i need a login system.. if i was to implement a system such as this...

PHP Code:
if (isset(
$_POST['user']) && isset($_POST['pass']))
    if (
$_POST['user'] === 'user' && $_POST['pass'] === 'pass')
$_SESSION['aloud '] = true;
header('Location: protectedish.php');
$wrong 'Wrong User/Password';

and then this on each "protected" page...

PHP Code:
if (!isset(
$_SESSION['aloud']) or $_SESSION['aloud'] !== true)
header('Location: login.php');
I am assuming this is not very secure, and it is also inconvenient, for instance if i need to use another "header('location:')" somewhere else it won't work.

bearing in mind that i only need one user, and i would like a system where the user can easy change the password, what would be a good system? and what are other methods to keep my scripts secure?

sorry for all those questions
Say no to fascism, Don't get vista.
davidflatman is offline   Reply With Quote

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 Off

All times are GMT -5. The time now is 08:30 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0