Código PHP:
<?php
session_start();
include('conectarbd.php');
$sql = mysql_query("SELECT * FROM usuarios WHERE username = '$_POST[username]' AND password = '$_POST[password]';");
$num = mysql_num_rows($sql);
if ($num == 1)
{
$fila = mysql_fetch_assoc($sql);
$_SESSION["username"] = $fila[username];
$_SESSION["password"] = $fila[password];
$_SESSION["email"] = $fila[email];
$_SESSION["creditos"] = $fila[creditos];
$_SESSION["aportes"] = $fila[aportes];
?>
<META HTTP-EQUIV="Refresh" CONTENT="3; URL=index.php">
<?php
}
else
{
echo "El usuario o contraseña son incorrectos";
}
?>
alguien sabe como solucionarlo?
gracias.