Jump to content

energysuperstore09

Members
  • Posts

    88
  • Joined

  • Last visited

    Never

About energysuperstore09

  • Birthday 05/08/1982

Contact Methods

  • Website URL
    http://www.wired2design.com

Profile Information

  • Gender
    Male
  • Location
    Dallas, TX

energysuperstore09's Achievements

Member

Member (2/5)

0

Reputation

  1. I was wanting to know how it wuld look in the submit.php file that I posted. And how would send the results in the email that is also in the submit.php file.
  2. I have a mini form on my page and would like to submit the info for the drop down into the database along with an email sent to me as well. here is what the form looks like: <form method="post" name="form_help" id="form_help" action="submit.php"> <div id="form_wrapper"> <h1>Schedule a complimentary consultation with one of our experts regarding payment processing systems for government agencies.</h1> <input type="hidden" name="page" value="cc_services" /> <input type="text" name="fname" id="fname" value="First Name" class="required" /> <input type="text" name="lname" id="lname" value="Last Name" class="required" /> <input type="text" name="phone" id="phone" value="Phone" class="required phoneUS" /> <input type="text" name="email" id="email" value="e-Mail" class="required email" /> <input type="text" name="agency" id="agency" value="Agency" class="required" /> <input type="text" name="county" id="county" value="County" class="required" /> <input type="text" name="state" id="state" value="State" class="required" /> <select name="mydropdown"> <option value="How">How did you hear about us?</option> <option value="Internet">Internet Search</option> <option value="Colleague">Colleague</option> <option value="Advertisement">Advertisement</option> <option value="Other">Other</option> </select> <textarea name="more" id="more">Tell us more:</textarea> <input type="submit" value="" id="submit" /> <div id="thecaptcha" style="clear:both;"> <input type="hidden" value="" name="js" id="js" /> </div> </div> </form> and here is what my submit page looks like: <?php if(array_key_exists('fname', $_POST) && array_key_exists('lname', $_POST) && array_key_exists('email', $_POST) && array_key_exists('phone', $_POST) && array_key_exists('more', $_POST) && array_key_exists('js', $_POST) ){ if($_POST['js'] != "yes"){ die("Sorry, you must have javascript enabled to use this form. Please use the <a href='http://govpayexp.com/govpay-contact.php'>Contact Us form</a> if you are not able to enable javascript."); } include "classes/cs.validation.class.php"; $validator = new csFormValidation; $form_fields = cleanParams($_POST); $validator->checkEmailFormat($form_fields['email'],'Email Address'); $validator->isValidEmailComment($form_fields['more']); if (count($validator->errorMessages)>0) { echo "There was a problem with the information you entered. Please review and try again."; } else { //$to = 'margaret@synergy-mg.com,susan@synergy-mg.com,pondertheweb@gmail.com'; $to = 'sales@govpayexp.com'; $subject = "Contact form from GovPayEXP.com ( " . $form_fields['page'] . " )"; $email = $form_fields['email']; $message = "<html> <head> <title>GovPayEXP</title> </head> <body style='font-size:16px;'>"; $name = $form_fields['fname'] . " " . $form_fields['lname']; $message .= "Name: " . $name . "<br />"; $message .= "Phone: " . $form_fields['phone'] . "<br />"; $message .= "Email: " . $form_fields['email'] . "<br />"; $message .= "Agency: " . $form_fields['agency'] . "<br />"; $message .= "County: " . $form_fields['county'] . "<br />"; $message .= "State: " . $form_fields['state'] . "<br />"; $message .= "Tell us more: " . $form_fields['more'] . "<br />"; $message .= "</body></html>"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: ' . $name . '<' . $email . '>' . "\r\n"; $headers .= 'Reply-To: ' . $name . '<'. $email . '>' . "\r\n"; $headers .= 'Bcc: Margaret@synergy-mg.com,susan@synergy-mg.com' . "\r\n"; $message = nl2br($message); mail($to, $subject, $message, $headers); include "../admin/db.php"; $date = date("Y/m/d H:i:s"); $users = mysql_query("INSERT into mini_contact set name = '" . mysql_real_escape_string($form_fields['fname'] . " " . $form_fields['lname']) . "', phone = '" . mysql_real_escape_string($form_fields['phone']) . "', email = '" . mysql_real_escape_string($form_fields['email']) . "', question = '" . mysql_real_escape_string($form_fields['more']) . "' , agency = '" . mysql_real_escape_string($form_fields['agency']) . "' , county = '" . mysql_real_escape_string($form_fields['county']) . "' , state = '" . mysql_real_escape_string($form_fields['state']) . "', page = '" . $form_fields['page'] . "', date = '" . $date . "'"); header('Location: ../thanks.php'); } } else { echo "There was a problem with the information you entered. Please review and try again."; } function cleanParams($key_value_pair_array) { $newLines = array("\n", "\r", "\r\n", "\n\r"); foreach ($key_value_pair_array as $pk => $pv) { $key_value_pair_array[$pk] = str_replace($newLines, " ", $pv); $values[$i] = str_replace($newLines, " ", $values[$i]); } return $key_value_pair_array; } ?> Any help would be appreciated.
  3. So if I copy the script to my confirm.php page then i should be able to get the data
  4. When someone registers it takes them to a page where i tell them that there account is pending until approved. I use a page called confirm.php to process the form Confirm.php <?php $email = $_POST['email']; $password = $_POST['pass']; $password2 = $_POST['pass2']; @mysql_connect("205.178.146.75","fleco2008","xxxxxx") or die("Error: unable to connect to database"); @mysql_select_db("test09"); $result = mysql_query("SELECT * FROM `loginreg` WHERE `email`='$email'"); if (mysql_num_rows($result) != 0) { die("Another account is already using that email"); } if ($password != $password2) { die("The two passwords did not match"); } $password = md5($password); mysql_query("INSERT INTO `loginreg` (`email`, `password`, `fname`, `lname`, `repnumber`, `cname`, `phone`) VALUES ('$email', '$password', '$fname', '$lname', '$repnumber', '$cname', '$phone')") or die(mysql_error()); header("Location: /account-pending.php"); ?> This is my register page: <!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>Registeration for Distributor Area - Go Where the Business Is!</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta NAME="description" CONTENT="Texas Fluroescents' is a manufacturer of energy efficient linear pendant fluorescent lighting fixtures specifically T5 Industrial Fluorescent Lighting Fixtures, T8 Industrial Fluorescent Lighting Fixtures and T5HO Industrial Fluorescent Lighting Fixtures for industrial lighting, production floor lighting, warehouse lighting."> <meta NAME="keywords" CONTENT="fluorescent lighting fixtures, T5 Industrial Fluorescent lighting fixtures, T5HO industrial fluorescent lighting fixtures, T8 industrial fluorescent lighting fixtures, T5 warehouse lighting fixtures, T5 warehouse fluorescent lighting fixtures"> <meta NAME="robots" CONTENT="index,follow"> <?php function send_email($from, $to, $subject, $message){ $headers = "From: ".$from."\r\n"; $headers .= "Reply-To: ".$from."\r\n"; $headers .= "Return-Path: ".$from."\r\n"; $headers .= "Content-type: text/html\r\n"; if (mail($to,$subject,$message,$headers) ) { } else { } } $messageee = ""; $subject = "Someone has Registered for Distributor Login"; $messageee .= "<html><body>"; $messageee .= "<b>Please inform Daniel.<br></b>"; $messageee .= "<br>"; $messageee .= "<br>Daniel will send an email to user once account is activated.<br>"; $messageee .= "<br>If you need assistance with your login information please contact Daniel Garvin at danielg@fleco.com"; $messageee .= "<br><br>"; $messageee .= "<br>Regards, <br>Texas Fluorescents<br />"; $messageee .= "form data: <br />email:".$_POST['email']." etc."; $messageee .= "</body></html>"; send_email("no-reply@texasfluorescents.com", "danielg@fleco.com", $subject , $messageee); ?> <script type="text/javascript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } 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];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> </head> <div id="container"> <div id="header"> <div id="logo"><a href="index.html"><img src="images/TxFluorescentslogo.jpg" border="0" /></a></div><h1>Texas Fluorescents - Fluorescent Lighting</h1><ul><li><a href="contact_us.html">Contact</a></li><li><a href="comingsoon.html">FAQ | </a></li><li><a href="comingsoon.html">Sitemap | </a></li><li><a href="comingsoon.html">Support | </a></li></ul></div><div id="subhead">your source for quality lighting</div><div id="phone">800-232-7407</div> <div id="contain"> <div id="nav"> <ul> <li><a href="index.html">HOME |</a></li> <li><a href="companyprofile.html">COMPANY |</a></li> <li><a href="products.html">PRODUCTS |</a></li> <li><a href="distributorlogin.html">DISTRIBUTOR |</a></li> <li><a href="internet_promotions.html">PROMOTIONS |</a></li> <li><a href="sales_representatives.html">FIND SALES REP |</a></li> <li><a href="contact_us.html">CONTACT US</a></li> </ul> </div> <div id="main"></div> <div class="beneath"> <div class="specification"><a href="downloadcenter.html"><img src="images/specification-download-center.jpg" border="0" /></a></div> <div class="retrofitnew"><a href="retrofit.html"><img src="images/retrofit-center.jpg" border="0" /></a></div> <div class="signup"><a href="internet_promotions.html"><img src="images/signup-now.jpg" border="0" /></a></div> <div class="quote"><a href="request-quote.html"><img src="images/request-quote.jpg" border="0" /></a></div> </div> </div> <div class="left_pan"> <ul> <span class="style66"> PRODUCTS</span> <li><a href="hibay-fluorescents.html">HiBay Fluorescents</a></li> <li><a href="linear-pendant-fluorescents.html">Linear Pendant Fluorescents</a></li> <li><a href="recessed-fluorescents.html">Recessed Fluorescents</a></li> <li><a href="retrofit_refit_kits.html">Retrofit Kits</a></li> <li><a href="surfacemounts.html">Surface Fluorescents</a></li> <li><a href="wraparounds.html">Wraparounds</a></li> <li><a href="fluorescentstrips.html">Fluorescent Strips</a></li> <li><a href="closetoceilingCFL.html">Close-to-Ceiling - CFL</a></li> <li><a href="wallfixtures.html">Wall Fluorescents</a></li> <li><a href="wallpacks.html">HID Wall Packs</a></li> <li><a href="floodlights.html">HID Flood Lights</a></li> <li><a href="HighBays.html">HID High Bays</a></li> <li><a href="comingsoon.html">HID Vandaliers</a></li> <li><a href="Essentials.html">Essentials</a></li> <li><a href="RecessedDownlights.html">Recessed Downlights</a></li> <li><a href="exit_emergency.html">Exit & Emergency Lighting</a></li> <li><a href="Ballast_Transformers.html">Ballast & Transformers</a></li> <li><a href="NeptunDimmableCFLs.html">Fluorescent Lamps</a></li> <li><a href="comingsoon.html">LED Lighting</a></li> </ul><ul><span class="style66"> SUPPORT</span> <li><a href="feedback.html">Feedback Form</a></li> <li><a href="comingsoon.html">Instruction Sheets</a></li> <li><a href="customerservice.html">Customer Service</a></li> <li><a href="salesdepartment.html">Sales Department</a></li> <li><a href="technicalsupport.html">Technical Support</a></li> <li><a href="productinquiry.html">Product Inquiry</a></li> <li><a href="comingsoon.html">Returns</a><br /> </li> </ul> </div> <div class="content"> <h2>Register for Distributor Area</h2> <p>Please fill out the following form to get your login information to access our distributor area. If you do not know your rep number please contact us at 214-884-1162.</p> <div class="catagory"> <div class="green25"><form action="confirm.php" method="post" name="form1" class="dress"><br /><br /><br /><br /> <label for="repnumber"><span class="algin"><span class="login">Rep Number</span></span></label> <input name="repnumber" type="text" class="rep" size="5" /> <br /> <label for="fname"><span class="algin"><span class="login">First Name</span></span></label> <input name="fname" type="text" class="field" /> <br> <label for="lname" class="li1"><span class="algin"><span class="login">Last Name</span></span></label> <input name="lname" type="text" class="field" /> <br> <label for="cname"><span class="algin"><span class="login">Company Name</span></span></label> <input name="cname" type="text" class="field" /> <br> <label for="phone"><span class="algin"><span class="login">Phone Number</span></span></label> <input name="phone" type="text" class="field" /> <br> <label for="email"><span class="algin"><span class="login">Email Address</span></span></label> <input name="email" type="text" class="field" /> <br> <span class="formtext">You will use your email address as your username </span> <br><br><label for="password"><span class="algin"><span class="login">Password</span></span></label> <input name="pass" type="password" class="field" /> <br> <label for="password" class="login"><span class="algin">Verify Password</span></label> <input name="pass2" type="password" class="field" /><br><br /> <input type="image" src="images/register-button.jpg" class="login-submit" value="Regsiter"/> <br> <br> <br /> <br /> <br /> <br /> <br /> <br /> </form> </div> <div class="green30"> </div> <div id="green30"> </div> </div> </div> </div> <div class="footer"><img src="images/TX-Fluorescent-Footer-Image.gif" /> <p align="center">© Copyright 2009 Texas Fluorescents All Rights Reserved. Developed by <a href="http://www.wired2design.com" target="_blank">WIRED2DESIGN</a> Studios</p></div> </body> </html> Any Ideas?
  5. This is the page that the form submits to <?php $email = $_POST['email']; $password = $_POST['pass']; $password2 = $_POST['pass2']; @mysql_connect("205.178.146.75","fleco2008","xxxxxxx") or die("Error: unable to connect to database"); @mysql_select_db("test09"); $result = mysql_query("SELECT * FROM `loginreg` WHERE `email`='$email'"); if (mysql_num_rows($result) != 0) { die("Another account is already using that email"); } if ($password != $password2) { die("The two passwords did not match"); } $password = md5($password); mysql_query("INSERT INTO `loginreg` (`email`, `password`, `fname`, `lname`, `repnumber`, `cname`, `phone`) VALUES ('$email', '$password', '$fname', '$lname', '$repnumber', '$cname', '$phone')") or die(mysql_error()); header("Location: /account-pending.php"); ?>
  6. LOL I would but I am relying ono some info that someone has gave me advice on. To be really honest with you I am even more confused. Do you know how i would have the form data emailed to me the code I am using right now is <?php function send_email($from, $to, $subject, $message){ $headers = "From: ".$from."\r\n"; $headers .= "Reply-To: ".$from."\r\n"; $headers .= "Return-Path: ".$from."\r\n"; $headers .= "Content-type: text/html\r\n"; if (mail($to,$subject,$message,$headers) ) { } else { } } $messageee = ""; $subject = "Someone has Registered for Distributor Login"; $messageee .= "<html><body>"; $messageee .= "<b>Please inform Daniel.<br></b>"; $messageee .= "<br>"; $messageee .= "<br>Daniel will send an email to user once account is activated.<br>"; $messageee .= "<br>If you need assistance with your login information please contact Daniel Garvin at danielg@fleco.com"; $messageee .= "<br><br>"; $messageee .= "<br>Regards, <br>Texas Fluorescents"; $messageee .= "</body></html>"; send_email("no-reply@texasfluorescents.com", "danielg@fleco.com", $subject , $messageee); ?>
  7. Can anybody help me with this? Thanks. I just need the data from the form to be emailed to me. See above
  8. Fatal error: Only variables can be passed by reference Please see above my code and error messege
  9. Right now I receive an email letting me know that someone has registered, but I do not see exactly who such as name, email, etc. When they register I want the info from the form emailed to me as well. I need help breaking this down and what the script would look like
  10. I am getting an error on line 30 $messageee .= "\r\n\r\n$dashedline\r\nForm Information:\r\n\r\n" . implode("\r\n", array_walk('fmessage', array_keys($_POST), array_values($_POST))); Here is the full code <?php function send_email($from, $to, $subject, $message){ $headers = "From: ".$from."\r\n"; $headers .= "Reply-To: ".$from."\r\n"; $headers .= "Return-Path: ".$from."\r\n"; $headers .= "Content-type: text/html\r\n"; if (mail($to,$subject,$message,$headers) ) { } else { } } function fmessage($key, $value) { return "$key: $value"; } $messageee = ""; $subject = "Someone has Registered for Distributor Login"; $messageee .= "<html><body>"; $messageee .= "<b>Please inform Daniel.<br></b>"; $messageee .= "<br>"; $messageee .= "<br>Daniel will send an email to user once account is activated.<br>"; $messageee .= "<br>If you need assistance with your login information please contact Daniel Garvin at danielg@fleco.com"; $messageee .= "<br><br>"; $messageee .= "<br>Regards, <br>Texas Fluorescents"; $messageee .= "</body></html>"; $dashedline = str_repeat('-', 70); $messageee .= "\r\n\r\n$dashedline\r\nForm Information:\r\n\r\n" . implode("\r\n", array_walk('fmessage', array_keys($_POST), array_values($_POST))); send_email('no-reply@texasfluorescents.com, danielg@fleco.com', $subject, $messageee); ?> Any help would be appreciated. This is the error code that I am getting Fatal error: Only variables can be passed by reference
  11. I am getting an error on line 30 $messageee .= "\r\n\r\n$dashedline\r\nForm Information:\r\n\r\n" . implode("\r\n", array_walk('fmessage', array_keys($_POST), array_values($_POST))); Here is the full code <?php function send_email($from, $to, $subject, $message){ $headers = "From: ".$from."\r\n"; $headers .= "Reply-To: ".$from."\r\n"; $headers .= "Return-Path: ".$from."\r\n"; $headers .= "Content-type: text/html\r\n"; if (mail($to,$subject,$message,$headers) ) { } else { } } function fmessage($key, $value) { return "$key: $value"; } $messageee = ""; $subject = "Someone has Registered for Distributor Login"; $messageee .= "<html><body>"; $messageee .= "<b>Please inform Daniel.<br></b>"; $messageee .= "<br>"; $messageee .= "<br>Daniel will send an email to user once account is activated.<br>"; $messageee .= "<br>If you need assistance with your login information please contact Daniel Garvin at danielg@fleco.com"; $messageee .= "<br><br>"; $messageee .= "<br>Regards, <br>Texas Fluorescents"; $messageee .= "</body></html>"; $dashedline = str_repeat('-', 70); $messageee .= "\r\n\r\n$dashedline\r\nForm Information:\r\n\r\n" . implode("\r\n", array_walk('fmessage', array_keys($_POST), array_values($_POST))); send_email('no-reply@texasfluorescents.com, danielg@fleco.com', $subject, $messageee); ?>
  12. so how would this look again as far as script? Thank you for your help as well. I appreciate it.
  13. I get an error when I am use this script "Only variables can be passed by reference" on line 211 which is the following $messageee .= "\r\n\r\n$dashedline\r\nForm Information:\r\n\r\n" . implode("\r\n", array_walk('fmessage', array_keys($_POST), array_values($_POST)));
×
×
  • 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.