Jump to content

Option and


IdioticMe

Recommended Posts

I'm trying to create VIP zone, but I need to check if user has input correct username and password....I tried to make it work this way

HTML

<form action="vipchat.php" method="post" />
Korisnicko ime: <input type="text" name="ime"/>
Lozinka: <input type="password" name="lozinka"/>
<input type="submit" value="Uloguj se"/>
</form>

php

<?php
$imet = "komp";
$sifrat = "racun";

if ($_POST["ime"]==$imet)and($_POST["lozinka"]==$sifrat) 
echo "Tacno je";
else echo "Netacno je";
?> 

But it gives me this error

Parse error: syntax error, unexpected T_LOGICAL_AND in C:\AppServ\www\adm\vipchat.php on line 16

Link to comment
https://forums.phpfreaks.com/topic/253962-option-and/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.