
29/05/2006, 21:35
|
| | Fecha de Ingreso: marzo-2006
Mensajes: 86
Antigüedad: 19 años Puntos: 0 | |
ni idea...de como empezar...menos mal que estan uds...
A ver, yo les paso el codigo que uso a ver si me tiran una punta....y puedo empezar a renegar...
Código:
<?php include("../conex.php"); ?>
.CODIGO DONDE ARMO UN MENU
<?php
if($enviar){
conectarse();
$fecha_larga=getdate();
$fecha = sprintf("%s/%s/%s", $fecha_larga['year'],$fecha_larga['mon'],$fecha_larga['mday']);
$posicion = (strrpos ($imagen,'\\') + 1);
$imagen = substr($imagen,$posicion);
$imagen2 = substr($imagen2,$posicion);
$imagen3 = substr($imagen3,$posicion);
$imagen4 = substr($imagen4,$posicion);
$imagen5 = substr($imagen5,$posicion);
$sql = "INSERT INTO noti (notiide, notifec, notisec, notiaut, notivol, notitit, notisub, noticop, notides, notiima, notiim2, notiim3, notiim4, notiim5)";
$sql .= " VALUES ('null','$fecha','$cod_seccion','$autor','$volanta','$titulo','$subtitulo','$copete','$desarrollo','$imagen', '$imagen2','$imagen3','$imagen4','$imagen5')";
$result = mysql_query($sql);
if (mysql_errno()) {
echo mysql_errno().": ".mysql_error()."<br>";
}
else {
echo "Datos Actualizados.\n";
echo "<a href=consulta_noticias.php><b>CONSULTA NOTICIAS</b></a>";
}
}else{
?>
</p>
<H1 align="center"> <font size="4"><em>CARGA DE NOTICIAS</em></font></H1>
<H1 align="center"> </H1>
<Form method="Post" action="alta_noticias.php">
<table width="81%" border="0" align="left">
<tr>
<td width="12%" height="31" valign="top"><font size="3">Sección:</font></td>
<td width="37%"><select name="cod_seccion" size="1" id="select3">
<?php
conectarse();
$result_secc = mysql_query ("select * from secc order by seccdes");
while($myrow = mysql_fetch_array($result_secc))
{
echo "<option value=" . $myrow[seccide] . ">" .$myrow[seccdes] . "</option>";
}
?>
</select></td>
<td width="8%">Autor:</td>
<td width="43%"><select name="autor" size="1" id="select4">
<?php
conectarse();
$result_aut = mysql_query("select * from auto order by autonom");
while($myrow = mysql_fetch_array($result_aut))
{
echo "<option value=" . $myrow[autoide] . ">" . $myrow[autonom] . "</option>";
}
?>
</select></td>
</tr>
<tr>
<td valign="top"><font size="3">Volanta:</font></td>
<td colspan="3"><textarea name="volanta" cols="70" id="textarea5"></textarea></td>
</tr>
<tr>
<td valign="top"><font size="3">Título: </font></td>
<td colspan="3"><textarea name="titulo" cols="70" id="textarea6"></textarea></td>
</tr>
<tr>
<td valign="top"><font size="3">Subtítulo: </font></td>
<td colspan="3"><textarea name="subtitulo" cols="70" id="textarea7"></textarea></td>
</tr>
<tr>
<td valign="top"><font size="3">Copete: </font></td>
<td colspan="3"><textarea name="copete" cols="70" id="textarea8"></textarea></td>
</tr>
<tr>
<td valign="top"><font size="3">Desarrollo: </font></td>
<td colspan="3"><textarea name="desarrollo" cols="70" rows="7" id="textarea9"></textarea></td>
</tr>
<tr>
<td valign="top">Imagen1:</td>
<td colspan="3"><input name="imagen" type="file" id="imagen" value="" size="32" maxlength="100"></td>
</tr>
<tr>
<td valign="top">Imagen2:</td>
<td colspan="3"><input name="imagen2" type="file" id="imagen2" value="" size="32" maxlength="100"></td>
</tr>
<tr>
<td valign="top">Imagen3:</td>
<td colspan="3"><input name="imagen3" type="file" id="imagen3" value="" size="32" maxlength="100"></td>
</tr>
<tr>
<td valign="top">Imagen4:</td>
<td colspan="3"><input name="imagen4" type="file" id="imagen4" value="" size="32" maxlength="100"></td>
</tr>
<tr>
<td valign="top">Imagen5:</td>
<td colspan="3"><input name="imagen5" type="file" id="imagen5" value="" size="32" maxlength="100"></td>
</tr>
<tr>
<td valign="top"> </td>
<td colspan="3"><input type="submit" value="Alta Noticia" name="enviar">
<?php }
?>
</td>
</tr>
</table>
</Form></td>
Es un abuso...no? y bue...les debo tanto, que un poquito más no se va a notar....
Gracias
__________________ :stress: Patri:corazon: |