Respuesta: Mostrar foto de perfil en boleta de notas - con PHP y MySQL este es mi codigo del record academico:
<?php require_once('Connections/undcnot.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;
}
}
$codigo_Recordset1 = "-1";
if (isset($_POST['codigo'])) {
$codigo_Recordset1 = $_POST['codigo'];
}
mysql_select_db($database_undcnot, $undcnot);
$query_Recordset1 = sprintf("SELECT ccodalum, valum, vcar, turno,codcur,nomcur,icredcur,ciclo,semestre,vdocen te,nf,pro FROM tbactas141 WHERE ccodalum=%s", GetSQLValueString($codigo_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $undcnot) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$codigo_Recordset2 = "-1";
if (isset($_POST['codigo'])) {
$codigo_Recordset2 = $_POST['codigo'];
}
mysql_select_db($database_undcnot, $undcnot);
$query_Recordset2 = sprintf("SELECT ccodalum, valum, vcar, turno,codcur,nomcur,icredcur,ciclo,semestre,vdocen te,nf,pro FROM tbactas141_2 WHERE ccodalum=%s", GetSQLValueString($codigo_Recordset2, "text"));
$Recordset2 = mysql_query($query_Recordset2, $undcnot) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
$codigo_Recordset3 = "-1";
if (isset($_POST['codigo'])) {
$codigo_Recordset3 = $_POST['codigo'];
}
mysql_select_db($database_undcnot, $undcnot);
$query_Recordset3 = sprintf("SELECT ccodalum, valum, vcar, turno,codcur,nomcur,icredcur,ciclo,semestre,vdocen te,nf FROM tbactas141_3 WHERE ccodalum=%s", GetSQLValueString($codigo_Recordset3, "text"));
$Recordset3 = mysql_query($query_Recordset3, $undcnot) or die(mysql_error());
$row_Recordset3 = mysql_fetch_assoc($Recordset3);
$totalRows_Recordset3 = mysql_num_rows($Recordset3);
?>
<!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=latin1_spanish_ci"/>-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>UNDC</title>
<link href="undc.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Estilo1 {font-size: small}
-->
</style>
<style type="text/css">
<!--
.Estilo2 {font-size: medium}
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
-->
</style>
<script type="text/javascript">
function imprSelec(record)
{var ficha=document.getElementById(record);var ventimp=window.open(' ','popimpr');ventimp.document.write(ficha.innerHTM L);ventimp.document.close();ventimp.print();ventim p.close();}
</script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body class="oneColElsCtr" background="imagenes/fondoP.png">
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="record">
<div align="center" id="record">
<form action="record" method="get"><div align="center"><CENTER>
<img src="images/UNDC15.jpg" alt="RECORD" width="820" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="172" />
<tr>
<td table width="8%" align="justify" bordercolor="#00CC00"height="46"cellpadding="2" bgcolor="#FFFFFF" cellspacing="1" rowspan="4"><table border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#003300" bgcolor="#FFFFFF">
<tr> </tr>
<tr>
<td width="10%" height="10" align="center" bgcolor="#00CC00" class="Estilo2"><font color="#000033"
face= "BOOKMAN OLD STYLE" class="Estilo1"><strong>CODIGO:</strong></font></td>
<td width="25%" colspan="5" align="left" bgcolor="#FFFFCC" class="Estilo2"><strong><?php echo $row_Recordset1['ccodalum']; ?></strong></td>
<td table width="8%" align="justify" bordercolor="#00CC00"height="46"cellpadding="2" bgcolor="#FFFFFF" cellspacing="1" rowspan="4">
<!--FOTO-->
<!--Aqui debe ir la foto-->
<!--FOTO--> |