Jump to content

[SOLVED] contact us form problems


HNX

Recommended Posts

  • Replies 121
  • Created
  • Last Reply

shit...:| now im SURE u did check the site out or u didnt file the text fields to press enter,,,,

 

http://www.elico.ca/main.cfm?p=40&l=fr

 

ok the field name is in French translate with Google to understand what i need is after u click i mean submit which is called "Envoyer" on that page :|......

ur gonna see that the message loads on the same page without even loading the whole page....

 

please help me Lol,

HNX

Link to comment
Share on other sites

shit...:| now im SURE u did check the site out or u didnt file the text fields to press enter,,,,

 

http://www.elico.ca/main.cfm?p=40&l=fr

 

ok the field name is in French translate with Google to understand what i need is after u click i mean submit which is called "Envoyer" on that page :|......

ur gonna see that the message loads on the same page without even loading the whole page....

 

please help me Lol,

HNX

 

Lol, what the hell is COURRIEL ?

Link to comment
Share on other sites

lol it means email Lolll

 

HNS, that is exactly what my script does, its just that their form disapears. My script is on the same page too..

 

Try this, it does exactly what you want:

 

<?php


if(isset($_POST['Submit'])){
	$to = "YOUR HOTMAIL ADDRESS";
	$subject = $_POST['subject'];
	$message = $_POST['detail'];
	$from = $_POST['name'];
	$headers = "From: $from";

if(($to == "")||($subject == "")||($message == "")||($from == "")){

echo "Please fill in all the fields";
$form = true;
}
else{
	if(mail($to,$subject,$message,$headers)) {
		//echo "Thank you for your interest, your e-mail was sent.";
                  echo "Thank you for your interest, your e-mail was sent."; 

                             $form = false;
	}
                    
                  }

}

                         if($form == true){
	print '<form action="" method=post name=form1 id=form1>';
	print '<table width="100%" border="0" cellspacing="1" cellpadding="3">';
	print '<tr>';
	print '<td width="16%"><span class="style108">Subject</span></td>';
	print '<td width="2%"><span class="style104">:</span></td>';
	print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Message</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Name</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><input name="name" type="text" id="name" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Email</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td> </td>';
	print '<td> </td>';
	print '<td><input type="submit" name="Submit" value="Submit" />';
	print '<input type="reset" name="Submit2" value="Reset" /></td>';
	print '</tr>';
               print'</table>';
               print'</form>';

}

?>

Link to comment
Share on other sites

ok joey do u have the files i sent u?? i mean the megaupload link on which the files are on??? and after did u test the php?? i mean i just uploaded the new send-mail.php file and what it does is the followibng (check the picture attached)

 

[attachment deleted by admin]

Link to comment
Share on other sites

ok joey do u have the files i sent u?? i mean the megaupload link on which the files are on??? and after did u test the php?? i mean i just uploaded the new send-mail.php file and what it does is the followibng (check the picture attached)

 

HNX, thats exactly what the other site does, you just dont have any content on your site like they do.

Link to comment
Share on other sites

euh so it means im missing something...right?/

 

All the other script does is when they post the form, they don't echo the FORM, just a message. My script does the same thing.

 

 

If you had a nice layout, and you put that script in the middle of some nice layout, it wont point to a blank page. It will echo the message with the layout there, on the same page.

Link to comment
Share on other sites

...so the problem is my layout??

 

No, lol, the problem isnt your layout. You only have a blank page with some forms, thats why you think it keeps changing pages when it shows the message. The site you showed me uses a similiar script, like the one I gave you...

 

You know what, I will make a layout, and put the exact script i have you, and you'll know what i mean :D

Link to comment
Share on other sites

http://www.flash-portal.org/fp-quick/testing.php

 

CODE:

 

<table width="62%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
  <tr>
    <td bgcolor="#CCCCCC">       Email Sender 4000</td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><?php

