PHP - ayuda con php

 
Vista:

ayuda con php

Publicado por patty (1 intervención) el 30/09/2010 20:13:52
ola tngo una base de datos en mysql con varios campos dentro de los cuales esta el campo foto... lo que quiero hacer es q al poner el rpe del trabajador arroje todos los datos junto con la fotografia, para esto ya tengo hecho el codigo de logueo donde pide el rpe y me manda a la siguiente pagina con los datos pero sin la fotografia... t pondre el codigo para que me puedas ayudar con el codigo para poder arrojar la fotografia....

<?php
//Configuracion de la conexion a base de datos
$conexion = mysql_connect("127.0.0.1", "paty","12345");
mysql_select_db('capacitacion', $conexion);
$rpe = "".$_POST['rpe_input']."";

$res=mysql_query("SELECT * FROM capacitacion WHERE `rpe` ='".$rpe."'");

while ($row = mysql_fetch_array ($res)) {

$id = $row ['Id'];
$regrpe= $row ['RPE'];
$nombre= $row ['NOMBRE'];
$apaterno= $row ['APELLIDO_PATERNO'];
$amaterno= $row ['APELLIDO_MATERNO'];
$curp= $row ['CURP'];
$puesto= $row ['PUESTO'];
$foto= $row ['FOTO'];
$sexo= $row ['SEXO'];
$rfc= $row ['RFC'];
$departamento= $row ['DEPARTAMENTO'];
$cons= $row ['CONS'];
$go= $row ['GO'];
$nd= $row ['ND'];
$fechaing= $row ['FECHA_INGRESO'];
$fechajub= $row ['FECHA_JUBILACION'];
$st= $row ['ST'];
$cetra= $row ['CETRA'];
$tipocont= $row ['TIPO_CONTRATO'];
$hhb= $row ['HHB'];
$hht= $row ['HHT'];
$plancarre= $row ['PLAN_CARRERA'];
$pts= $row ['PTS'];
$reemplazo= $row ['REEMPLAZO'];
$pti= $row ['PTI'];
$hhcprog= $row ['HHC_PROGRAMADAS'];
$hhcreal= $row ['HHC_REALIZADAS'];
$dacind= $row ['DAC_INDIVIDUAL'];
$ntclapli= $row ['NTCL_APLICABLE'];
$ntclcert= $row ['NTCL_CERTIFICADO'];
$ntclapli2= $row ['NTCL_APLICABLE_2'];
$ntclcert2= $row ['NTCL_CERTIFICADO_2'];
$esco= $row ['ESCOLARIDAD'];
$t= $row ['T'];
$p= $row ['P'];
$carrera= $row ['CARRERA'];
$instedu= $row ['INTITUCION_EDUCATIVA'];
$añosest= $row ['AÑOS_ESTUDIO'];
$posg= $row ['POSGRADO'];
$espc= $row ['ESPECIALIDAD'];
$inst= $row ['INSTITUCION'];

// cambien los campos no se cual de la BD contiene la edad ni la antiguedad

}

?>
<br>
<table width="1225" border="1" align="center" cellpadding="3" cellspacing="2" bordercolor="#FF3300" style="text-align: left; background-color: rgb(0, 102, 0); width: 1207px; height: 52px;">

<tbody>

<tr>

<td width="713">NOMBRE: <span class="Estilo4"><?php echo "".$nombre." ".$apaterno." ".$amaterno ?></span><br> </td>

<td width="492" bordercolor="#FF3300">R.P.E: <span class="Estilo4"> <?php echo "".$regrpe."" ?> </span><br> </td>

<td width="492">CURP: <span class="Estilo4"> <?php echo "".$curp."" ;?></span></td>
</tr>
</tbody>
</table>

<table width="1225" border="1" align="center" cellpadding="3" cellspacing="2" bordercolor="#FF3300" style="text-align: left; background-color: rgb(0, 102, 0); width: 1207px; height: 52px;">
<tbody>
<tr>
<td width="219">SEXO: <span class="Estilo4"><?php echo "".$sexo."" ?></span><br>
</td>
<td width="326">R.F.C: <span class="Estilo4"> <?php echo "".$RFC."" ?> </span><br>
</td>
<td width="628">DEPARTAMENTO: <span class="Estilo4"> <?php echo "".$departamento."" ;?></span></td>
</tr>
</tbody>
</table>
<br>

<table width="1232" border="1" align="center" cellpadding="2" cellspacing="2" bordercolor="#FF3300" style="text-align: left; background-color: rgb(0, 102, 0); width: 1207px; height: 115px;">

<tbody>

