Skip to content

Instantly share code, notes, and snippets.

$('#sending_form').click(function(e){
e.preventDefault();
var data = {
email: $('#email').val(),
name: $('#name').val(),
objet: $('#object').val(),
message: $('#message').val()
};
$.ajax({
url: "get_mail.php",
<?php
if($_POST){
$email = $_POST['email'];
$name = $_POST['name'];
$object = $_POST['objet'];
$message = $_POST['message'];
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$headers .= "From: $name <$email>\r\nReply-to : $name <$email>\nX-Mailer:PHP";
@AntoninMarchardDev
AntoninMarchardDev / TodoList.js
Created February 8, 2018 18:22
Correction TODO LIST - React
import React, { Component } from 'react';
class TodoList extends Component {
constructor() {
super();
this.state = {
userInput: '',
items: []
};
}