10/08/2009, 13:49
|
| | Fecha de Ingreso: febrero-2008
Mensajes: 675
Antigüedad: 16 años, 2 meses Puntos: 5 | |
Respuesta: recargar la misma pagina Cita:
Iniciado por urgido no, eso no c puede jejeje .... seria mejor que pegaras aqui tu code para ayudarte. Saludos Aqui te lo pego, como lo pondrias? Código PHP:
<form action="mas.php" method=post> <table width="543" border="0" class="tablas_form_producto"> <tr> <td> </td> <td><div align="right" class="tex_14_rojo">Datos del comercio</div></td> <td> </td> <td> </td> </tr> <tr> <td width="35"> </td> <td width="212" class="tex_14_negro"><div align="right">Nombre:</div></td> <td width="240"><input type="text" name="nombre" size="40" /></td> <td width="38"> </td> </tr> <tr> <td> </td> <td class="tex_14_negro"><div align="right">Provincia:</div></td> <td><select name="comunidad" id="comunidad"> <?php do { ?> <option value="<?php echo $row_provincia['comunidad']?>"><?php echo $row_provincia['comunidad']?></option> <?php } while ($row_provincia = mysql_fetch_assoc($provincia)); $rows = mysql_num_rows($provincia); if($rows > 0) { mysql_data_seek($provincia, 0); $row_provincia = mysql_fetch_assoc($provincia); } ?> </select></td> <td> </td> </tr> <tr> <td> </td> <td class="tex_14_negro"><div align="right">Teléfono:</div></td> <td><input name="telefono" type="text" id="telefono" size="15" /></td> <td> </td> </tr> <tr> <td> </td> <td class="tex_14_negro"><div align="right">Precio del articulo:</div></td> <td><input name="precio" type="text" id="precio" size="15" /> €</td> <td> </td> </tr> <tr> <td> </td> <td class="tex_14_negro"><div align="right">Web / e-mail:</div></td> <td><input type="text" name="email" size="40" /></td> <td> </td> </tr> <tr> <td> </td> <td class="tex_14_negro">Comentario:</td> <td><textarea name="coment" cols="32" rows="6"></textarea></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><input name="articulo" type="hidden" id="articulo" value="<?php echo $row_articulos['nombre']; ?>" /> <input name="identificador" type="hidden" id="identificador" value="<?php echo $row_articulos['id_producto']; ?>" /> <input name="usuario" type="hidden" id="usuario" value="<?php echo $row_usuario['usuario']; ?>" /> <input name="action" type="hidden" id="action" value="send" /> <input name="id" type="hidden" id="id" value="<?php echo $row_articulos['id_producto']; ?>" /></td> <td> </td> </tr> <tr> <td> </td> <td><input type=submit class="boton_form_cata" value="¡¡ Revisar este articulo!" /></td> <td> </td> <td> </td> </tr> </table> <p><br> </p> </form> <?PHP if (isset($_POST['action'])) { $dest="[email protected],".$_POST['usuario'].",".$_POST['usuario']; $head = "From: Dto comercial <[email protected]>"; // Ahora creamos el cuerpo del mensaje $msg = "------------------------------- \n"; $msg.= " Gracias por colaborar \n"; $msg.= "------------------------------- \n"; $msg.= "Nombre: ".$_POST['nombre']."\n"; $msg.= "Provincia: ".$_POST['comunidad']."\n"; $msg.= "EMAIL: ".$_POST['email']."\n"; $msg.= "Telefono: ".$_POST['telefono']."\n"; $msg.= "Precio: ".$_POST['precio']."\n"; $msg.= "Articulo: ".$_POST['articulo']."\n"; $msg.= "identificador: ".$_POST['identificador']."\n"; $msg.= "HORA: ".date("h:i:s a ")."\n"; $msg.= "FECHA: ".date("D, d M Y")."\n"; $msg.= "IP: ".$REMOTE_ADDR."\n"; $msg.= "------------------------------- \n\n"; $msg.= $_POST['comentarios']."\n\n"; $msg.= "------------------------------- \n"; // Finalmente enviamos el mensaj if (mail($dest, "Lo he visto mas barato", $msg, $head)) { $aviso = "Su mensaje fue enviado."; } else { $aviso = "Error de envío."; } } ?> |