<tr>

<td width="532">FOTO: <img src="imagenes/jpg" width="116" height="158"></td>

<td width="655">PUESTO: <span class="Estilo4"> <?php echo "".$puesto."" ?></span></td>
</tr>
</tbody>
</table>

<p align="right"> </p>
<table width="721" border="3" bgcolor="#006600">
<tr>
<td width="196">CONS</td>
<td width="505"><span class="Estilo4"> <?php echo "".$cons."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">GO</td>
<td width="506"><span class="Estilo4"> <?php echo "".$go."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">ND</td>
<td width="506"><span class="Estilo4"> <?php echo "".$nd."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">FECHA DE INGRESO</td>
<td width="506"><span class="Estilo4"> <?php echo "".$fechaing."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">FECHA DE JUBILACION </td>
<td width="506"><span class="Estilo4"> <?php echo "".$fechajub."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">ST</td>
<td width="506"><span class="Estilo4"> <?php echo "".$st."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">CETRA</td>
<td width="506"><span class="Estilo4"> <?php echo "".$cetra."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">TIPO DE CONTRATO </td>
<td width="506"><span class="Estilo4"> <?php echo "".$tipocont."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">HHB</td>
<td width="506"><span class="Estilo4"> <?php echo "".$hhb."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">HHT</td>
<td width="506"><span class="Estilo4"> <?php echo "".$hht."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">PLAN DE CARRERA </td>
<td width="506"><span class="Estilo4"> <?php echo "".$plancarre."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">PTS</td>
<td width="506"><span class="Estilo4"> <?php echo "".$pts."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">REEMPLAZO</td>
<td width="506"><span class="Estilo4"> <?php echo "".$reemplazo."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">PTI</td>
<td width="506"><span class="Estilo4"> <?php echo "".$pti."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">HHC PROGRAMADAS </td>
<td width="506"><span class="Estilo4"> <?php echo "".$hhcprog."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">HHC REALIZADAS </td>
<td width="506"><span class="Estilo4"> <?php echo "".$hhcreal."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">DAC INDIVIDUAL </td>
<td width="506"><span class="Estilo4"> <?php echo "".$dacind."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">NTCL APLICABLE </td>
<td width="506"><span class="Estilo4"> <?php echo "".$ntclapli."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">NTCL CERTIFICADO </td>
<td width="506"><span class="Estilo4"> <?php echo "".$ntclcert."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">NTCL APLICABLE 2 </td>
<td width="506"><span class="Estilo4"> <?php echo "".$ntclapli2."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">NTCL CERTIFICADO 2 </td>
<td width="506"><span class="Estilo4"> <?php echo "".$ntclcert2."" ?></span></td>
</tr>
</table>
<table width="340" border="3" bgcolor="#006600">
<tr>
<table width="721" border="3" bgcolor="#006600">
<tr>
<td width="195">ESCOLARIDAD </td>
<td width="506"><span class="Estilo4"> <?php echo "".$esco."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">T</td>
<td width="506"><span class="Estilo4"> <?php echo "".$t."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">P </td>
<td width="506"><span class="Estilo4"> <?php echo "".$p."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">CARRERA</td>
<td width="506"><span class="Estilo4"> <?php echo "".$carrera."" ?></span></td>
</tr>
</table>
<table width="723" border="3" bgcolor="#006600">
<tr>
<td width="197">INSTITUCION EDUCATIVA </td>
<td width="506"><span class="Estilo4"> <?php echo "".$instedu."" ?></span></td>
</tr>
</table>
<table width="723" border="3" bgcolor="#006600">
<tr>
<td width="197">AÑOS DE ESTUDIO </td>
<td width="506"><span class="Estilo4"> <?php echo "".$añosest."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">POSGRADO</td>
<td width="506"><span class="Estilo4"> <?php echo "".$posg."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">ESPECIALIDAD</td>
<td width="506"><span class="Estilo4"> <?php echo "".$espec."" ?></span></td>
</tr>
</table>
<table width="722" border="3" bgcolor="#006600">
<tr>
<td width="196">INTITUCION</td>
<td width="506"><span class="Estilo4"> <?php echo "".$inst."" ?></span></td>
</tr>
</table>
<p> </p>
<tr><p>           
       </p>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:ayuda con php

Publicado por Rafa (1 intervención) el 01/10/2010 09:21:29
Tienes esto:
<img src="imagenes/jpg" width="116" height="158">

Debe de ser algo así:
<img src="<ruta><?=$foto?>">

Por ejemplo tu ruta es imagenes/

<img src="imagenes/<?=$foto?>">
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar