Ver Mensaje Individual
  #5 (permalink)  
Antiguo 27/05/2010, 08:45
Gustavo1973
 
Fecha de Ingreso: abril-2007
Ubicación: Merlo
Mensajes: 314
Antigüedad: 17 años
Puntos: 3
Respuesta: Signo Menor "<" y Metodo POST

Este es el formulario, los datos a las variables lo carga en otro archivo
Código HTML:
<table height="400" border="0"cellpadding="0" cellspacing="0">
<tr>
	<td colspan="2"height="50"align="center"><a class="titulo">Buscadores</a></td>
</tr>
<tr>
<form method="POST" action="modificab.php"enctype="multipart/form-data">
	<td valign="top"><a class="form">Titulo: <br>(MAX. 100 caract.) </a></td>
	<td valign="top"><input type="text" name="titulo"size="50"value="<?=$titulo_b;?>"></td>
</tr>
<tr>
	<td valign="top"><a class="form">Descripción: <br>(MAX. 255 caract.) </a></td>
	<td valign="top"><textarea name="descripcion" rows="3" cols="40"><?=$descripcion_b;?></textarea></td>
</tr>
<tr>
	<td valign="top"><a class="form">Keywords - Palabras Claves:<br>(MAX 255 caract.)</a></td>
	<td valign="top"><textarea name="keywords" rows="3" cols="40"/><?=$keywords_b;?></textarea><br><font size="2">Deben estar separadas por comas (,)</font></td>
</tr>
<tr>
	<td valign="top"><a class="form">META de Verificación<br>Google:</a></td>
	<td valign="top"><input type="text" name="v_google"size="50"value="<?=$v_google_b;?>"></td>
</tr>
<tr>
	<td valign="top"><a class="form">META de Verificación<br>Yahoo</td>
	<td valign="top"><input type="text" name="v_yahoo"size="50"value="<?=$v_yahoo_b;?>"></td>
</tr>
<tr>
	<td valign="top"><a class="form">META de Verificación<br>Bing</td>
	<td valign="top"><input type="text" name="v_bing"size="50"value="<?=$v_bing_b;?>"></td>
</tr>
<tr>
	<td colspan="2"height="50"align="left"><input class="bform"type="submit"><input class="bform"type="reset"></td>
</form>
</tr>
</table> 
Este es el archivo modificab.php

Código PHP:
<?
include("conexion.php");
$titulo $_POST['titulo'];
$descripcion $_POST['descripcion'];
$keywords $_POST['keywords'];
$v_google $_POST['v_google'];
$v_yahoo $_POST['v_yahoo'];
$v_bing $_POST['v_bing'];
$sql_buscador "UPDATE t_buscadores SET titulo = '$titulo', descripcion = '$descripcion', keywords = '$keywords', v_google = '$v_google', v_yahoo = '$v_yahoo', v_bing = '$v_bing'";
$result_buscador mysql_query($sql_buscador);
if(!
$result_buscador){
echo (
"<p> Error en la conexion a la Base de Datos:" mysql_error() . "</p>");
exit();
}
mysql_close($con);
echo 
"<script>parent.location.href = 'buscadores.php';</script>";
?>