简体   繁体   中英

Can't send multiple text/variables using email from php

Hi can anybody help me with sending more things in the email.. because i tried to send more things in the email that i can't seem to send. Also i use ajax to call and send this email but only the ordinary email works and note this kind T_T

HTML CODE:

Email:<input type='text' name='' id=''>
Subject:<input type='text' name='' id=''>
Name of Person:<input type='text' name='' id=''>
Company:<input type='text' name='' id=''>
Contact number:<input type='text' name='' id=''>
Message:<textarea></textarea>

PHP CODE: (Pls note this is note the whole code just the thing that i need to be able to send an email)

  mail("email", $subject,
  $message, "From:" . $email);

I tried to used this in the php code to send the email but to no avail... TRIAL CODE:

$mail = " ".$_REQUEST['Message']."</br> ".$_REQUEST['Contact']."</br> ".$_REQUEST['Name']." </br>  ".$_REQUEST['Company']." ";

You didn't give any name to the text boxes. So you cannot get the values. Give the appropriate names. Try this,

Email:<input type='text' name='email' id=''>
Subject:<input type='text' name='Subject' id=''>
Name of Person:<input type='text' name='Name' id=''>
Company:<input type='text' name='Company' id=''>
Contact number:<input type='text' name='Contact' id=''>
Message:<textarea name='Message'></textarea>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM