Bonjour à tous,
Je commence à avancer maintenant je reçois un mail mais pas le contenu...c'est à dire la question.
De plus, quand je clique sur SEND, cela me renvoie à /email.php avec une page blanche.
J'utilise PHPmailer. Dois-je configurer phpmailer également ?
Si vous trouvez une solution ce serait super sympa !
Merci !
Voici le code HTML :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Ask Us A Question - Question about Paris</title>
<link rel="icon" href="favicon.ico" />
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom Google Web Font -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<!-- Add custom CSS here -->
<link href="css/landing-page.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="http://viktorius.fr">Question about Paris</a>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
</div>
<div class="intro-header">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="intro-message">
<h1>Tourist in Paris ?</h1><p>
<h3>Ask us a question. We answer with love.</h3></p>
<form method="post" action="email.php">
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><img src="img/glyphicons_012_heart.png"></span>
<input id="question" type="text" class="form-control" name="question" value="" placeholder="What is your question ?">
</div>
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><img src="img/glyphicons_290_skull.png"></span></span>
<input id="email" type="text" class="form-control" name="email" value="" placeholder="For the answer, let us your email :">
</div>
<!-- Form itself -->
<div class="form-actions">
<button type="submit" class="btn btn-primary pull-right">Send</button><br />
</form>
</div>
</div>
</div>
</div>
<!-- ... your HTML <body> content ... -->
<!-- ... more of your HTML content ... -->
</div>
<!-- JavaScript -->
<script src="js/jquery-1.10.2.js"></script>
<script src="js/bootstrap.js"></script>
<!-- JS FILES -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</body>
<footer>
</footer>
</html>
Voici le code en PHP (Email.php) :
<?php
$message = $_REQUEST['message'] ;
$email = $_REQUEST['email'] ;
// here we use the php mail function
// to send an email to:
// [email protected]
mail( "[email protected]", "Une nouvelle question",$message, "From: $email" );
?>
Bonjour à tous,
Je commence à avancer maintenant je reçois un mail mais pas le contenu...c'est à dire la question.
De plus, quand je clique sur SEND, cela me renvoie à /email.php avec une page blanche.
J'utilise PHPmailer. Dois-je configurer phpmailer également ?
Si vous trouvez une solution ce serait super sympa !
Merci !
[b]Voici le code HTML :[/b]
[html]<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Ask Us A Question - Question about Paris</title>
<link rel="icon" href="favicon.ico" />
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom Google Web Font -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<!-- Add custom CSS here -->
<link href="css/landing-page.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="http://viktorius.fr">Question about Paris</a>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
</div>
<div class="intro-header">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="intro-message">
<h1>Tourist in Paris ?</h1><p>
<h3>Ask us a question. We answer with love.</h3></p>
<form method="post" action="email.php">
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><img src="img/glyphicons_012_heart.png"></span>
<input id="question" type="text" class="form-control" name="question" value="" placeholder="What is your question ?">
</div>
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><img src="img/glyphicons_290_skull.png"></span></span>
<input id="email" type="text" class="form-control" name="email" value="" placeholder="For the answer, let us your email :">
</div>
<!-- Form itself -->
<div class="form-actions">
<button type="submit" class="btn btn-primary pull-right">Send</button><br />
</form>
</div>
</div>
</div>
</div>
<!-- ... your HTML <body> content ... -->
<!-- ... more of your HTML content ... -->
</div>
<!-- JavaScript -->
<script src="js/jquery-1.10.2.js"></script>
<script src="js/bootstrap.js"></script>
<!-- JS FILES -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</body>
<footer>
</footer>
</html>
[/html]
[b]Voici le code en PHP (Email.php) :[/b]
[php]<?php
$message = $_REQUEST['message'] ;
$email = $_REQUEST['email'] ;
// here we use the php mail function
// to send an email to:
//
[email protected] mail( "
[email protected]", "Une nouvelle question",$message, "From: $email" );
?>[/php]