contact-form

Fertiggestellt Veröffentlicht Jan 22, 2014 Bezahlt bei Lieferung
Fertiggestellt Bezahlt bei Lieferung

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

Projekt-ID: #5348014

Über das Projekt

29 Vorschläge Remote Projekt Aktiv Jan 22, 2014

Vergeben an:

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 Tagen
(286 Bewertungen)
6.8

29 Freelancer bieten im Durchschnitt $20 für diesen 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 Mehr

$18 USD in 0 Tagen
(951 Bewertungen)
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 Tagen
(367 Bewertungen)
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 Mehr

$25 USD in 0 Tagen
(135 Bewertungen)
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 Tag
(433 Bewertungen)
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 Tagen
(11 Bewertungen)
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 Tag
(186 Bewertungen)
6.6
dustafo

I can get this done for you right away.

$30 USD in 1 Tag
(152 Bewertungen)
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 Tagen
(51 Bewertungen)
6.0
aneeshtclt

A proposal has not yet been provided

$10 USD in 1 Tag
(53 Bewertungen)
5.8
divdesign

A proposal has not yet been provided

$25 USD in 1 Tag
(52 Bewertungen)
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 Tag
(45 Bewertungen)
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 Tag
(29 Bewertungen)
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 Mehr

$15 USD in 0 Tagen
(27 Bewertungen)
4.8
gerulis

A proposal has not yet been provided

$15 USD in 1 Tag
(32 Bewertungen)
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 Tag
(14 Bewertungen)
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 Mehr

$30 USD in 1 Tag
(20 Bewertungen)
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 Mehr

$12 USD in 1 Tag
(9 Bewertungen)
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 Tag
(1 Bewertung)
3.2
rafaelnadal

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

$30 USD in 2 Tagen
(8 Bewertungen)
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 Tagen
(1 Bewertung)
0.0