Aller au contenu

demande d'aide en php


viloos

Sujets conseillés

Bonjour je me permet de vous solliciter car j'essaie de faire de fichier d'envoie de mail ( le php je rame ) Voici les deux formulaire :

 <div class="section-header">
        <h3>Echangez vos coupons contre du btc </h3>
        <p>Aucune donnée personnelle ne vous sera demandé.</p>
    </div><br /><br /><br />
                        <form name="contactform" method="post" action="mailer.php" class="form-horizontal" role="form">
    <div class="form-group">
                                    <input type="hidden" id="valueBTC" name="valueBTC" value="1.0625" />

    <span style="opacity: 1; left: 423px; top: 32.5px; width: 19px; min-width: 19px; height: 13px; position: absolute; border: none; display: inline; visibility: visible; z-index: auto; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAANCAYAAABLjFUnAAAACXBIWXMAAAsTAAALEwEAmpwYAAABMmlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjarZG9SsNQGIaf04qCQxAJbsLBQVzEn61j0pYiONQokmRrkkMVbXI4Of508ia8CAcXR0HvoOIgOHkJboI4ODgECU4i+EzP9w4vL3zQWPE6frcxB6PcmqDnyzCK5cwj0zQBYJCW2uv3twHyIlf8RMD7MwLgadXr+F3+xmyqjQU+gc1MlSmIdSA7s9qCuATc5EhbEFeAa/aCNog7wBlWPgGcpPIXwDFhFIN4BdxhGMXQAHCTyl3AtercArQLPTaHwwMrN1qtlvSyIlFyd1xaNSrlVp4WRhdmYFUGVPuq3Z7Wx0oGPZ//JYxiWdnbDgIQC5M6q0lPzOn3D8TD73fdMb4HL4Cp2zrb/4DrNVhs1tnyEsxfwI3+AvOlUD7FY+VVAAAAIGNIUk0AAHolAACAgwAA9CUAAITRAABtXwAA6GwAADyLAAAbWIPnB3gAAAECSURBVHjapNK9K8UBFIfxD12im8LEYLgZjcpgUFgUCUlZTJRkMpqUxR+hDFIGhWwGwy0MFiUxSCbZ5DXiYjnqdvvpvnim0+mcZ/ieU9U6tySBNEbQjBpMoANZnGIdl4VLKcm8YCPqbgzhAT1ox1mSrFpxjtCHLdygH5tJgymlMYhhtKH+r6FishYsYBpN0dvFHu5wi9okWToC/0AmcpqM+pd7PKMRDajDNb5xlS97Qyem0BsL8IT9uOAhXpGLvL/wGXO5fFkOO7FwHvJtLOOilGALM8vE1d6xiFVlkP8aXTjAI8bKFeXLBuJ3shjFiQpIYR6zWMFaXFOlsnHM4Ng/+RkAdVE2mEeC7WYAAAAASUVORK5CYII=); background-position: 0px 0px; background-repeat: no-repeat;"></span></div>
    <div class="form-group">
        <label>E-Mail*</label>
        <input type="email" name="email" class="form-control" id="email" required="">
    </div>                            <div class="form-group">
    
    </div>                                <label>Type de coupon*</label>
    <select name="typeCoupon" id="typeCoupon" class="form-control">
        <option value="PCS">PCS</option>
        <option value="PSC">PaySafeCard</option>
        <option value="NEOsurf">Neosurf</option>
        <option value="TRANCASH">Trancash</option>
    </select>
    <div class="form-group"><br />
        <label>Montant à échanger*</label>
        <select class="form-control" name="montantCoupon" id="montantCoupon">
            <option>Choisir une valeur</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="150">150</option>
            <option value="250">250</option>
            <option>Les montants supérieurs ne sont pas éligibles</option>
        </select>        </div>
        <div class="form-group">
    <label>Code inscrit sur votre coupon*</label>
    <input type="text" name="code" class="form-control" id="code" required="">
    </div>  
        <div class="form-group">
        <label>Vous recevrez : </label>
            <input type="text" disabled="true" id="resultatCalc" value="" class="form-control" style="width:100%; text-align:center" /></div>

                                            

        <div class="form-group">
            <label>Votre adresse Bitcoin* (<a target="blank_" href="https://www.blockchain.com/">Si vous n'en avez pas</a>)</label>
            <input type="adresseBTC" name="adresseBTC" class="form-control" id="input_email" required="">
        </div>
        <input type="submit" class="btn-submit btn-larger btn-success btn-block" style="height:50px;" value="ACHETER DES BITCOIN" />
    </div>
    </form>
        <div class="col-md-6 col-sm-12 departments no-padding">
        <!-- Departments Section -->
                                                            <div class="container-fluid no-padding department-section">
    <div class="section-header">
        <h3>ECHANGEZ VOS BTC CONTRE DU CASH </h3>
        <p>Des données personnelles vous seront demandées pour du cash via Western union et money gram frais à votre charge</p>

         </div>
                        <form name="contactform" method="post" action="mailer.php2" class="form-horizontal" role="form">
    <div class="form-group">

    <span style="opacity: 1; left: 423px; top: 32.5px; width: 19px; min-width: 19px; height: 13px; position: absolute; border: none; display: inline; visibility: visible; z-index: auto; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAANCAYAAABLjFUnAAAACXBIWXMAAAsTAAALEwEAmpwYAAABMmlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjarZG9SsNQGIaf04qCQxAJbsLBQVzEn61j0pYiONQokmRrkkMVbXI4Of508ia8CAcXR0HvoOIgOHkJboI4ODgECU4i+EzP9w4vL3zQWPE6frcxB6PcmqDnyzCK5cwj0zQBYJCW2uv3twHyIlf8RMD7MwLgadXr+F3+xmyqjQU+gc1MlSmIdSA7s9qCuATc5EhbEFeAa/aCNog7wBlWPgGcpPIXwDFhFIN4BdxhGMXQAHCTyl3AtercArQLPTaHwwMrN1qtlvSyIlFyd1xaNSrlVp4WRhdmYFUGVPuq3Z7Wx0oGPZ//JYxiWdnbDgIQC5M6q0lPzOn3D8TD73fdMb4HL4Cp2zrb/4DrNVhs1tnyEsxfwI3+AvOlUD7FY+VVAAAAIGNIUk0AAHolAACAgwAA9CUAAITRAABtXwAA6GwAADyLAAAbWIPnB3gAAAECSURBVHjapNK9K8UBFIfxD12im8LEYLgZjcpgUFgUCUlZTJRkMpqUxR+hDFIGhWwGwy0MFiUxSCbZ5DXiYjnqdvvpvnim0+mcZ/ieU9U6tySBNEbQjBpMoANZnGIdl4VLKcm8YCPqbgzhAT1ox1mSrFpxjtCHLdygH5tJgymlMYhhtKH+r6FishYsYBpN0dvFHu5wi9okWToC/0AmcpqM+pd7PKMRDajDNb5xlS97Qyem0BsL8IT9uOAhXpGLvL/wGXO5fFkOO7FwHvJtLOOilGALM8vE1d6xiFVlkP8aXTjAI8bKFeXLBuJ3shjFiQpIYR6zWMFaXFOlsnHM4Ng/+RkAdVE2mEeC7WYAAAAASUVORK5CYII=); background-position: 0px 0px; background-repeat: no-repeat;"></span></div>
    <div class="form-group">
        <label>E-Mail*</label>
        <input type="email" name="email" class="form-control" id="email" required="">
    </div>                            <div class="form-group">
    
    </div>                                <label>Quel paiement acceptez vous*</label>
    <select name="typeCoupon" id="typeCoupon" class="form-control">
        <option value="PCS">PCS</option>
        <option value="PSC">Western union</option>
        <option value="NEOsurf">Neosurf</option>
        <option value="TRANCASH">Money gram</option>
    </select>
    <div class="form-group"><br />
        <label>Montant à échanger*</label>
        <input type="text" name="valeur" class="form-control" id="valeur" required="">
        </select>        </div>
        <div class="form-group">
    <label>Code inscrit sur votre coupon </label>
    <input type="text" name="code" class="form-control" id="code" >
    </div>  
       <div class="form-group">
      <label>Pour MG* et WU* adresse postale complet + pays</label>
       <textarea class="form-control" rows="8" id="inputMessage" name="inputMessage" placeholder="Nom prénom
       adresse postale
       code postale ville
       pays"></textarea>
                                </div>
    <div>
         <label>Notre adresse Bitcoin </label></br>
            <ins>1M3azPW1jPpnBg69WYGM5Cs3rMJnR1tXLU</ins></br>
        </div></br>
        <div>
        <input type="submit" class="btn-submit btn-larger btn-success btn-block" style="height:50px;" value="VENDRE DES BITCOIN" />
    </div>
    </form>

et le fichier a modifier ou je n'y arrive pas ( faire un pour chaque formulaire :

<?php
/* Set e-mail recipient */
$myemail = "email;

/* Check all form inputs using check_input function */
$name = check_input($_POST['inputName'], "Your Name");
$email = check_input($_POST['inputEmail'], "Your E-mail Address");
$subject = check_input($_POST['inputSubject'], "Message Subject");
$message = check_input($_POST['inputMessage'], "Your Message");

/* If e-mail is not valid show error message */
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
{
show_error("Invalid e-mail address");
}
/* Let's prepare the message for the e-mail */

$subject = "Someone has sent you a message";

$message = "

Someone has sent you a message using your contac form:

Name: $name
Email: $email
Subject: $subject

Message:
$message

";

/* Send the message using mail() function */
mail($myemail, $subject, $message);

/* Redirect visitor to the thank you page */
header('Location: echanger-coupons-pcs-en-bitcoin.html');
exit();

/* Functions we used */
function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
}

