Código PHP:
Ver original$usuariodelperfil= "Aquí deberias de indicar el valor de la base de datos con el nombre del propietario de este perfil, es decir de la consulta que utilices para mostrar los datos";
if($_SESSION['username']==$usuariodelperfil){
echo "Este perfil es tuyo";
}else{
echo "Este perfil no es tuyo";
}
hice esto
Código PHP:
Ver original<?php
include ('verificar.php');
include ('conexion.php');
$usuariodelperfil= $_POST['user'];
if($_SESSION['username']==$usuariodelperfil){
echo "Este perfil es tuyo";
}else{
echo "Este perfil no es tuyo";
}
?>
// y siempre muestra no es tuyo aunque inice la sesion
Código PHP:
Ver original// LA VERIFICACION DE LA BASE DE DATOS QUE TNGO ES ESTA
<?php
include("conexion.php");
/*$re = ''.$_POST['user'].'/'.'index='.$_POST['user'].'.php';
*/if(isset($_POST['user']) && !empty($_POST['user'])
{
$sel=mysql_query("SELECT USER,PW FROM registro WHERE USER='$_POST[user]'",$con);
if($_POST['pw']== $sesion['PW']){
$_SESSION['username'] = $_POST['user'];
echo "sesion exitosa";
}
else{echo "error vuelve a intentarloee";}}
else{echo "debes llenar ambos camos";}
?>
Código PHP:
Ver original//ESTO TENGO EN LA PAGINA INICIO DE SESION
<form action="verificar.php" method="post">
<table width="200" border="0">
<tr>
<td class="campos">Usuario(nickname) </td>
<td> <input id="cajas" type="text" name="user" /> </td>
</tr>
<tr>
<td class="campos">Password </td>
<td> <input id="cajas" type="text" name="pw" /> </td>
</tr>
<td></td>
<p> </p>
<td> <input class="registrar"type="submit" value="entrar"/> </td>
</tr>
</table>
</form>
// ya me confundi :SS muchas gracias por tomarse el tiempo de leer el codigo !