Ok, I'm trying to make a simple username,password system, and I need to know where the { } marks go. This is my first time with php. Here is the code:
<?php
$found=0;
$filefopen("members.dat", "r");
(!feof($file))
$line=fgets($file,255);
$line=chop($line);
$field=split("#",$line,6);
if($username==$field[0])
$found=1;
if(password!=$field[1])
print "<h2>Wrong Password</h2>";
die();
if($found==0)
{print "<h2>Username does not exist</h2>";
die();
?>
Thanks a ton! I don't understand these marks.
This part is supposed to authenticate a user before displaying the page.
<?php
$found=0;
$filefopen("members.dat", "r");
(!feof($file))
$line=fgets($file,255);
$line=chop($line);
$field=split("#",$line,6);
if($username==$field[0])
$found=1;
if(password!=$field[1])
print "<h2>Wrong Password</h2>";
die();
if($found==0)
{print "<h2>Username does not exist</h2>";
die();
?>
Thanks a ton! I don't understand these marks.
This part is supposed to authenticate a user before displaying the page.