Jump to content

Recommended Posts

i am getting Name, Email and Comments fields filled in my email but i am not getting the 'Inquiring about'  filled in my email, whats the problem with this and how can i get all the field in my email, i need help, please somebody help me.

 

here is the HTML code.

 

<html dir="ltr">

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Creativo</title>
<style type="text/css">
<!--
.style1 {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #FFFFFF;
}
.style2 {
color: #FFFF00;
font-weight: bold;
}
.style5 {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FFFFFF;
}
.style7 {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FFFFFF;
font-size: 12px;
}
-->
</style>
<script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
//-->
</script>
</head>

<body bgcolor="#e61b23">

<p> </p>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="83%">
    <tr>
      <td width="100%">
      <p align="center">
      <img border="0" src="logonew.gif" width="572" height="142"></td>
    </tr>
  </table>
  </center>
</div>
<br>
<table width="750" border="0" align="center">
  <tr>
    <td valign="top"><div align="center">
      <h2 class="style2">Underconstruction</h2>
      </div></td>
  </tr>
</table>
<table width="750" border="0" align="center">
  <tr>
    <td><span class="style1">We are now taking projects, to inquire about our services please fill in the form and we will contact you shortly.</span></td>
  </tr>
</table>
<br>
<table width="750" border="0" align="center">
  <tr>
    <td valign="top"><form action="sendmail.php" method="post" >
      <table width="750" border="0">
        <tr>
          <td width="98"><span class="style7">Name:</span></td>
          <td width="642"><label>
            <input name="name" type="text" id="name" >
          </label></td>
        </tr>
        <tr>
          <td><span class="style7">Email:</span></td>
          <td><label>
            <input name="email" type="text" id="email" >
          </label></td>
        </tr>
        <tr>
          <td valign="top" class="style7">Inquiring about:</td>
          <td><label>
            <select name="message" size="3" multiple id="message">
              <option id="message">Web Designing</option>
              <option>Graphics Designing</option>
              <option>Software Development</option>
            </select>
          </label></td>
        </tr>
        <tr>
          <td valign="top"><span class="style7">Comments:</span></td>
          <td><label>
            <textarea name="message"  id="message" cols="45" rows="5"></textarea>
            <br>
            <input name="Submit" type="submit" onClick="MM_validateForm('name','','R','email','','RisEmail');return document.MM_returnValue" value="Submit">
            <input type="reset" name="Reset" value="Reset">
          </label></td>
        </tr>
      </table>
    </form>    </td>
  </tr>
</table>

<script type="text/javascript">
<!--
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
//-->
</script>
</body>

</html>

---------------------------------------------------------------

here is the PHP code

 

<?php
  $name = $_REQUEST['name'] ;
  $email = $_REQUEST['email'] ;
  $message = $_REQUEST['message'] ;


  mail( "my website.net", "Inquiry from Creativo Studios website.",
    $message, "From: $email" );

  header( "Location: http://www.my website.net" );
  

$respond_subject = "Thank you for contacting us!";


$respond_message = "Hello!

Thank you for contacting us! We will get back to you
as soon as possible!

Yours sincerely,

My Name
www.my website.net
";

mail($email, $respond_subject, $respond_message);
?>

Link to comment
https://forums.phpfreaks.com/topic/97938-i-am-having-problem-with-this/
Share on other sites

you are using same name 'message' for bot combo box and text area  so you will get only one value in variable message

rename any one of below  ;) 

 

<td><label>

            <select name="message" size="3" multiple id="message">

              <option id="message">Web Designing</option>

              <option>Graphics Designing</option>

              <option>Software Development</option>

            </select>

          </label></td>

        </tr>

        <tr>

          <td valign="top"><span class="style7">Comments:</span></td>

          <td><label>

          <textarea name="message"  id="message" cols="45" rows="5"></textarea>

thank your for your reply but it still not working, do you have any idea how to make it work properly.

 

this is new PHP code.

 

