par
Milenzo » 06 mars 2017, 21:06
J'ai ces deux erreurs : ( ! ) Notice: Undefined variable: header in C:\wamp64\www\ContactPHP\contact.php on line 5
Call Stack
# Time Memory Function Location
1 0.0004 236320 {main}( ) ...\contact.php:0
( ! ) Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp64\www\ContactPHP\contact.php on line 23
Call Stack
# Time Memory Function Location
1 0.0004 236320 {main}( ) ...\contact.php:0
2 0.0130 237664 mail ( ) ...\contact.php:23
Et voila le code de la page :
<?php
if(isset($_POST['mailform']))
$header="MIME-Version: 1.0\r\n";
$header.='From:"PrimFX.com"<
[email protected]>'."\n";
$header.='Content-Type:text/html; charset="uft-8"'."\n";
$header.='Content-Transfer-Encoding: 8bit';
$message='
<html>
<body>
<div align="center">
<img src="
http://www.primfx.com/mailing/banniere.png"/>
<br />
J\'ai envoyé ce mail avec PHP !
<br />
<img src="
http://www.primfx.com/mailing/separation.png"/>
</div>
</body>
</html>
';
mail("
[email protected]", "Salut tout le monde !", $message, $header);
?>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="stylecontact.css">
<title>Me contactez ! </title>
</head>
<body>
<i><h3><div align="center">Me contactez !</div></h3></i>
<form class="form_demo">
<input type="text" name="" placeholder="Email" class="inputbasic mail">
<input type="password" name="" placeholder="Entrée password" class="inputbasic">
<input type="submit"/>
<a href="contact.php">Conatct</a>
</form>
Merci de vos réponse
PS:Je débute.
J'ai ces deux erreurs : ( ! ) Notice: Undefined variable: header in C:\wamp64\www\ContactPHP\contact.php on line 5
Call Stack
# Time Memory Function Location
1 0.0004 236320 {main}( ) ...\contact.php:0
( ! ) Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp64\www\ContactPHP\contact.php on line 23
Call Stack
# Time Memory Function Location
1 0.0004 236320 {main}( ) ...\contact.php:0
2 0.0130 237664 mail ( ) ...\contact.php:23
Et voila le code de la page :
<?php
if(isset($_POST['mailform']))
$header="MIME-Version: 1.0\r\n";
$header.='From:"PrimFX.com"<
[email protected]>'."\n";
$header.='Content-Type:text/html; charset="uft-8"'."\n";
$header.='Content-Transfer-Encoding: 8bit';
$message='
<html>
<body>
<div align="center">
<img src="http://www.primfx.com/mailing/banniere.png"/>
<br />
J\'ai envoyé ce mail avec PHP !
<br />
<img src="http://www.primfx.com/mailing/separation.png"/>
</div>
</body>
</html>
';
mail("
[email protected]", "Salut tout le monde !", $message, $header);
?>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="stylecontact.css">
<title>Me contactez ! </title>
</head>
<body>
<i><h3><div align="center">Me contactez !</div></h3></i>
<form class="form_demo">
<input type="text" name="" placeholder="Email" class="inputbasic mail">
<input type="password" name="" placeholder="Entrée password" class="inputbasic">
<input type="submit"/>
<a href="contact.php">Conatct</a>
</form>
Merci de vos réponse
PS:Je débute.