$form = true;
if(isset($_POST['Submit'])){
	$to = "YOUR HOTMAIL ADDRESS";
	$subject = $_POST['subject'];
	$message = $_POST['detail'];
	$from = $_POST['name'];
	$headers = "From: $from";

if(($to == "")||($subject == "")||($message == "")||($from == "")){

echo "Please fill in all the fields";
$form = true;
}
else{

		//echo "Thank you for your interest, your e-mail was sent.";
                   echo "Thank you for your interest, your e-mail was sent."; 

                              $form = false;
                     
                   }

}

                          if($form == true){
	print '<form action="" method=post name=form1 id=form1>';
	print '<table width="100%" border="0" cellspacing="1" cellpadding="3">';
	print '<tr>';
	print '<td width="16%"><span class="style108">Subject</span></td>';
	print '<td width="2%"><span class="style104">:</span></td>';
	print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Message</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Name</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><input name="name" type="text" id="name" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Email</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td> </td>';
	print '<td> </td>';
	print '<td><input type="submit" name="Submit" value="Submit" />';
	print '<input type="reset" name="Submit2" value="Reset" /></td>';
	print '</tr>';
                print'</table>';
                print'</form>';

}

?></td>
  </tr>
</table>

Link to comment
Share on other sites

euh....i replace my send-mail fir with this??? right>?

 

That was just an example of how i used the script.

 

I put the script in a table, with a background color. It was to show you that the script does go to another page...

 

And also, replace your send-mail thing with

 

<?php

$form = true;
if(isset($_POST['Submit'])){
	$to = "YOUR HOTMAIL ADDRESS";
	$subject = $_POST['subject'];
	$message = $_POST['detail'];
	$from = $_POST['name'];
	$headers = "From: $from";

if(($to == "")||($subject == "")||($message == "")||($from == "")){

echo "Please fill in all the fields";
$form = true;
}
else{

		//echo "Thank you for your interest, your e-mail was sent.";
                   echo "Thank you for your interest, your e-mail was sent."; 

                              $form = false;
                     
                   }

}

                          if($form == true){
	print '<form action="" method=post name=form1 id=form1>';
	print '<table width="100%" border="0" cellspacing="1" cellpadding="3">';
	print '<tr>';
	print '<td width="16%"><span class="style108">Subject</span></td>';
	print '<td width="2%"><span class="style104">:</span></td>';
	print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Message</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Name</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><input name="name" type="text" id="name" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Email</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td> </td>';
	print '<td> </td>';
	print '<td><input type="submit" name="Submit" value="Submit" />';
	print '<input type="reset" name="Submit2" value="Reset" /></td>';
	print '</tr>';
                print'</table>';
                print'</form>';

}

?>

Link to comment
Share on other sites

ok i copy and pasted the code u gave me in my send_mail.php file and i tried the contact us form and the image attached with this is the result...:s

 

[attachment deleted by admin]

Link to comment
Share on other sites

Okay

 

- Delete send_mail.php

- Delete contactus.html

- Create a new file called Contactus.php

 

Put this in the Contactus.php

 