<?php
  $name = $_REQUEST['name'] ;
  $email = $_REQUEST['email'] ;
  $message = $_REQUEST['message'] ;


  mail( "info@creativostudios.net", "Inquiry from Creativo Studios website.",
    $message, "From: $email" );

  header( "Location: http://www.creativostudios.net" );
  

$respond_subject = "Thank you for contacting us!";


$respond_message = "Hello!

Thank you for contacting us! We will get back to you
as soon as possible!

Yours sincerely,

Saad Khalid Khan
www.creativostudios.net
";

mail($email, $respond_subject, $respond_message);
?>

 

-------------------------------------------------------

this is the new HTML code.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="520" border="0">
  <tr>
    <td width="514"><form  method="post" action="send_mail.php">
      <table width="470" border="0">
        <tr>
          <td width="107">Name:</td>
          <td width="353"><label>
            <input type="text" name="name" id="name" />
          </label></td>
        </tr>
        <tr>
          <td>Email:</td>
          <td><label>
            <input type="text" name="email" id="email" />
          </label></td>
        </tr>
        <tr>
          <td valign="top">Inquiring about:</td>
          <td><label>
            <select name="inquiry" size="3" multiple="multiple" id="inquiry">
              <option value="Web">Web Designing</option>
              <option value="Graphics">Graphics Designing</option>
              <option value="Software">Software Development</option>
            </select>
          </label></td>
        </tr>
        <tr>
          <td valign="top">Message:</td>
          <td><label>
            <textarea name="message" id="message" cols="45" rows="5"></textarea>
          </label></td>
        </tr>
        <tr>
          <td valign="top"> </td>
          <td><label>
            <input type="submit" name="Submit" id="Submit" value="Submit" />
          </label></td>
        </tr>
      </table>
        </form>
    </td>
  </tr>
</table>

</body>
</html>

 


<?php
  $name = $_REQUEST['name'] ;
  $email = $_REQUEST['email'] ;
  $message = $_REQUEST['message'] ;
  $inquiry=$_REQUEST['inquiry'];
  $inquiry=@implode(",",$inquiry);

$finalmessage='Inquiry For : '.$inquiry.' <br> $message';

  mail( "info@creativostudios.net", "Inquiry from Creativo Studios website.",
    $finalmessage, "From: $email" );
   



$respond_subject = "Thank you for contacting us!";


$respond_message = "Hello!

Thank you for contacting us! We will get back to you
as soon as possible!

Yours sincerely,

Saad Khalid Khan
www.creativostudios.net
";

mail($email, $respond_subject, $respond_message);
header( "Location: http://www.creativostudios.net" );
?>

-------------------------------------------------------
this is the new HTML code.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="520" border="0">
  <tr>
    <td width="514"><form  method="post" action="send_mail.php">
      <table width="470" border="0">
        <tr>
          <td width="107">Name:</td>
          <td width="353"><label>
            <input type="text" name="name" id="name" />
          </label></td>
        </tr>
        <tr>
          <td>Email:</td>
          <td><label>
            <input type="text" name="email" id="email" />
          </label></td>
        </tr>
        <tr>
          <td valign="top">Inquiring about:</td>
          <td><label>
            <select name="inquiry[]" size="3" multiple="multiple" id="inquiry">
              <option value="Web">Web Designing</option>
              <option value="Graphics">Graphics Designing</option>
              <option value="Software">Software Development</option>
            </select>
          </label></td>
        </tr>
        <tr>
          <td valign="top">Message:</td>
          <td><label>
            <textarea name="message" id="message" cols="45" rows="5"></textarea>
          </label></td>
        </tr>
        <tr>
          <td valign="top"> </td>
          <td><label>
            <input type="submit" name="Submit" id="Submit" value="Submit" />
          </label></td>
        </tr>
      </table>
        </form>
    </td>
  </tr>
</table>

</body>
</html>

*i am editing this post*

 

i got it working Thank you so much

 

this is what i am getting in my email

 

Inquiry For : Web,Graphics<br>now is it working ?

 

secondly i don't know anything about PHP so i am taking help from online tutorials and forum, can you please mention me what should i use except $_REQUEST

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.