Código PHP:
Parse error: syntax error, unexpected '[' in /home/webcindario/s/o/socialnet/login.php on line 9
Código PHP:
<?php
session_start();
include("mysql_connect.php");
$useremail = $_REQUEST['email'];
$usercontrasena = $_REQUEST['contrasena'];
$data_str = "SELECT * FROM usuarios WHERE email='".$useremail."'";
$data_sql = mysql_query($data_str,$link);
$data = mysql_fetch_row($data_sql);
$email = data[2];
$contrasena = data[1];
if ($useremail != $email){
echo "El e-mail introducido no está registrado.";
}
else
{
if ($usercontrasena != $contrasena){
echo "La contraseña introducida es oncorrecta.";
}
else
{
$_SESSION["logged"] = "yes";
$_SESSION["email"] = $useremail;
}
}
?>