contact-form

Completed Posted Jan 22, 2014 Paid on delivery
Completed Paid on delivery

Very simple fix for someone. We have a contest form and need to add a couple of fields to it. It works fine but the additional fields are not being send to my email address. The form is [login to view URL] and it calls contact.php.

-----------------------------------script----------------------------------------

<?php

if(!$_POST) exit;

$email = $_POST['email'];

//$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'INVALID EMAIL ADDRESS';

if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){

$error.="Invalid email address entered";

$errors=1;

}

if($errors==1) echo $error;

else{

$values = array ('name','email','vip', 'rep', 'phone', 'company');

$required = array('name','email');

$your_email = "";

$email_subject = "New Message: ".$_POST['subject'];

$email_content = "new message:\n";

foreach($values as $key => $value){

if(in_array($value,$required)){

if ($key != 'subject' && $key != 'company') {

if( empty($_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; }

}

$email_content .= $value.': '.$_POST[$value]."\n";

}

}

if(@mail($your_email,$email_subject,$email_content,$email_vip )) {

echo 'Message sent!';

} else {

echo 'ERROR!';

}

}

?>

---------------------------------------------contest form----------------------------

<form action="[login to view URL]" method="post" id="contactform">

<ol>

<li>

<label for="name"> Name: <span class="red">*</span></label>

<input id="name" name="name" class="text" />

</li>

<li>

<label for="email">Your email: <span class="red">*</span></label>

<input id="email" name="email" class="text" />

</li>

<li>

<label for="company">Company:</label>

<input id="company" name="company" class="text" />

</li>

<li>

<label for="subject">Subject:</label>

<input name="subject" class="text" id="subject" value="Contest Entry" />

</li>

<li>

<label for="rep">Sales Rep:</label>

<input id="rep" name="rep" class="text" />

</li>

<li>

<label for="phone">Phone:</label>

<input id="phone" name="phone" class="text" />

</li>

<li>

<label for="vip">VIP Client Number:</label>

<input id="vip" name="vip" class="text" />

</li>

<li class="buttons">

<input type="image" name="imageField" id="imageField" src="images/[login to view URL]" class="send" />

<div class="clr"></div>

</li>

</ol>

</form>

PHP

Project ID: #5348014

About the project

29 proposals Remote project Active Jan 22, 2014

Awarded to:

webxtor

Hello. The PHP code looks correct, there is a part which is responsible for all the fields to be sent. Which exactly fields are missing? Could you post the problematic message you received? Thanks, Eugene

$15 USD in 0 days
(286 Reviews)
6.8

29 freelancers are bidding on average $20 for this job

rajeshsonisl

Hello, With 99% completion rate, 650+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 average rating, can be verified on my profile page !!)... you can never go wro More

$18 USD in 0 days
(951 Reviews)
8.7
VikashThecoder

Dear Sir Its a very easy fix for me , i can do this right now Thanks and let me know i can start right now

$10 USD in 0 days
(367 Reviews)
7.6
umar119

Hi, Sir I'm an experienced web developer. And I can easily create a form for you. And never take more than 1 hour. I'll also apply form validation on it. So user can only submit valid information. If user enter invalid More

$25 USD in 0 days
(135 Reviews)
7.4
tlchung

let fix it now. let fix it now. let fix it now. let fix it now. let fix it now. let fix it now. let fix it now. let fix it now. let fix it now.

$14 USD in 1 day
(433 Reviews)
7.3
smrutiran

Hey, i have read your job posting. I can solve it within 1 hour. i can start work immediately once you have hired me. please let me know if you are interested further. Thanks Mishra

$10 USD in 0 days
(11 Reviews)
6.8
pivn

let expert do this https://www.freelancer.com/u/pivn.html https://www.freelancer.com/u/pivn.html https://www.freelancer.com/u/pivn.html

$33 USD in 1 day
(186 Reviews)
6.6
dustafo

I can get this done for you right away.

$30 USD in 1 day
(152 Reviews)
6.5
AndonData

Hi, I am expert in php technology I will do this job within 1 or 2 hrs. Waiting your response. Thanks

$11 USD in 0 days
(51 Reviews)
6.0
aneeshtclt

A proposal has not yet been provided

$10 USD in 1 day
(53 Reviews)
5.8
divdesign

A proposal has not yet been provided

$25 USD in 1 day
(52 Reviews)
5.7
renandocarmo

Hello, I can add these couple of fields to the form and to the message sent to your email address, please send me the files, thanks

$15 USD in 1 day
(45 Reviews)
5.3
GoWaNna

Hi, I can help you with your project... less than 1 hour need to fix it... Looking forward to hear from you, Regards

$25 USD in 1 day
(29 Reviews)
4.6
prajapat

Hello , I have 5+ year experience in web development. Give me only one opportunity to do this surely you will get a very good result. I am ready to do it now :) Looking forward to hear you soon and getting More

$15 USD in 0 days
(27 Reviews)
4.8
gerulis

A proposal has not yet been provided

$15 USD in 1 day
(32 Reviews)
4.7
withjos

Hello there!, I'm able to do this job. I can give you more flexible script by which you can do it yourself for further amendments. Let me know if you want me to work with you. Thanks

$30 USD in 1 day
(14 Reviews)
4.3
nguyenhuulocla

Hi , - I am Loc, I am in Vietnam, I read your requirement and I see that I can do it with the best quality - I have 5 years experience on website in WordPress, Drupal, Oscommerce, CI, Zend, Opencart, Prestashop, Mag More

$30 USD in 1 day
(20 Reviews)
4.7
simrasgroup

Hello We are professional developer more than 8 year experience in web development .our team developed various applications for different type of business We work as professional with best quality so please give More

$12 USD in 1 day
(9 Reviews)
2.7
mradi180

It is not more than one hour work, i easily do this, give me a chance and i can easily do this......

$25 USD in 1 day
(1 Review)
3.2
rafaelnadal

i am software and web developer . i can solve your problem.....................................................................

$30 USD in 2 days
(8 Reviews)
3.8
pravinsonawane71

if you only want that details in email its quite easy task for me i can do it within a hour. if you like to work with me, you can contact with me. Thank you.

$15 USD in 0 days
(1 Review)
0.0