mardi 9 octobre 2018

Input value is not displaying in my email message

Email send successfully but the input value is not displaying in email message. $cargo is the one should be displayed.Please help me...

View page code

<div class="col-lg-6 col-md-6 mt-3">
<label>Container Number</label>
<input type="text" class="form-control" name="<?php if (!$ifCntrDbExists) {echo 'cntr_no_edit_add[]';} else {echo 'cntr_no_new[]';} ?>" value="<?php echo $transdbrow['cntr_no'] . ' ' . $transdbrow['no_of_cntr'];?>">
</div>

Code is as follows:

    if (isset($_POST['submit']) && isset($_POST['sendMail'] ) )
        {
            $select = $_POST['datanew']['co_cd'];
            $bill=$_POST['datanew']['bl_no'];
            $cargo=$_POST['transdbrow']['cntr_no']['transdbrow']['no_of_cntr'];



            $email = "example@gmail.com";
                    $message = '<tr> <td><h2><strong>Dear </strong>'.  $select.' 
                    <h3>We would like to update you about your transaction with below details. <br>
                                BL #: '.$bill."<br>
                                Container #:  ".$cargo."
                                <br>
                                Recent Updates as of ". date('F d,Y   h:i A') . " </h3></td><tr> " ;

                    $headers  = 'mime_content_type(filename)E-Version: 1.0' . "\r\n";
                    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
                    $headers .= "From: example@gmail.com" . "\r\n";
                    mail($email,"Worksheet",$message, $headers);
            }


        else{

        }

Aucun commentaire:

Enregistrer un commentaire