function show_error($myError)
{
?>
<html>
<body>

<p>Please correct the following error:</p>
<strong><?php echo $myError; ?></strong>
<p>Hit the back button and try again</p>

</body>
</html>
<?php
exit();
}
?>

Voici le site en question le site en question

Merci d'avance pour vous aide je peut fournir le site en mp si besoin 

 

 

 

Lien vers le commentaire
Partager sur d’autres sites

dans le code donné ici, il y a :

<form name="contactform" method="post" action="mailer.php" class="form-horizontal" role="form">

 

mais dans le code de la page :
<form action="echanger-coupons-pcs-en-bitcoin.html" method="POST">

 

il faut donc s'assurer que le code d'envoi de l'email est bien dans echanger-coupons-pcs-en-bitcoin.html

Lien vers le commentaire
Partager sur d’autres sites

Bonjour,

 

Les emails des utilisateurs sont masqués. C'est donc logique que tu ne trouves pas !

 

Utilise la messagerie privée. Il aura ton message.

 

Dan

 

Lien vers le commentaire
Partager sur d’autres sites

il y a 5 minutes, Dan a dit :

Bonjour,

 

Les emails des utilisateurs sont masqués. C'est donc logique que tu ne trouves pas !

 

Utilise la messagerie privée. Il aura ton message.

 

Dan

 

Merci Dan, je vais tenter jamais fait.

Lien vers le commentaire
Partager sur d’autres sites

  • 10 months later...

Veuillez vous connecter pour commenter

Vous pourrez laisser un commentaire après vous êtes connecté.



Connectez-vous maintenant
×
×
  • Créer...