contact-form

Dokončeno Zveřejněno Jan 22, 2014 K zaplacení v momentě doručení
Dokončeno K zaplacení v momentě doručení

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

Identifikační číslo projektu: #5348014

O projektu

29 nabídek Projekt na dálku Aktivní Jan 22, 2014

Uděleno uživateli:

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 za 0 dní
(286 recenzí)
6.8

29 Freelnceři na tento projekt zveřejňují nabídky v průměru $20

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 Další

$18 USD za 0 dní
(951 Recenzí)
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 za 0 dní
(367 Recenzí)
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 Další

$25 USD za 0 dní
(135 Recenzí)
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 za 1 den
(433 Recenzí)
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 za 0 dní
(11 Recenzí)
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 za 1 den
(186 Recenzí)
6.6
dustafo

I can get this done for you right away.

$30 USD za 1 den
(152 Recenzí)
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 za 0 dní
(51 Recenzí)
6.0
aneeshtclt

A proposal has not yet been provided

$10 USD za 1 den
(53 Recenzí)
5.8
divdesign

A proposal has not yet been provided

$25 USD za 1 den
(52 Recenzí)
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 za 1 den
(45 Recenzí)
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 za 1 den
(29 Recenzí)
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 Další

$15 USD za 0 dní
(27 Recenzí)
4.8
gerulis

A proposal has not yet been provided

$15 USD za 1 den
(32 Recenzí)
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 za 1 den
(14 Recenzí)
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 Další

$30 USD za 1 den
(20 Recenzí)
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 Další

$12 USD za 1 den
(9 Recenzí)
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 za 1 den
(1 recenze)
3.2
rafaelnadal

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

$30 USD za 2 dní
(8 Recenzí)
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 za 0 dní
(1 recenze)
0.0