Jump to content

My First Script! Contact Form


eharpaz

Recommended Posts

I am trying to add a simple contact form to the front page of my website www.gkicredit.com . The form shows up as I would want (aside from the font being black when I want it to be white!) but when you click submit you get an internal service error! I will list my php code for both the form and the send_contact.php file (submit button).

 

My goal is to make this work any way possible! Thanks in advance!

 

FORM:

 

<table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td><strong>Contact Form </strong></td>
</tr>
</table>

<table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form name="form1" method="post" action="send_contactnew.php">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="16%">Full Name</td>
<td width="2%">:</td>
<td width="82%"><input name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td>City, State</td>
<td>:</td>
<td><input name="location" type="text" id="location" size="50"></td>
</tr>
<tr>
<td>Phone Number</td>
<td>:</td>
<td><input name="phone" type="text" id="phone" size="50"></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"> </td>
</tr>
</table>
</form>
</td>
</tr>
</table>

 

send_contactnew.php:

 

<?php
  $name = $_REQUEST['name'] ;
  $location = $_REQUEST['location'] ;
  $phone = $_REQUEST['phone'] ;
  $customer_mail = $_REQUEST['customer_mail'] ;

  if (!isset($_REQUEST['customer_mail'])) {
    header( "Location: http://gkicredit.com/" );
  }
  elseif (empty($email) || empty($phone)) {
    header( "Location: http://gkicredit.com/error.php" );
  }
  else {
    mail( "virtuouse@gmail.com", "Contact Form Results",
      "$name\nLocation? $location\n",
      "From: $name <$email>" );
    header( "Location: http://gkicredit.com/thankyou.php" );
  }
?>

 

 

The goal here is to have all the information placed in the form (Name, city state, phone number, and email) to be sent in an email to virtuouse@gmail.com or whatever I put as the email there. If any other info is needed please feel free to ask! I've been stuck on this for over a week now! :(  :shrug:

 

Link to comment
Share on other sites

SO I wrote this code on the fly but it's PHP and HTML all on one page and SHOULD work but like I said, not tested...

This page MUST be named "form.php" or else you need to change <form action="form.php">  (it submits to itself since the processing PHP is within the page)

 


<html>
<body>

