Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Whats wrong in this code?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Whats wrong in this code?

Postby jitenthapa56 » Sat Sep 29, 2012 2:40 am

<?php
$user=$_get["username"];
$pass=$_get["password"];
$file1=fopen("user.txt","r");
$pos=0;
while (!feof($file1))
{
$a=fgets($file)
$pos=$pos+1;
if ($a==$user)
{
$b=1;
break;
}
}
fclose($file1);
$file2=fopen("pass.txt","r");
while(!$p==$position)
{
$e=fgets($file2)
$p=$p+1;
if ($e==$pass)
{
$z=1;
}
}
if ($b=1 and $z=1)
{
echo "your id is correct";
}
else
{
echo "Incorrect id";
}
?>
jitenthapa56
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sat Sep 29, 2012 2:33 am

Return to PHP coding => General

Who is online

Users browsing this forum: Alexa [Bot], Bing [Bot] and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron