Bonjour voila j'ai un formulaire en post :
Code HTML :
<form method="POST" action="">
<div class="billto-shipto">
<div class="width50 floatleft">
<span><span class="vmicon vm2-billto-icon"></span>
Information client<br/><br/><br/>
<?php
foreach($this->cart->BTaddress['fields'] as $item)
{
if(!empty($item['value']))
{
?><span class="titles"><?php echo $item['title'] ?> :</span>
<span class="values vm2<?php echo '-'.$item['name'] ?>" ><?php echo $this->escape($item['value']) ?></span>
<br class="clear" />
<?php
}
} ?>
</div>
<a class="details" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL) ?>">
Nouveau/Editer information client
</a>
<input type="hidden" name="billto" value="<?php echo $this->cart->lists['billTo']; ?>"/>
<div class="clear"> </div>
</div>
</br>
<fieldset>
<table class="cart-summary" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<th align="left">Nom</th>
<th align="left">Ref.</th>
<th
align="right"
width="140px">Quantité
Mettre à jour
</th>
</tr>
<?php
$i=1;
foreach( $this->cart->products as $pkey =>$prow )
{ ?>
<tr valign="top" class="sectiontableentry<?php echo $i ?>">
<td align="left" >
<?php if ( $prow->virtuemart_media_id) { ?>
<span class="cart-images">
<?php
if(!empty($prow->image)) echo $prow->image->displayMediaThumb('',false);
?>
</span>
<?php } ?>
<?php echo JHTML::link($prow->url, $prow->product_name).$prow->customfields; ?>
</td>
<td align="left" ><?php echo $prow->product_sku ?></td>
<td align="right" >
<input type="text" title="Mettre à jour la quantité dans le panier" class="inputbox" size="3" maxlength="4" name="quantity" value="<?php echo $prow->quantity ?>" />
<a class="vmicon vm2-remove_from_cart" title="<?php echo JText::_('COM_VIRTUEMART_CART_DELETE') ?>" align="middle" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=cart&task=delete&cart_virtuemart_product_id='.$prow->cart_item_id ) ?>"> </a>
</td>
</tr>
<?php
$i = 1 ? 2 : 1;
} ?>
</table>
</fieldset>
<?php // Leave A Comment Field ?>
<div class="customer-comment marginbottom15">
<span class="comment"><?php echo JText::_('COM_VIRTUEMART_COMMENT'); ?></span><br />
<textarea class="customer-comment" name="customer_comment" cols="50" rows="4"><?php echo $this->cart->customer_comment; ?></textarea>
</div>
<?php // Continue and Checkout Button ?>
<div class="checkout-button-top">
<input type="submit" class="vm-button-correct" name="submit" id="submit" value="Envoyer le devis" />
</div>
<input type="hidden" name="task" value="<?php echo $this->checkout_task; ?>"/>
<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="view" value="cart"/>
</form>
et le code php pour l'envoie de l'email
Code PHP :
if ( isset($_POST['submit']))
{
/*Mail client//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
$i=1;
$mon_pseudo = "$nom $pnom";
$mon_objet = "Formulaire de demande de devis";
$temp = date('d-m-Y H:i:s');
$accuse_pour_lui = "<html>\n";
$accuse_pour_lui .= "<body>\n";
$accuse_pour_lui .= "<table width='60%' border='0' cellspacing='0' cellpadding='0' class='html-email'>
<tbody>
<tr>
<td align='left'>
<img src='http://www.optima-system.fr/images/stories/construction/logo_amenagement-utilitaire.png'>
</td>
<td align='center'>
</td>
<td align='right'>
<p><span class='titre1'> Aménagement de véhicule OPTIMA System</span><br /><span class='titre2'><a href='http://www.optima-system.fr'> www.optima-system.fr </a></span></p>
</td>
</tr>
<br/>
<tr>
<strong>Bonjour $civ $nom $pnom,<br/>
</tr>
<tr>
<td colspan='3'>
Vous avez confirmé un devis.\nVous pouvez consulter l'état de votre devis en vous rendant sur votre compte personnel\n
</td>
<td align='right'>
</td>
</tr>
</tbody>
</table>
\n<br/>";
$accuse_pour_lui .= "<table class='cart-summary' cellspacing='0' cellpadding='0' border='0' width='60%'>
<tr>
<th colspan='3' align='center' bgcolor='#014b92' style=' color:white'>
Liste des produits
</th>
</tr>
<tr>
<th align='left' width='220px' >Nom</th>
<th align='left' >Ref.</th>
<th align='right' >Quantite</th>
</tr>";
$accuse_pour_lui .= "<tr valign='top' class='sectiontableentry".$i."'>
<td> test nom</td>
<td> test ref</td>
<td align='right'> test quantite</td>
</tr>
</table>";
$accuse_pour_lui .= "</body>\n";
$accuse_pour_lui .= "</html>\n";
// Envoie du mail
$entete = "From: " . $mon_pseudo . " <" . $email . ">\n";
$entete .='Content-Type: text/html; charset=utf-8'."\n";
$entete .='Content-Transfer-Encoding: 8bit';
if (@mail($email,$mon_objet,$accuse_pour_lui,$entete))
{
echo "<p style=\"text-align:center\">Votre message a bien été envoyé !<br /><br />\n";
echo "Nous vous recontacterons dans les plus brefs délais.</p>\n";
}
else {
echo "<p style=\"text-align:center\">Un problème s'est produit lors de l'envoi du message.\n";
echo "<a href=\"".$_SERVER["PHP_SELF"]."\">Merci de bien vouloir essayer à nouveau...</a></p>\n";
}
}
else
{
echo "en attente";
}
mais sa m’emmène toujours a "en attente" je ne comprends pas auriez vous des idées
merci de vos futurs réponses