0
Ich möchte, wie E-Mail-Nachricht in der Reihenfolge der Eingabe von mehr Felddaten zu erhalten. Bitte, jemand führt mich, ich bin keine Erfahrung in php
.erhalten Sie eine E-Mail zum Einfügen einer Bestellung
Eingabebildschirm ist:
erwartetes Ausgangsbild:
if(isset($_POST['submit']))
{
$your_email ='[email protected]';
$frommail ='[email protected]';
$randnum = rand(1111111111,9999999999);
$place = $_POST[ 'place' ];
$companyname = $_POST[ 'companyname' ];
$business = $_POST[ 'business' ];
$products = $_POST[ 'products' ];
$suppliers = $_POST[ 'suppliers' ];
$buyers = $_POST[ 'buyers' ];
$experience = $_POST[ 'experience' ];
$annualsales = $_POST[ 'annualsales' ];
$employees = $_POST[ 'employees' ];
$operation = $_POST[ 'operation' ];
$website = $_POST[ 'website' ];
$fund = $_POST[ 'fund' ];
$authorised = $_POST[ 'authorised' ];
$standard = $_POST[ 'standard' ];
$special = $_POST[ 'special' ];
$currency = $_POST[ 'currency' ];
$parvalue = $_POST[ 'parvalue' ];
$noofshares = $_POST[ 'noofshares' ];
$capital = $_POST[ 'capital' ];
$surname = $_POST[ 'surname' ];
$givenname = $_POST[ 'givenname' ];
$address = $_POST[ 'address' ];
$occupation = $_POST[ 'occupation' ];
$shares = $_POST[ 'shares' ];
$percent = $_POST[ 'percent' ];
$national = $_POST[ 'national' ];
$passport = $_POST[ 'passport' ];
$dirsurname = $_POST[ 'dirsurname' ];
$dirgivenname = $_POST[ 'dirgivenname' ];
$dircompanyname = $_POST[ 'dircompanyname' ];
$diraddress = $_POST[ 'diraddress' ];
$dirbusiness = $_POST[ 'dirbusiness' ];
$dirnational = $_POST[ 'dirnational' ];
$dirpassport = $_POST[ 'dirpassport' ];
$comname = $_POST[ 'comname' ];
$comaddress = $_POST[ 'comaddress' ];
$combusiness = $_POST[ 'combusiness' ];
$comnationality = $_POST[ 'comnationality' ];
$compass = $_POST[ 'compass' ];
$agename = $_POST[ 'agename' ];
$ageaddress = $_POST[ 'ageaddress' ];
$ageoffice = $_POST[ 'ageoffice' ];
$bankdetails = $_POST[ 'bankdetails' ];
$savings = $_POST[ 'savings' ];
$usdollarssavings = $_POST[ 'usdollarssavings' ];
$hongkongcurrent = $_POST[ 'hongkongcurrent' ];
$tradeac = $_POST[ 'tradeac' ];
$others = $_POST[ 'others' ];
$online = $_POST[ 'online' ];
$atm = $_POST[ 'atm' ];
$phonebanking = $_POST[ 'phonebanking' ];
$banksign = $_POST[ 'banksign' ];
$eitherone = $_POST[ 'eitherone' ];
$twobank = $_POST[ 'twobank' ];
$arrangement = $_POST[ 'arrangement' ];
$postalcode = $_POST[ 'postalcode' ];
$correspondence = $_POST[ 'correspondence' ];
$financial = $_POST[ 'financial' ];
$name1 = $_POST[ 'name1' ];
$email1 = $_POST[ 'email1' ];
$mobile1 = $_POST[ 'mobile1' ];
$tel1 = $_POST[ 'tel1' ];
$skype = $_POST[ 'skype' ];
$address12 = $_POST[ 'address12' ];
$knowour = $_POST[ 'knowour' ];
$true = $_POST[ 'true' ];
$clean = $_POST[ 'clean' ];
$criminal = $_POST[ 'criminal' ];
$letterscode = $_POST[ 'letterscode' ];
$num2=$_POST['ex'];
foreach($_POST["surname1"] as $key1 => $surnames){
@$surname2 .= $surnames."<tr><td colspan='3'>";
}
foreach($_POST["givenname1"] as $key1 => $givennames){
@$givenname2 .= $givennames."<tr><td colspan='3'>";
}
foreach($_POST["address1"] as $key1 => $addresss){
@$address2 .= $addresss."<tr><td colspan='3'>";
}
foreach($_POST["occupation1"] as $key1 => $occupations){
@$occupation2 .= $occupations."<tr><td colspan='3'>";
}
foreach($_POST["shares1"] as $key1 => $sharess){
@$shares2 .= $sharess."<tr><td colspan='3'>";
}
foreach($_POST["percent1"] as $key1 => $percents){
@$percent2 .= $percents."<tr><td colspan='3'>";
}
foreach($_POST["national1"] as $key1 => $nations){
@$nation2 .= $nations."<tr><td colspan='3'>";
}
foreach($_POST["passport1"] as $key1 => $passports){
@$passport2 .= $passports."<tr><td colspan='3'>";
}
if(empty($errors))
{
//send the email
$to = $your_email;
$subject="New form submission";
$from = $frommail;
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
$body = <<<EOD
<br><hr><br>
<div><h2>New Registration Document</h2></div>
<div>
<h4>Yeah! $name</h4>
<p>Registration Details<br /></p>
<b>Application No : $randnum</b>
<br />
<br />
<table border="1" cellpadding="15" style="width:100%; border-collapse: collapse; border: 1px solid black;">
<tr>
<td style='font-weight:800;'>1. State:</td>
<td colspan="2">$place</td>
</tr>
<tr>
<td style='font-weight:800; border-bottom: 1px solid #ddd;'>2. Company:</td>
<td colspan="2">$companyname</td>
</tr>
<tr>
<td colspan="3" align="center" style='font-weight:800; border-bottom: 1px solid #ddd;'>3. Main line of Business</td></tr>
<tr>
<td>(a) Nature of Business/Industry:</td>
<td colspan="2">$business</td>
</tr>
<tr>
<td>(b) Nature of Products/Services Offered</td>
<td colspan="2">$products</td>
</tr>
<tr>
<td>(c) Location of suppliers:</td>
<td colspan="2">$suppliers</td>
</tr>
<tr>
<td>(d) Location of Buyers:</td>
<td colspan="2">$buyers</td>
</tr>
<tr>
<td>(e) Years of Experience:</td>
<td colspan="2">$experience</td>
</tr>
<tr>
<td>(f) Expected Annual Sales: </td>
<td colspan="2">$annualsales</td>
</tr>
<tr>
<td>(g) Number of Employees:</td>
<td colspan="2">$employees</td>
</tr>
<tr>
<td>(h) Location of Business operation: </td>
<td colspan="2">$operation</td>
</tr>
<tr>
<td>(i) Website:</td>
<td colspan="2">$website</td>
</tr>
<tr>
<td>(j) Source of Initial Fund:</td>
<td colspan="2">$fund</td>
</tr>
<tr>
<td style='font-weight:800; border-bottom: 1px solid #ddd;' colspan="3" align="center">4. Captial</td>
</tr>
<tr>
<td>Authorised:</td>
<td colspan="2">$authorised</td>
</tr>
<tr>
<td>Standard</td>
<td colspan="2">$standard</td>
</tr>
<tr>
<td>Special</td>
<td colspan="2">$special</td>
</tr>
<tr>
<td style='font-weight:500;' colspan="3" align="center">Par Value Per Share</td>
</tr>
<tr>
<td>A. Currency</td>
<td colspan="2">$currency</td>
</tr>
<tr>
<td>B. Parvalue</td>
<td colspan="2">$parvalue</td>
</tr>
<tr>
<td>C. No of Shares</td>
<td colspan="2">$noofshares</td>
</tr>
<tr>
<td>D. Capital</td>
<td colspan="2">$capital</td>
</tr>
<tr>
<td style='font-weight:800; border-bottom: 1px solid #ddd;' colspan="3" align="center">5. Shareholders</td>
</tr>
<tr>
<td >Sur Name : $surname</td>
<td colspan="2">Givenname : $givenname</td>
</tr>
<tr>
<td>Address : $address</td>
<td colspan="2">Occupation : $occupation</td>
</tr>
<tr>
<td>Shares : $shares</td>
<td colspan="2">Percent : $percent</td>
</tr>
<tr>
<td>National : $national</td>
<td colspan="2">Passport : $passport</td>
</tr>
<tr><td style='font-weight:800;' colspan="3">Surname</td></tr>
<tr>
<td colspan="3">$surname2</td></tr>
<tr><td style='font-weight:800;' colspan="3">Givenname</td></tr>
<tr>
<td colspan="3">$givenname2</td>
</tr>
<tr><td style='font-weight:800;' colspan="3">Address</td></tr>
<tr>
<td colspan="3">$address2</td>
</tr>
<tr><td style='font-weight:800;' colspan="3">Occupation</td></tr>
<tr>
<td colspan="3">$occupation2</td>
</tr>
<tr><td style='font-weight:800;' colspan="3">Share</td></tr>
<tr>
<td colspan="3">$shares2</td>
</tr>
<tr><td style='font-weight:800;' colspan="3">Percent</td></tr>
<tr>
<td colspan="3">$percent2</td>
</tr>
<tr><td style='font-weight:800;' colspan="3">National</td></tr>
<tr>
<td colspan="3">$nation2</td>
</tr>
<tr><td style='font-weight:800;' colspan="3">Passport</td></tr>
<tr>
<td colspan="3">$passport2</td>
</tr>
<tr>
<td style='font-weight:800; border-bottom: 1px solid #ddd;' colspan="3" align="center">6. Directors</td>
</tr>
<tr>
<td>Surname : $dirsurname</td>
<td colspan="2">GIvenname : $dirgivenname</td>
</tr>
<tr>
<td>Company Name : $dircompanyname</td>
<td colspan="2">Address : $diraddress</td>
</tr>
<tr>
<td>Business : $dirbusiness</td>
<td colspan="2">National : $dirnational</td>
</tr>
<tr>
<td colspan="3">Passport No : $dirpassport</td>
</tr>
<tr>
<td style='font-weight:800; border-bottom: 1px solid #ddd;' colspan="3" align="center">7. Company Secretary</td>
</tr>
<tr>
<td>Company Name : $comname</td>
<td colspan="2">Address : $comaddress</td>
</tr>
<tr>
<td>Business : $combusiness</td>
<td colspan="2">National : $comnationality</td>
</tr>
<tr>
<td colspan="3">Passport No : $compass</td>
</tr>
<tr>
<td style='font-weight:800; border-bottom: 1px solid #ddd;' colspan="3" align="center">8. Registered Agent</td></tr>
<tr>
<td>Agent Name : $agename</td>
<td colspan="2">Address : $ageaddress</td>
</tr>
<tr>
<td style='font-weight:800; border-bottom: 1px solid #ddd;' colspan="3" align="center">9. The Registered Office will be situated at</td></tr>
<td colspan="3">Office : $ageoffice</td>
</tr>
<tr>
<td style='font-weight:800; border-bottom: 1px solid #ddd;' colspan="3" align="center">10. Bank Details</td></tr>
<tr>
<td>Name of the Bank:</td>
<td colspan="2">$bankdetails</td>
</tr>
<tr><td style='font-weight:500; color: #c29d0b; ' colspan="3">Type of accounts required : </td></tr>
<tr>
<td>Multi-currency Savings A/C : $savings</td>
<td colspan="2">U.S. Dollars Savings A/C : $usdollarssavings</td>
</tr>
<tr>
<td>Hong Kong Dollars Current A/C : $hongkongcurrent</td>
<td colspan="2">Trade A/C (For L/C, D/P, D/A) : $tradeac</td>
</tr>
<tr>
<td colspan="3">Others : $others</td>
</tr>
<tr>
<td style='font-weight:500; color: #c29d0b;' colspan="3" align="center">Services Required</td></tr>
<tr>
<td>Online Banking Service : $online</td>
<td colspan="2">ATM Card : $atm</td>
</tr>
<tr>
<td colspan="3">Phonebanking Service : $phonebanking</td>
</tr>
<tr>
<td>Name of Bank Signatory:</td>
<td colspan="3">$banksign</td>
</tr>
<tr>
<td style='font-weight:400; color: #c29d0b; ' colspan="3" align="center">Signing Arrangement</td></tr>
<tr>
<td>Either one bank signatory can operate bank account solely : $eitherone</td>
<td colspan="2">Any two of bank signatories can operate bank account jointly : $twobank</td>
</tr>
<tr>
<td style='font-weight:400;' align="center">Other Arrangement</td>
<td colspan="2">$arrangement</td>
</tr>
<tr>
<td style='font-weight:400;' align="center">Bank Address & Postal code</td>
<td colspan="3">$postalcode</td>
</tr>
<tr>
<td style='font-weight:800;' colspan="3" align="center">11. Correspondence Address</td>
</tr>
<tr>
<td>Address</td>
<td colspan="5">$correspondence</td>
</tr>
<tr>
<td style='font-weight:800;' colspan="3" align="center">12. Financial Year End Date</td></tr>
<tr>
<td colspan="3" >$financial </td>
</tr>
<tr>
<td style='font-weight:800;' colspan="3" align="center">13. Authorization to proceed with the above instruction and SX Global is requested to send the Company’s documentation and invoice to</td>
</tr>
<tr>
<td>Name : $name1</td>
<td colspan="2">Email : $email1</td>
</tr>
<tr>
<td>Mobile : $mobile1</td>
<td colspan="2">Tel : $tel1</td>
</tr>
<tr>
<td>Skype : $skype</td>
<td colspan="2">Address : $address12</td>
</tr>
<tr>
<td style='font-weight:800;' colspan="3" align="center">14. How do you know our company</td></tr>
<tr>
<td colspan="3" >$knowour</td>
</tr>
<tr style='font-weight:800;' colspan="5" align="center">
<td colspan="3" >15. Declaration</td></tr>
<tr>
<td colspan="5">I confirm that the above information is true and correct. : $true</td></tr>
<tr>
<td colspan="5">I confirm that the fund of the entity is clean and legitimate. : $clean</td></tr>
<tr>
<td colspan="5">I confirm that the new Company will not be used for criminal activities. : $criminal</td>
</tr>
</table>
<br />
<p>IP-Address : $ip</p>
</div>
</div>
EOD;
$to = $your_email;
$subject="New form submission";
$from = $frommail;
$headers = "From: $from \r\n";
$headers .= "Reply-To: $frommail \r\n";
$headers .= "Content-type: text/html\r\n";
if(mail($to, $subject, $body,$headers)){
echo "<div class='container'><div class='alert alert-success alert-dismissable'>
<button type='button' class='close' data-dismiss='alert' >×</button> Thank you for your registering! We will get back to you very soon.
</div></div>";
}
else {
echo "<div class='alert alert-danger alert-dismissable'>
<button type='button' class='close' data-dismiss='alert' >×</button> sorry.
</div> ";
}
}
}
HTML-Code (mehr Feld Code hinzufügen)
<script>
var counter = 1;
var limit = 5;
function addInput(divName) {
if (counter == limit) {
alert("You have reached the limit of adding " + counter + " Shareholders");
} else {
var newdiv = document.createElement('div');
newdiv.innerHTML = "Shareholders - " + (counter + 1) + " <br> <div class='form-group form-md-line-input'> <div class='col-lg-6'> Sur Name : <input type='text' class='form-control col-md-12 ' name=surname1[]> </div> <div class='col-lg-6'>Given Name :<input type='text' class='form-control col-md-12' name='givenname1[]'></div> </div> <br /><br /> <br /> <div class='form-group form-md-line-input '><div class='col-lg-6'>Address : <input type='text' class='form-control col-md-12 ' name='address1[]'> </div> <div class='col-lg-6'> Business Occupation :<input type='text' class='form-control col-md-12' name='occupation1[]' > </div> </div><br /><br /><br /><div class='form-group form-md-line-input '><div class='col-lg-6'> No. of Shares :<input type='text' class='form-control col-md-12' name='shares1[]'> </div><div class='col-lg-6'>Percent of Shareholding : <input type='text' class='form-control col-md-12' name='percent1[]'></div></div><br /><br /> <br /><div class='form-group form-md-line-input '> <div class='col-lg-6'> Nationality : <input type='text' class='form-control col-md-12' name='national1[]'></div><div class='col-lg-6'> Passport/Identity Card No./Company No : <input type='text' class='form-control col-md-12' name='passport1[]'></div></div><br /> <br /><br />";
document.getElementById(divName).appendChild(newdiv);
counter++;
}
}
</script>
Ich weiß nicht, welche Methode zu verwenden. Bitte, bitte hilf mir.
Dieser jedes Element setzt auf seine eigene Linie (
> zuerst Danke für die Antwort @Jeff, ok das ist richtig, aber ich mein Problem ist nicht dieses Feld '
iam sorry ich dnt konw Englisch fließend – Kumar
Verwandte Themen