Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/05/2012, 17:47
ofertasdiarias
 
Fecha de Ingreso: marzo-2011
Mensajes: 115
Antigüedad: 14 años
Puntos: 0
Respuesta: subir imagen de perfil segun usuario

y esta es la otra pagina donde se ve la imagen.:

Código PHP:
Ver original
  1. <?php require_once('Connections/hoysale.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6.   $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  7.  
  8.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  9.  
  10.   switch ($theType) {
  11.     case "text":
  12.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  13.       break;    
  14.     case "long":
  15.     case "int":
  16.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  17.       break;
  18.     case "double":
  19.       $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
  20.       break;
  21.     case "date":
  22.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  23.       break;
  24.     case "defined":
  25.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  26.       break;
  27.   }
  28.   return $theValue;
  29. }
  30. }
  31.  
  32. $varusuario_un = "-1";
  33. if (isset($_SESSION['MM_Username'])) {
  34.   $varusuario_un = $_SESSION['MM_Username'];
  35. }
  36. mysql_select_db($database_hoysale, $hoysale);
  37. $query_un = sprintf("SELECT * FROM cambiar_cabezera_usuario WHERE cambiar_cabezera_usuario.id_registro AND cambiar_cabezera_usuario.id=%s", GetSQLValueString($varusuario_un, "int"));
  38. $un = mysql_query($query_un, $hoysale) or die(mysql_error());
  39. $row_un = mysql_fetch_assoc($un);
  40. $totalRows_un = mysql_num_rows($un);
  41.  
  42. ?>
  43. <img src="<?php echo $row_un['imagen']; ?>" width="100" height="100">


porfavor ayuda!!!