Simple Script
Posted: Thu Mar 27, 2008 7:13 am
Hello. I'm trying to build this script and i've some problems whit it.
Now, becouse my knowledges of PHP are too low, some parts of the script are still going to be edited by hand.
What i'm trying to do:
I've this:
Now my question is, can I do this with one file instead of 3-4 files (file0.php, file2.php etc.)?
I mean, if this script is my index, then it search in file called f.ex. passwords.php where is the content of file0, file1... and when I type right pass to show me another part of this file.
If I can't make myself clear I can give you a link to see.
Thank you!
Now, becouse my knowledges of PHP are too low, some parts of the script are still going to be edited by hand.
What i'm trying to do:
I've this:
Code: Select all
<?php
$pass0='';
$pass1='pass1';
$pass2='pass2';
$pass3='pass3';
if($_POST['password']==$pass0)
require('file0.php');
elseif($_POST['password']==$pass1)
require('file1.php');
elseif($_POST['password']==$pass2)
require('file2.php');
elseif($_POST['password']==$pass3)
require('file3.php');
else {
echo "wrong password"
}
?>
I mean, if this script is my index, then it search in file called f.ex. passwords.php where is the content of file0, file1... and when I type right pass to show me another part of this file.
If I can't make myself clear I can give you a link to see.
Thank you!