<!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=iso-8859-1" />
<title>Helping the community</title>
<meta name="keywords" content="help">
<meta name="description" content="help for free.">
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style4 {font-size: 9px}
.style3 {
font-size: 11px;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style6 {font-size: 16px}
.style24 {color: #990000}
.style31 {
font-size: 24px;
font-weight: bold;
color: #003366;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style49 {font-size: 14px; font-weight: bold; color: #0099FF; }
.style51 {color: #666666}
.style62 {
font-size: 18px;
color: #996600;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style92 {font-size: 9px; color: #666666; }
.style93 {font-size: 14px;
color: #0066FF;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
.style95 {color: #FFFFFF}
.style97 {
color: #FFFFFF;
font-weight: bold;
font-size: 12px;
}
.style98 {
font-size: 12px;
font-weight: bold;
}
.style103 {font-size: 14px; color: #000000; }
a:link {
color: #666666;
text-decoration: none;
}
.style10 {font-size: 12px; color: #000000;}
.style11 {color: #095faa}
.style12 {color: #A51109}
.style104 {font-size: 16px}
.style104 {font-size: 18px}
.style108 {font-size: 16px}
.style108 {font-size: 18px}
.style109 {font-size: 9px; color: #666666; }
.style109 {font-size: 12px; color: #3366FF; font-weight: bold; }
.style110 {font-size: 14px;
color: #0066FF;
}
.style110 {color: #FF6600; font-weight: bold; font-size: 12px; }
.style111 {color: #FF0000}
.style111 {color: #1065AD}
a:visited {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
<script type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>

<body><div id="main">
<table width="797" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:0; padding:0">
  <tr>
    <td height="65" colspan="7" align="center" valign="top">
  <table width="97%" border="0">
      <tr>
        <td height="47" align="right" valign="middle"><div align="center"><font size="+6"><b><img src="Images/banner3.jpg" width="767" height="203" /></b></font></div>
          <div align="left">        </div></td>
        </tr>
    </table></td>
  </tr>
      <tr>
        <td width="20" bgcolor="#FFFFFF"><div align="center"></div></td>
        <td width="760" bgcolor="#FF0000"><div align="center" class="style95">Why do people Find it hard to study</div></td>
        <td width="17" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="center"></div></td>
  </tr>
  <tr>
    <td height="1133" colspan="7">
      <table width="99%" border="0" cellspacing="0" cellpadding="0" style="margin:0; padding:0; table-layout:fixed">
        <tr>
          <td width="183" align="left" valign="top" background=""><table width="175" border="0" align="left" style="margin:0; padding:0;" cellpadding="0" cellspacing="0" class="style4">
            <tr>
              <td> </td>
              <td><table border="0" cellpadding="0" cellspacing="0" bgcolor="#006699" width="164%">
                <tr>
                  <td>
                    <table width="100%" border="0" cellspacing="1" cellpadding="2">
                      <tr>
                        <td width="214" bgcolor="#006699"><div align="center"><span class="style97">Menu</span></div></td>
                      </tr>
                      <tr>
                        <td colspan="1" bgcolor="#FFFFFF"><div align="center">
                            <table width="100%">
                              <tr>
                                <td align="left" width="21"> ⇒ </td>
                                <td align="left"><div align="left"><span class="style103"><a href="index.html">Home</a></span></div></td>
                              </tr>
                            </table>
                            <table width="100%">
                              <tr>
                                <td align="left" width="21"> ⇒ </td>
                                <td align="left"><div align="left"><span class="style93"><a href="ingredients.html">Page1</a></span></div></td>
                              </tr>
                            </table>
                            <table width="100%">
                              <tr>
                                <td align="left" width="21"> ⇒ </td>
                                <td align="left"><div align="left"><span class="style93"><a href="howitworks.html">Page2</a></span></div></td>
                              </tr>
                            </table>
                            <table width="100%">
                              <tr>
                                <td align="left" width="21"> ⇒ </td>
                                <td align="left"><div align="left"><span class="style93"><a href="testimonials.html">Page3</a></span></div></td>
                              </tr>
                            </table>
                            <table width="100%">
                              <tr>
                                <td align="left" width="21"> ⇒ </td>
                                <td align="left"><div align="left"><span class="style93"><a href="faq.html">Page4</a></span></div></td>
                              </tr>
                            </table>
                            <table width="100%">
                              <tr>
                                <td align="left" width="21"> ⇒ </td>
                                <td align="left"><div align="left"><span class="style93"><a href="guarantee.html">Page5</a></span></div></td>
                              </tr>
                            </table>
                            <table width="100%">
                              <tr>
                                <td align="left" width="21"> ⇒ </td>
                                <td align="left"><div align="left"><span class="style93"><a href="ordernow.html">Page6</a></span></div></td>
                              </tr>
                            </table>
                            <table width="100%">
                              <tr>
                                <td align="left" width="21"> ⇒ </td>
                                <td align="left"><div align="left"><span class="style93"><a href="contactus.html">Page7</a></span></div></td>
                              </tr>
                            </table>
                        </div></td>
                      </tr>
                  </table></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td> </td>
              <td><table width="100%" border="0" cellspacing="1" cellpadding="2">
			<tr>
				<td width="145" bgcolor="#006699"><div align="center" class="style98"><font color="white">Someone</font></div></td>
			</tr>
			<tr>
				<td colspan="1" bgcolor="#eeeeee">
					<table border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF">
					<tr>
						<td><p align="center"><img src="Images/DudeF.jpg" width="142" height="252" /></p>
						  <p align="center">_____________________</p>
						  <p align="center" class="style98"> </p>
						  </td>
					</tr>
				  </table>
				</td>
			</tr>
			</table></td>
            </tr>
            <tr>
              <td width="21"> </td>
              <td width="154"><table width="100%" border="0" cellspacing="1" cellpadding="2">
                <tr>
                  <td width="145" bgcolor="#006699"><div align="center" class="style98"><font color="white">Someone</font></div></td>
                </tr>
                <tr>
                  <td colspan="1" bgcolor="#eeeeee">
                    <table border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF">
                      <tr>
                        <td><p align="center"><img src="Images/LadyF.jpg" width="142" height="252" /></p>
                            <p align="center">_____________________</p>
                            <p align="center" class="style98"> </p>
                            </td>
                      </tr>
                  </table></td>
                </tr>
              </table>                <strong><br />
              </strong>
                <strong>                </strong></td>
          </tr></table></td>
          <td width="618" rowspan="2" align="left" valign="top" style="margin:0; padding:0; width:595px;"><table width="591" border="0" align="left" cellpadding="0" cellspacing="0" style="margin:0; padding:0; float:left">
            
            <tr>
              <td height="3" colspan="2" align="left" valign="top"></td>
            </tr>
            <tr>
              <td height="27" colspan="2" align="left" valign="middle" bgcolor="#EFEFEF"><table width="594" border="0">
                  <tr>
                    <td width="265" height="24"><strong><span class="style3">  <span class="style6">Contact Us </span></span></strong> </td>
                    <td width="319"><div align="right" class="style62"> </div></td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td colspan="2" align="left" valign="top"><p align="center"> </p>
                <p align="center"><img src="Images/supportbanner.jpg" width="380" height="186" /></p>
                <p> </p></td>
            </tr>

            <tr>
              <td align="left" valign="top"><table width="563" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td><img src="Images/tl.gif" /></td>
                  <td background="Images/topline.jpg"><div align="center"></div></td>
                  <td><img src="Images/tr.gif" /></td>
                </tr>
                <tr>
                  <td style="border-left-style:solid;border-width: 1px;border-color:#8a8b91;padding: 0px;width: 12px;">&#160;</td>
                  <td style="padding: 0px;text-align:justify;"><!-- Quantity -->
                      <table border="0" cellspacing="4" cellpadding="2">
                        <tr>
                          <td align="center" valign="top" width="488"></td>
                        </tr>
                        <tr>
                          <td height="150" align="left" valign="top"><p align="center" class="style10"><span class="news-title style11">24/7 - Fast Customer Support For any Questions! Got a question for us? - we love to hear from our customers. You may easily contact us via email, or the convenient web form below. No matter what your question or comment may be, our knowledgeable and courteous experts are here to assist you with anything concerning our products and/or site issues.</span><span class="style11"><strong></strong></span><strong><br />
                            </strong> </p>
                              <p></p>
                            <table width="424" border="0" align="center" cellpadding="3" cellspacing="1">
                                <tr>
                                  <td width="416"><strong>Contact Form </strong></td>
                                </tr>
                              </table>
                            <table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
                                <tr>
                                  <td><?php

$form = true;
if(isset($_POST['Submit'])){
	$to = "info@growth-flexvpro.net";
	$subject = $_POST['subject'];
	$message = $_POST['detail'];
	$from = $_POST['name'];
	$headers = "From: $from";

if(($to == "")||($subject == "")||($message == "")||($from == "")){

echo "Please fill in all the fields";
$form = true;
}
else{

		//echo "Thank you for your interest, your e-mail was sent.";
                   echo "Thank you for your interest, your e-mail was sent."; 

                              $form = false;
                     
                   }

}

                          if($form == true){
	print '<form action="" method=post name=form1 id=form1>';
	print '<table width="100%" border="0" cellspacing="1" cellpadding="3">';
	print '<tr>';
	print '<td width="16%"><span class="style108">Subject</span></td>';
	print '<td width="2%"><span class="style104">:</span></td>';
	print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Message</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Name</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><input name="name" type="text" id="name" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td><span class="style108">Email</span></td>';
	print '<td><span class="style104">:</span></td>';
	print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>';
	print '</tr>';
	print '<tr>';
	print '<td> </td>';
	print '<td> </td>';
	print '<td><input type="submit" name="Submit" value="Submit" />';
	print '<input type="reset" name="Submit2" value="Reset" /></td>';
	print '</tr>';
                print'</table>';
                print'</form>';

}

?>                                     </td>
                                </tr>
                              </table>
                            <table cellspacing="0" cellpadding="0">
                                <tr>
                                  <th width="157" nowrap="nowrap"><div align="left"><span class="style109"></span></div></th>
                                </tr>
                                <tr>
                                  <th nowrap="nowrap" class="style110"><div align="left"></div></th>
                                </tr>
                                <tr>
                                  <th nowrap="nowrap" class="style110"><p class="style111">  </p></th>
                                </tr>
                                <tr>
                                  <th nowrap="nowrap" class="style110"><div align="center"></div></th>
                                </tr>
                              </table>
                            <div align="center"></div></td>
                        </tr>
                        <tr>
                          <td align="left" valign="top" width="488" colspan="2" style="padding-left: 15px;font-weight: bold;font-size: 12px;background-color:#EFEFEF;"> </td>
                        </tr>
                      </table>
                    <!-- Quantity -->
                  </td>
                  <td style="border-right-style:solid;border-width: 1px;border-color:#8a8b91;padding: 0px;width: 12px;">&#160;</td>
                </tr>
                <tr>
                  <td><img src="Images/bl.gif" /></td>
                  <td background="Images/bottomline.jpg"></td>
                  <td><img src="Images/br.gif" /></td>
                </tr>
              </table>
              <p align="center"><span class="style24"><br />
              </a></span></p>                
              <h1 align="center" class="style49 style51"><span class="style31">                </span></h1>                
              <h1 class="style49 style51"><br />
                </h1></td>
              <td width="2%" rowspan="2" align="left" valign="top"> </td>
              </tr>
            <tr>
              <td height="899" valign="top"><h2 align="center" class="style6"> </h2>
                <div align="center">
                  <p align="center"> </p>
                  <p align="center"> </p>
                  <p align="center"> </p>
                  <p align="center"> </p>
                  <p align="center"> </p>
                  <p align="center"> </p>
                  <p align="center"> </p>
                  </div>                </td>
              </tr>

          </table></td>
          <td width="4" rowspan="2" background=""> </td>
        </tr>
        <tr>
          <td width="183" height="45" align="left" valign="bottom" background=""><table width="160" border="0" align="left" style="margin-left:20px; margin-right:0; padding:0; line-height:20px" cellpadding="0" cellspacing="0" class="style4">
              <tr>
                <td align="left"><br />
                  <a href="contactus.html"><img src="Images/customersrv.gif" border="0" height="14" width="101" /></td>
              </tr>
          </table></td></tr>
        <tr>
          <td colspan="3"><img src="" width="797" height="9" /></td>
        </tr>
      </table>      
    <a href=""></a></td>
  </tr>
  <tr>
    <td colspan="7" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="50%" height="16" align="left" valign="bottom"> </td>
        <td width="50%" align="right" valign="top"> </td>
      </tr>
    </table>      </td>
  </tr>
</table>
<br />
 </div></body>
</html>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • 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.