Jump to content

help with simple php


perezf

Recommended Posts

:-\
what is wrong with the following code
i am getting an  error
[quote]Parse error: parse error, unexpected T_BOOLEAN_AND in /hsphere/local/home/way2fr3s/2fr3sh.com/userlogin.php on line 15[/quote]
[code]<?php
$username = "admin";
$password = "password";

$user = $_POST['user'];
$pass = $_POST['pass'];

if($user == $username) && if($pass == $password) {//line 15
echo "Welcome to our site $user.";
} else { ?>
<form name="form1" method="post" action="">
  <p>
    UserName:<br>
    <input type="text" name="user">
    <br>
  Password:<br>
  <input type="text" name="pass">
  <br>
  <input type="submit" name="Submit" value="Submit">
</p>
</form><?php } ?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/20286-help-with-simple-php/
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.