Problem with PHP/MySql
#1

I'm building an UCP, using some old tutorials of the forum, but the PHP show a problem, always show the message: There was no values for username or password posted!, even typing values in both fields, code below:

Код HTML:
<form name="input" action="login.php" method="post">
Username: <input type="text" name="user" /> <br />
Password: <input type="password" name="password" /> <br />
<input type="submit" value="Submit" />
PHP код:
<?php
session_start
();
if ((!isset(
$_POST["user"]) || !isset($_POST["password"])) && !isset($_SESSION["username"]))
{
    echo 
"There was no values for username or password posted!!";
}
else
{
    include (
"variables.php");
    
$connection mysql_connect ($dbservername$dbusername$dbpassword);
    
mysql_select_db($dbname$connection);
    
    if (!isset(
$_SESSION["username"]))
    {
        
$username mysql_escape_string($_POST["user"]);
        
$password mysql_escape_string($_POST["password"]);
    }
    else 
$username mysql_escape_string($_SESSION["username"]);
....
Reply


Messages In This Thread
Problem with PHP/MySql - by dudu.r.oliveira - 14.06.2015, 19:37
Re: Problem with PHP/MySql - by FplayerGR - 15.06.2015, 08:44
Re: Problem with PHP/MySql - by mamorunl - 15.06.2015, 08:58

Forum Jump:


Users browsing this thread: 4 Guest(s)