GoDLike Comunity


Join the forum, it's quick and easy

GoDLike Comunity
GoDLike Comunity
Would you like to react to this message? Create an account in a few clicks or log in to continue.
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 18 on Wed Mar 01, 2023 5:42 pm
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

Go down

[Php]Trimite mail cu PHP Empty [Php]Trimite mail cu PHP

Post by MeG@DaN 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
MeG@DaN
MeG@DaN
Administrator
Administrator

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

http://godlike.forumclan.com

Back to top Go down

Back to top


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