<?php
if($_POST['Submit']) {

//COLLECT DATA
  $name = $_POST['name'];
  $location = $_POST['location'];
  $phone = $_POST['phone'];
  $customer_mail = $_POST['customer_mail'];

//ERROR CHECKING
$error = '';

if (!$name)
	$error = $error."<b>Full Name</b>";
if (!$location)
	$error = $error."<b>City, State</b>";
if (!$phone)
	$error = $error."<b>Phone Number</b>";
if (!$customer_mail)         
	$error = $error."<b>Email Address</b>";

if ($error!="")
	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
else
  	{
//SUBMIT & REDIRECT
mail( "virtuouse@gmail.com", "Contact Form Results", $emailMessage, "$name <$email>" );
header( "Location: http://gkicredit.com/thankyou.php" );


?>

<table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td><strong>Contact Form </strong></td>
</tr>
</table>

<table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form method="post" action="form.php">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="16%">Full Name</td>
<td width="2%">:</td>
<td width="82%"><input name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td>City, State</td>
<td>:</td>
<td><input name="location" type="text" id="location" size="50"></td>
</tr>
<tr>
<td>Phone Number</td>
<td>:</td>
<td><input name="phone" type="text" id="phone" size="50"></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"> </td>
</tr>
</table>
</form>
</td>
</tr>
</table>


send_contactnew.php:

<?php

  if (!isset($_POST['customer_mail'])) {
    header( "Location: http://gkicredit.com/" );
  }
  elseif (empty($email) || empty($phone)) {
    header( "Location: http://gkicredit.com/error.php" );
  }
  else {
    mail( "virtuouse@gmail.com", "Contact Form Results",
      "$name\nLocation? $location\n",
      "From: $name <$email>" );
    header( "Location: http://gkicredit.com/thankyou.php" );
  }
?>

Link to comment
Share on other sites

Genesis it looks so much more neat now! I feel like im getting so much closer! I don't get an internal error anymore but it says "Parse error: syntax error, unexpected $end in /home/bsc/public_html/GKICREDIT.COM/send_contactnew.php on line 31"

 

What could this mean? Which file "MUST" be named form.php? My form code is placed directly on my gkicredit.com/Home.php. The send_contactnew.php is on my ftp.

 

I'm so close I can taste it!

 

This is the updated send_contactnew.php that Genesis helped me make (line 31 is the last line) :

 

<?php
if($_POST['Submit']) {

//COLLECT DATA
  $name = $_POST['name'];
  $location = $_POST['location'];
  $phone = $_POST['phone'];
  $customer_mail = $_POST['customer_mail'];

//ERROR CHECKING
$error = '';

if (!$name)
	$error = $error."<b>Full Name</b>";
if (!$location)
	$error = $error."<b>City, State</b>";
if (!$phone)
	$error = $error."<b>Phone Number</b>";
if (!$customer_mail)         
	$error = $error."<b>Email Address</b>";

if ($error!="")
	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
else
  	{
//SUBMIT & REDIRECT
mail( "virtuouse@gmail.com", "Contact Form Results", $emailMessage, "$name <$email>" );
header( "Location: http://gkicredit.com/thankyou.php" );


?>

Link to comment
Share on other sites

Oh my mistake! I will attatch my home.php file as well as post it here.. Whatever is easier for you to access.

 

Also, since you said you will integrate it within this file, does that mean that I no longer need the send_contactnew.php on my ftp?

 

<?php
require_once('init.php');
$loadClass = SB_Modules::loadClass('Modules_Login');
$loginObject = new Modules_Login('9sny8aqp0jl');
$loginObject->init();
$loginObject->processAction();
?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>GKI Credit Repair - Home</title><meta name="DESCRIPTION" content=""><meta name="KEYWORDS" content="Credit Repair"><meta name="GENERATOR" content="Parallels Plesk Sitebuilder 4.5.0"><link href="css/styles.css?template=business-019&colorScheme=green&header=headers1&button=buttons3" rel="stylesheet" type="text/css"></head><BODY MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" RIGHTMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0"><TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" class="main-bg" style="width: 100%; height: 100%;" summary=""><TR><TD height="241" style="background-image: url('images/header_bg.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3');"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%; background-image: url('images/header.jpg?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-position: top right; background-repeat: no-repeat;"><tr><td style="background-image: url('images/header_l.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-position: top left; background-repeat: no-repeat;"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%;"><tr><td height="80" colspan="2" style="padding: 0 145px 0 60px;"><table cellpadding="0" cellspacing="0" align="center" summary="" bgcolor="#1F2024"><tr><td width="30"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="Home.php" class="amenu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>Home</a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="registration.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br><?php
echo $loginObject->getMainMenuTitle('Registration');
?></a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="services.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>Services</a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="News.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>News and Events</a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="contact.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>Contact Us</a></td><td width="30"><div style="width:5px; height:0px;"><span></span></div></td></tr></table></td></tr><tr><td width="100%" height="100%" style="padding: 5px 90px 5px 65px;"><table cellpadding="0" cellspacing="0" border="0" summary="" align="center"><tr><td style="padding-right: 15px;"><a href="./"><img src="images/logo.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td class="company">GKI Credit Repair</td></tr></table></td><td align="center" class="slogan" style="padding: 80px 220px 0 0;">Call Now For Free Consolidation! 1.888.992.9090<div style="width:165px; height:0px;"><span></span></div></td></tr></table></td></tr></table></TD></TR><TR><TD height="1" bgcolor="#636366"></TD></TR><TR><TD height="100%" name="SB_stretch" valign="top"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%;"><tr valign="top"><td><div style="width:59px; height:0px;"><span></span></div></td><td bgcolor="#636366"><div style="width:1px; height:0px;"><span></span></div></td><td style="padding-top: 30px;"><table cellpadding="0" cellspacing="0" width="204" align="center" summary=""><tr><td style="padding-right: 15px;"><a href="About.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="About.php" class="submenu">About Us</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="Feedack.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="Feedack.php" class="submenu">Feedback</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="FAQ.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="FAQ.php" class="submenu">Frequently Asked Questions</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="FCRAct.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="FCRAct.php" class="submenu">Fair Credit Reporting Act</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="FDCPAct.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="FDCPAct.php" class="submenu">Fair Debt Collection Practices Act</a></td></tr></table><div style="width:253px; height:0px;"><span></span></div></td><td bgcolor="#636366"><div style="width:1px; height:0px;"><span></span></div></td><td width="100%" class="pageContent" style="padding: 20px;"><table cellpadding="0" cellspacing="0" border="0" summary=""><tr><td class="text-header" style="padding-right: 5px;">Home</td><td><img src="images/txtheader_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td></tr></table><div style="width:0px; height:15px;"><span></span></div><span style="color: #fffafa">
<div><span style="font-size: small">
<div>
<div>
<div>
<div>
<div> </div>
</div>
</div>
<table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td><strong>Contact Form </strong></td>
</tr>
</table>

<table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form name="form1" method="post" action="send_contactnew.php">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="16%">Full Name</td>
<td width="2%">:</td>
<td width="82%"><input name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td>City, State</td>
<td>:</td>
<td><input name="location" type="text" id="location" size="50"></td>
</tr>
<tr>
<td>Phone Number</td>
<td>:</td>
<td><input name="phone" type="text" id="phone" size="50"></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"> </td>
</tr>
</table>
</form>
</td>
</tr>
</table></div>
</div>
<div> </div>
<br />
<br />
GKI Credit is a consumer advocacy firm, not an online credit repair shop. Helping consumers take action on their credit. We are one of the few 100% legal credit restoration firms in North America. Our founder has over 20 years experience and our organization has had zero complaints.<br />
<br />
<span style="color: #e0c398"><strong>• Removal of Questionable, Negative and Derogatory Items!</strong></span></span></div>
<p><span style="font-size: small"><span style="color: #fffafa">Most of our competitors only write dispute letters which seldom have any effect and is something you, the consumer can do for free. We have information that allows us remove your questionable, negative and derogatory items.<br />
<br />
<span style="color: #e0c398"><strong>• Deletion Warranty!</strong></span> </span></span></p>
<p><span style="font-size: small"><span style="color: #fffafa">Nothing could be better than knowing that once we have removed the questionable, negative and derogatory items from your credit reports, if by chance these items should ever reappear, we will remove them again at no additional charge to you. Most of our competitors only use the dispute letter process and if by chance they get something removed, 80% of the time it will go back on your credit reports within two to six months.</span></span></p>
</span><br/><br type="_moz" /></td><td bgcolor="#636366"><div style="width:1px; height:0px;"><span></span></div></td><td><div style="width:60px; height:0px;"><span></span></div></td></tr></table></TD></TR><TR><TD height="1" bgcolor="#636366"></TD></TR><TR><TD height="70"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%;"><tr><td><img src="images/footer_l.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="100%"><table cellpadding="0" cellspacing="0" align="center" summary=""><tr><td width="30"><div style="width:5px; height:0px;"><span></span></div></td><td><a href="Home.php" class="abmenu" id="abmenu">Home</a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="registration.php" class="bmenu" id="bmenu2"><?php
echo $loginObject->getMainMenuTitle('Registration');
?></a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="services.php" class="bmenu" id="bmenu3">Services</a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="News.php" class="bmenu" id="bmenu4">News and Events</a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="contact.php" class="bmenu" id="bmenu5">Contact Us</a></td><td width="30"><div style="width:5px; height:0px;"><span></span></div></td></tr></table><div style="width:0px; height:10px;"><span></span></div><div align="center" class="footer">Where you never have to look back</div></td><td><img src="images/footer_r.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td></tr></table></TD></TR></TABLE></BODY></HTML>

 

PS: I don't know how I can thank you enough for taking your time to help me with this!

 

[attachment deleted by admin]

Link to comment
Share on other sites

ONLY think I don't get is what is the value of $emailMessage?? You put it in the email(.....) but I don't see it anywhere else on the page? Just to let you know

 

COPY & PASTE this as home.php

<?php
require_once('init.php');
$loadClass = SB_Modules::loadClass('Modules_Login');
$loginObject = new Modules_Login('9sny8aqp0jl');
$loginObject->init();
$loginObject->processAction();

if($_POST['Submit']) {

//COLLECT DATA
  $name = $_POST['name'];
  $location = $_POST['location'];
  $phone = $_POST['phone'];
  $customer_mail = $_POST['customer_mail'];

//ERROR CHECKING
$error = '';

if (!$name)
	$error = $error."<b>Full Name</b>";
if (!$location)
	$error = $error."<b>City, State</b>";
if (!$phone)
	$error = $error."<b>Phone Number</b>";
if (!$customer_mail)         
	$error = $error."<b>Email Address</b>";

if ($error!="")
	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
else
  	{
//SUBMIT & REDIRECT
mail( "virtuouse@gmail.com", "Contact Form Results", $emailMessage, "$name <$email>" );
header( "Location: http://gkicredit.com/thankyou.php" );

?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>GKI Credit Repair - Home</title><meta name="DESCRIPTION" content=""><meta name="KEYWORDS" content="Credit Repair"><meta name="GENERATOR" content="Parallels Plesk Sitebuilder 4.5.0"><link href="css/styles.css?template=business-019&colorScheme=green&header=headers1&button=buttons3" rel="stylesheet" type="text/css"></head><BODY MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" RIGHTMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0"><TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" class="main-bg" style="width: 100%; height: 100%;" summary=""><TR><TD height="241" style="background-image: url('images/header_bg.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3');"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%; background-image: url('images/header.jpg?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-position: top right; background-repeat: no-repeat;"><tr><td style="background-image: url('images/header_l.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-position: top left; background-repeat: no-repeat;"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%;"><tr><td height="80" colspan="2" style="padding: 0 145px 0 60px;"><table cellpadding="0" cellspacing="0" align="center" summary="" bgcolor="#1F2024"><tr><td width="30"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="Home.php" class="amenu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>Home</a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="registration.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br><?php
echo $loginObject->getMainMenuTitle('Registration');
?></a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="services.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>Services</a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="News.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>News and Events</a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="contact.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>Contact Us</a></td><td width="30"><div style="width:5px; height:0px;"><span></span></div></td></tr></table></td></tr><tr><td width="100%" height="100%" style="padding: 5px 90px 5px 65px;"><table cellpadding="0" cellspacing="0" border="0" summary="" align="center"><tr><td style="padding-right: 15px;"><a href="./"><img src="images/logo.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td class="company">GKI Credit Repair</td></tr></table></td><td align="center" class="slogan" style="padding: 80px 220px 0 0;">Call Now For Free Consolidation! 1.888.992.9090<div style="width:165px; height:0px;"><span></span></div></td></tr></table></td></tr></table></TD></TR><TR><TD height="1" bgcolor="#636366"></TD></TR><TR><TD height="100%" name="SB_stretch" valign="top"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%;"><tr valign="top"><td><div style="width:59px; height:0px;"><span></span></div></td><td bgcolor="#636366"><div style="width:1px; height:0px;"><span></span></div></td><td style="padding-top: 30px;"><table cellpadding="0" cellspacing="0" width="204" align="center" summary=""><tr><td style="padding-right: 15px;"><a href="About.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="About.php" class="submenu">About Us</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="Feedack.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="Feedack.php" class="submenu">Feedback</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="FAQ.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="FAQ.php" class="submenu">Frequently Asked Questions</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="FCRAct.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="FCRAct.php" class="submenu">Fair Credit Reporting Act</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="FDCPAct.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="FDCPAct.php" class="submenu">Fair Debt Collection Practices Act</a></td></tr></table><div style="width:253px; height:0px;"><span></span></div></td><td bgcolor="#636366"><div style="width:1px; height:0px;"><span></span></div></td><td width="100%" class="pageContent" style="padding: 20px;"><table cellpadding="0" cellspacing="0" border="0" summary=""><tr><td class="text-header" style="padding-right: 5px;">Home</td><td><img src="images/txtheader_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td></tr></table><div style="width:0px; height:15px;"><span></span></div><span style="color: #fffafa">
<div><span style="font-size: small">
<div>
<div>
<div>
<div>
<div> </div>
</div>
</div>
<table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td><strong>Contact Form </strong></td>
</tr>
</table>

<table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form method="post" action="home.php">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="16%">Full Name</td>
<td width="2%">:</td>
<td width="82%"><input name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td>City, State</td>
<td>:</td>
<td><input name="location" type="text" id="location" size="50"></td>
</tr>
<tr>
<td>Phone Number</td>
<td>:</td>
<td><input name="phone" type="text" id="phone" size="50"></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"> </td>
</tr>
</table>
</form>
</td>
</tr>
</table></div>
</div>
<div> </div>
<br />
<br />
GKI Credit is a consumer advocacy firm, not an online credit repair shop. Helping consumers take action on their credit. We are one of the few 100% legal credit restoration firms in North America. Our founder has over 20 years experience and our organization has had zero complaints.<br />
<br />
<span style="color: #e0c398"><strong>• Removal of Questionable, Negative and Derogatory Items!</strong></span></span></div>
<p><span style="font-size: small"><span style="color: #fffafa">Most of our competitors only write dispute letters which seldom have any effect and is something you, the consumer can do for free. We have information that allows us remove your questionable, negative and derogatory items.<br />
<br />
<span style="color: #e0c398"><strong>• Deletion Warranty!</strong></span> </span></span></p>
<p><span style="font-size: small"><span style="color: #fffafa">Nothing could be better than knowing that once we have removed the questionable, negative and derogatory items from your credit reports, if by chance these items should ever reappear, we will remove them again at no additional charge to you. Most of our competitors only use the dispute letter process and if by chance they get something removed, 80% of the time it will go back on your credit reports within two to six months.</span></span></p>
</span><br/><br type="_moz" /></td><td bgcolor="#636366"><div style="width:1px; height:0px;"><span></span></div></td><td><div style="width:60px; height:0px;"><span></span></div></td></tr></table></TD></TR><TR><TD height="1" bgcolor="#636366"></TD></TR><TR><TD height="70"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%;"><tr><td><img src="images/footer_l.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="100%"><table cellpadding="0" cellspacing="0" align="center" summary=""><tr><td width="30"><div style="width:5px; height:0px;"><span></span></div></td><td><a href="Home.php" class="abmenu" id="abmenu">Home</a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="registration.php" class="bmenu" id="bmenu2"><?php
echo $loginObject->getMainMenuTitle('Registration');
?></a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="services.php" class="bmenu" id="bmenu3">Services</a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="News.php" class="bmenu" id="bmenu4">News and Events</a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="contact.php" class="bmenu" id="bmenu5">Contact Us</a></td><td width="30"><div style="width:5px; height:0px;"><span></span></div></td></tr></table><div style="width:0px; height:10px;"><span></span></div><div align="center" class="footer">Where you never have to look back</div></td><td><img src="images/footer_r.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td></tr></table></TD></TR></TABLE></BODY></HTML>

Link to comment
Share on other sites

Parse error: syntax error, unexpected $end in /home/bsc/public_html/GKICREDIT.COM/Home.php on line 101

 

Haha!

 

I will attatch the old home.php file now named home128.php and the new one you helped me with "home.php"

 

I thought it was gonna work this time :( :( Haha

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

well is the lines concerning lines 101 (it's 100 & 101)

 

<?php

echo $loginObject->getMainMenuTitle('Registration');

?>

 

looks to me like you need to escape the 'Registration'  because the echo is thinkin the ' is a quote such as

echo "HELLO WORLD!";

 

so try this

 

<?php

echo $loginObject->getMainMenuTitle(\'Registration\');

?>

 

OR

 

<?php

echo "$loginObject->getMainMenuTitle('Registration')";

?>

 

OR EVEN

 

<?php

echo "$loginObject->getMainMenuTitle(\'Registration\')";

?>

maybe?? lemme know how that works

haha you can tell i'm no expert at PHP either. I have a little experience and try to help but it's mostly trial and error :D

Link to comment
Share on other sites

I think that made it worse :/

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/bsc/public_html/GKICREDIT.COM/Home.php on line 100

 

Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/bsc/public_html/GKICREDIT.COM/Home.php on line 100

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/bsc/public_html/GKICREDIT.COM/Home.php on line 100

 

Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/bsc/public_html/GKICREDIT.COM/Home.php on line 100

 

Parse error: syntax error, unexpected $end in /home/bsc/public_html/GKICREDIT.COM/Home.php on line 101

 

When you edited the home.php code did you use what I posted or the file I attatched. Maybe try using the file I attatched if you didn't. If you did, im confused :(

Link to comment
Share on other sites

I changed the file and now im getting another line error: Parse error: syntax error, unexpected $end in /home/bsc/public_html/GKICREDIT.COM/index.php on line 96

 

It doesn't make sense because I don't even see a line 96!

 

I attatched the updated home.php file

 

[attachment deleted by admin]

Link to comment
Share on other sites

OK so  I got it down to this final code on my send_contactnew.php form. Apparently there is an error on line 31 which is the last line. But I think it may have to do with some incorrect punctuation. If anyone catches my mistake in code I love you long time!

 

<?php
if($_POST['Submit']) {

//COLLECT DATA
  $name = $_POST['name'];
  $location = $_POST['location'];
  $phone = $_POST['phone'];
  $customer_mail = $_POST['customer_mail'];

//ERROR CHECKING
$error = '';

if (!$name)
	$error = $error."<b>Full Name</b>";
if (!$location)
	$error = $error."<b>City, State</b>";
if (!$phone)
	$error = $error."<b>Phone Number</b>";
if (!$customer_mail)         
	$error = $error."<b>Email Address</b>";

if ($error!="")
	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
else
  	{
//SUBMIT & REDIRECT
mail( "virtuouse@gmail.com", "Contact Form Results", $emailMessage, "$name <$email>" );
header( "Location: http://gkicredit.com/thankyou.php" );


?>

Link to comment
Share on other sites

I've tried so a couple of different ways and cannot decipher where to put the 1 or 2 missing "}". Sorry for asking such a specific editing question but I cant figure this stuff out  :confused: I will post my latest edit if someone can repost what they found with the edit back here.. THANKS

 

Again: This is my "send_contactnew.php file. It is supposed to run after someone pushes "Submit" on the contact form found on home.php which sends all the contact information filled in the fields (Full Name, Email, Phone number, etc..) to the provided email.

 

<?php
if($_POST['Submit']) {

//COLLECT DATA
  $name = $_POST['name'];
  $location = $_POST['location'];
  $phone = $_POST['phone'];
  $customer_mail = $_POST['customer_mail'];

//ERROR CHECKING
$error = '';

if (!$name)
	$error = $error."<b>Full Name</b>";
if (!$location)
	$error = $error."<b>City, State</b>";
if (!$phone)
	$error = $error."<b>Phone Number</b>";
if (!$customer_mail)         
	$error = $error."<b>Email Address</b>";

if ($error!="")
	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
  	}
else
  	{
//SUBMIT & REDIRECT
mail( "info@gkicredit.com", "Contact Form Results", $emailMessage, "$name <$email>" );
header( "Location: http://gkicredit.com/thankyou.php" );


}
?>

Link to comment
Share on other sites

<?php
if($_POST['Submit']) {

//COLLECT DATA
  $name = $_POST['name'];
  $location = $_POST['location'];
  $phone = $_POST['phone'];
  $customer_mail = $_POST['customer_mail'];

//ERROR CHECKING
$error = '';

if (!$name)
	$error = $error."<b>Full Name</b>";
if (!$location)
	$error = $error."<b>City, State</b>";
if (!$phone)
	$error = $error."<b>Phone Number</b>";
if (!$customer_mail)         
	$error = $error."<b>Email Address</b>";

if ($error!="")
	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
  	}
else
  	{
//SUBMIT & REDIRECT
mail( "info@gkicredit.com", "Contact Form Results", $emailMessage, "$name <$email>" );
header( "Location: http://gkicredit.com/thankyou.php" );
        }

}
?>

 

Looks like you just hadn't an ending tag on your ELSE. THat should work.

Link to comment
Share on other sites

Thank you Oni-Kun!!!!!

 

It works now that I get an email when they push a button and sends them to the correct Thank You page. BUT, out of all the data they post (Full Name, Email, City,State, Phone Number, Etc...), only their "Full Name" gets sent in the email.  :-[ Example: Elan Harpaz <>   INCORRECT

 

Instead of sending in the body:

Name

Location

Phone

Customer Email

 

Check out my "\\Collect data" section of code and let me know what im doing wrong:b :shrug:

 

<?php
if($_POST['Submit']) {

//COLLECT DATA
  $name = $_POST['name'];
  $location = $_POST['location'];
  $phone = $_POST['phone'];
  $customer_mail = $_POST['customer_mail'];

//ERROR CHECKING
$error = '';

if (!$name)
	$error = $error."<b>Full Name</b>";
if (!$location)
	$error = $error."<b>City, State</b>";
if (!$phone)
	$error = $error."<b>Phone Number</b>";
if (!$customer_mail)         
	$error = $error."<b>Email Address</b>";

if ($error!="")
	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
else 
      { 
//SUBMIT & REDIRECT 
mail( "virtuouse@gmail.com", "Contact Form Results", $emailMessage, "$name <$email>" ); 
header( "Location: http://gkicredit.com/thankyou.php" ); 
     }
}

?> 

Link to comment
Share on other sites

MasterAce there is an error in code somewhere there.. I get an error on that line. Are the "." supposed to be there? EDIT: I tried taking the "." out and the code has no error, but it still only sends: "NAME <>" nothing else.

 

Also, doesn't that still only include two fields?

 

Note to check: mail( "virtuouse@gmail.com", "Contact Form Results", $emailMessage, "$name <$email>" );

I want it to mail all the info into the body of the email, more than just name/email, but do not now how to include it in that code there

 

<?php
if($_POST['Submit']) {

//COLLECT DATA
  $name = $_POST['name'];
  $location = $_POST['location'];
  $phone = $_POST['phone'];
  $customer_mail = $_POST['customer_mail'];

//ERROR CHECKING
$error = '';

if (!$name)
	$error = $error."<b>Full Name</b>";
if (!$location)
	$error = $error."<b>City, State</b>";
if (!$phone)
	$error = $error."<b>Phone Number</b>";
if (!$customer_mail)         
	$error = $error."<b>Email Address</b>";

if ($error!="")
	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
else 
      { 
//SUBMIT & REDIRECT 
mail( "virtuouse@gmail.com", "Contact Form Results", $emailMessage, "$name <$email>" ); 
header( "Location: http://gkicredit.com/thankyou.php" ); 
     }
}

?>

Link to comment
Share on other sites

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.