|
OK, Señores nuevamente nos encontramos por aqui y esto esta ves es para solicitarles ayuda. mi problemita es el siguiente "tengo una pagina web subida la cual recibe una informacion(nombre, edad y comentario) lo que deseo es que esta informacion cuando las personas le den en un boton que diga -enviar- se almacene en un archivo o se envie a mi correo electronico, tengo un servidor apache para realizar estas tareas"
Espero su pronta ayuda
|
Jul 3, 2008
8:47 PM
|
|
This is for writing to file :
<?php
$file_handle=fopen("filename_to_store_info.txt","a"); $name = htmlspecialchars($_POST['name']); $age = htmlspecialchars($_POST['age']); $comment = htmlspecialchars($_POST['comment']); $final_string = $name."(".$age.")".":".$comment."\n"; // for example : nelly(23):This is a comment fprintf($file_handle,"%s",$final_string); fclose($file_handle); ?>
|
Jul 7, 2008
3:40 AM
|
|
And this for mail ( but you need to have a smtp service running ) :
<?php
$name = htmlspecialchars($_POST['name']); $age = htmlspecialchars($_POST['age']); $comment = htmlspecialchars($_POST['comment']); $final_string = $name."(".$age.")".":".$comment."\n"; $to = "yourmail@domain.com"; $subject = "user_comment"; mail($to, $subject, $final_string); ?>
|
Jul 7, 2008
3:42 AM
|
|
Muchas gracias, Estoy configurando un servidor de ogamehost.com y preparando bien la pagina cuando la tenga terminada se los are saber
|
Jul 8, 2008
12:01 PM
|