
08/05/2010, 10:20
|
 | | | Fecha de Ingreso: marzo-2005 Ubicación: SantaCata, NL, Mexico
Mensajes: 1.553
Antigüedad: 20 años, 1 mes Puntos: 77 | |
Respuesta: Insertar texto en BD mysql Asi parece :) Cita:
Iniciado por Most vale entonces seria algo asi el codigo completo: Formulario.html Código HTML: <table width="343" height="143" border="0">
<tr> <td><form name="form1" method="post" action="enviar.php">
<table width="338" height="99" border="0">
<tr>
<td>Texto a Mostrar:</td>
<td><input name="nombre" type="text" id="nombre"></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Mostrar"></td>
<td> </td>
</tr>
</table>
</form></td>
</tr> </table> Enviar.php Código PHP: <?php
//Conectar a Mysql
mysql_connect("host","usuario","password");
//Seleccionar Base de datos
mysql_select_db("mi_base_datos");
//Imprimir en Base de datos
mysql_query("INSERT INTO tabla (campoTexto) VALUES ('".$_POST['nombre']."')");
?> |