GoDLike Comunity
Log in

I forgot my password

Checkpagerank.net
Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None

Most users ever online was 14 on Sun Feb 05, 2017 3:16 am
Statistics
We have 1651 registered users
The newest registered user is lesn1k

Our users have posted a total of 558 messages in 467 subjects

[Php]Trimite mail cu PHP

View previous topic View next topic Go down

[Php]Trimite mail cu PHP

Post by MeG@DaN on Wed Nov 02, 2011 12:03 pm

Pentru asta vom avea nevoie de 2 fisiere. Unul html prin care sa intruduci datele si unul php care sa le prelucrezie si sa le trimita.

In pagina html contact.html ai un formular cu 3 casete text si un buton. prima caseta va avea id email , a 2-a nume iar a 3-a mesaj:
Code:





Pagina de contact


























































Mai creeaza un fisier si numeste-l mailer.php in care vom prelua datele introduse in formular si se foloseste functia mail() :

Code:


$email = $_REQUEST['email'] ;

$mesaj = $_REQUEST['mesaj'] ;

$nume = $REQUEST['nume']

mail( "adresata@domeniu.ro", "Mesaj NOU - Sectiunea Contact", $mesaj, "De la: $nume <$email>" );

header( "Location: http://situl_tau.ro/contact.html" );

?>



Nota: Daca nu merge cu REQUEST inlocuieste REQUEST cu POST si in loc de [You must be registered and logged in to see this link.] pune adresa ta
avatar
MeG@DaN
Administrator
Administrator

Mesaje : 465
Data de inscriere : 17/12/2010
Localizare : Acasa

http://godlike.forumclan.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum