Foros del Web » Programando para Internet » PHP »

estudiante necesita ayuda

Estas en el tema de estudiante necesita ayuda en el foro de PHP en Foros del Web. Hola antes que nada XD Bueno soy estudiente y estoy haciendo un proyecto tarea y no se como poder hacer lo siguiente espero que alguien ...
  #1 (permalink)  
Antiguo 28/11/2008, 09:33
 
Fecha de Ingreso: noviembre-2008
Mensajes: 3
Antigüedad: 15 años, 4 meses
Puntos: 0
estudiante necesita ayuda

Hola antes que nada XD
Bueno soy estudiente y estoy haciendo un proyecto tarea y no se como poder hacer lo siguiente espero que alguien me pueda orientar o ayudar.

el problema es lo siguiente. tengo mi base de datos de usuarios con todos sus datos como nombre telefono correo contraseña y demas cositas personales

como puedo hacer para que cuando entre al sitio con su usuaio y contraseña le despligue una pagina con la informacion personal de el solamente.

y la otra es comopuedo poner imagenes personales de esata persona en la base de datos para que cuando entre al sitio tambien las pueda ver esta persaona.

espero averme dado a entender correctamente.

Gracias de antemano XD
  #2 (permalink)  
Antiguo 28/11/2008, 09:36
Avatar de Carxl
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: Bogotá
Mensajes: 2.993
Antigüedad: 17 años, 8 meses
Puntos: 70
Respuesta: estudiante necesita ayuda

Hola arkancorp, bienvenido al foro!

En la parte de arriba de este foro, verás que un link que dice "Indice de FAQ's", son las preguntas mas comunes con sus respectivas respuestas que hay en php, léelas al menos antes de postear vale?

Te dejo un link que te puede servir:
http://www.forosdelweb.com/f18/faqs-...00/#post254361

O mira este link

Saludos
__________________
Hay 10 tipos de personas, los que entienden binario y los que no. (Anónimo)
www.programandoweb.com

Última edición por Carxl; 28/11/2008 a las 09:43
  #3 (permalink)  
Antiguo 28/11/2008, 09:50
 
Fecha de Ingreso: noviembre-2008
Mensajes: 3
Antigüedad: 15 años, 4 meses
Puntos: 0
Respuesta: estudiante necesita ayuda

oks muchas gracias por el tips ya empese a leer la informacion que me recomendastes, espero que me quede todo claro XD hehehe
  #4 (permalink)  
Antiguo 28/11/2008, 10:25
(Desactivado)
 
Fecha de Ingreso: febrero-2008
Mensajes: 83
Antigüedad: 16 años, 1 mes
Puntos: 0
Respuesta: estudiante necesita ayuda

Puedo ver lo que estas poniendo y como l estas haciendo para explicarte??
  #5 (permalink)  
Antiguo 28/11/2008, 15:20
 
Fecha de Ingreso: noviembre-2008
Mensajes: 3
Antigüedad: 15 años, 4 meses
Puntos: 0
Respuesta: estudiante necesita ayuda

oks mira tengo un archivo llamado registro.php

Cita:
<?php require_once('Connections/temisaenlinea.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO clientes (usuario, password, email, nombre, apellido, telefono, empresa, direccion, trabajo) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['usuario'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['nombre'], "text"),
GetSQLValueString($_POST['apellido'], "text"),
GetSQLValueString($_POST['telefono'], "int"),
GetSQLValueString($_POST['empresa'], "text"),
GetSQLValueString($_POST['direccion'], "text"),
GetSQLValueString($_POST['trabajo'], "text"));

mysql_select_db($database_temisaenlinea, $temisaenlinea);
$Result1 = mysql_query($insertSQL, $temisaenlinea) or die(mysql_error());

$insertGoTo = "panel.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right">Usuario:</td>
<td><input type="text" name="usuario" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Password:</td>
<td><input type="password" name="password" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Email:</td>
<td><input type="text" name="email" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Nombre:</td>
<td><input type="text" name="nombre" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Apellido:</td>
<td><input type="text" name="apellido" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Telefono:</td>
<td><input type="text" name="telefono" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Empresa:</td>
<td><input type="text" name="empresa" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Direccion:</td>
<td><input type="text" name="direccion" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Trabajo:</td>
<td><input type="text" name="trabajo" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">&nbsp;</td>
<td><input type="submit" value="Insertar registro" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
<p>&nbsp;</p>
</body>
</html>
con ese registro los usuarios y luego
coneste mas es el login

Cita:
<?php require_once('Connections/temisaenlinea.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset($_POST['usuario'])) {
$loginUsername=$_POST['usuario'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "index.php";
$MM_redirectLoginFailed = "registro.php";
$MM_redirecttoReferrer = true;
mysql_select_db($database_temisaenlinea, $temisaenlinea);

$LoginRS__query=sprintf("SELECT usuario, password FROM clientes WHERE usuario=%s AND password=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));

$LoginRS = mysql_query($LoginRS__query, $temisaenlinea) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";

//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;

if (isset($_SESSION['PrevUrl']) && true) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
<label>usuario
<input type="text" name="usuario" id="usuario" />
</label>
<p>
<label>password
<input type="password" name="password" id="password" />
</label>
</p>
<p>
<label>
<input type="submit" name="entrar" id="entrar" value="Entrar" />
</label>
</p>
</form>
</body>
</html>
lo que no se es que cuando logie el usuario aparescan la informacion del usuario con algunas fotos del usuario es todo, pero no si como hacer para despues de que logie salga la info del usuario

aver si te sirve de algo.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 08:34.