The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > Web Programming > PHP


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Reply
 
LinkBack Thread Tools    Display Modes   
  #1 (permalink)  
Old 08-04-2008, 08:03 PM
disbrowpr disbrowpr is offline
Novice
Join Date: Aug 2008
Location: Rolla, Mo
Posts: 14
iTrader: (0)
disbrowpr is on a distinguished road
Icon11 PHP Form to E-mail

Hello All,

First post here! =D Was wondering about a few things. Hopefully you guys can help me! Having an issue.

So I have an online application for people to fill out, and when they click submit its suppose to send the application to our e-mails. There is the issue. I get the e-mails but I dont get the application.

Here is a link to the application on our site,

DPR Application

Here is the PHP im using...

PHP Code:
<?php
//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.
$subject 'Submitted Applicant';

// Your email address. This is where the form information will be sent.
$emailadd '**edited-out email addresses**';

// Where to redirect after form is processed.
$url 'http://www.disbrowpr.org/thankyou.htm';

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req '0';

// --------------------------Do not edit below this line--------------------------
$text "Results from form:";
$space ' ';
$line '
'
;
foreach (
$_POST as $key => $value)
{
if (
$req == '1')
{
if (
$value == '')
{echo 
"$key is empty";die;}
}
$j strlen($key);
if (
$j >= 20)
{echo 
"Name of form element $key cannot be longer than 20 characters";die;}
$j 20 $j;
for (
$i 1$i <= $j$i++)
{
$space .= ' ';}
$value str_replace('\n'"$line"$value);
$conc "{$key}:$space{$value}$line";
$text .= $conc;
$space ' ';
}
mail($emailadd$subject$text'From: '.$emailadd.'');
echo 
'<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>
Now the form was created in Dreamweaver CS3. So im hoping that you guys can help me out. Am I doing something wrong, Is there something wrong with my PHP, if so, could you really help me out. Kind of desperate on this one, because we have about 20 people wanting to apply and I can't figure this out. Also I have searched the internet for about a week and couldn't find anything, and im not that great with PHP yet. If possible also, could someone fill in the blanks for me? lol!

Thanks ,
Micah
Disbrow Paranormal Research
Web Development Team Leader

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by TeraTask : 08-04-2008 at 08:55 PM. Reason: edited-out email addresses
Reply With Quote
  #2 (permalink)  
Old 08-04-2008, 08:05 PM
disbrowpr disbrowpr is offline
Novice
Join Date: Aug 2008
Location: Rolla, Mo
Posts: 14
iTrader: (0)
disbrowpr is on a distinguished road
So I couldnt post the HTML of it, but you get the gist, just view soure of the page I linked if you need to!

Thanks Again,
Micah

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #3 (permalink)  
Old 08-04-2008, 09:03 PM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 440
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
Most things look OK to me. I made a few changes, mostly minor:

PHP Code:
<?php
//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.
$subject 'Submitted Applicant';

// Your email address. This is where the form information will be sent.
$emailadd '**edited-out email addresses**';

// Where to redirect after form is processed.
$url 'http://www.disbrowpr.org/thankyou.htm';

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req '0';

// --------------------------Do not edit below this line--------------------------
$text "Results from form:";
$line '
'
;
foreach (
$_POST as $key => $value) {
  if (
$req == '1') {
    if (
$value == ''){
      echo 
"$key is empty";
      die;
    }
  }
  
$j strlen($key);
  if (
$j 20) {
    echo 
"Name of form element $key cannot be longer than 20 characters";
    die;
  }
  
$j 20 $j;
  
$space ' ';
  for (
$i 1$i <= $j$i++) {
    
$space .= ' ';
  }
  
$value str_replace("\n"$line$value);
  
$conc $key.":".$space.$value.$line;
  
$text .= $conc;
  
$space ' ';  
}
mail($emailadd$subject$text'From: '.$emailadd.'');
echo 
'<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>
But, to help further I'd have to see what you are getting.

BTW: Be sure to remove your email address from posted code to protect you from spammers.

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #4 (permalink)  
Old 08-05-2008, 02:11 AM
disbrowpr disbrowpr is offline
Novice
Join Date: Aug 2008
Location: Rolla, Mo
Posts: 14
iTrader: (0)
disbrowpr is on a distinguished road
Icon6

To look at what im trying to recieve, its on the following link. Its to much to put it in HTML!

DPR Apply

Thanks,
Micah

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by disbrowpr : 08-05-2008 at 02:14 AM. Reason: Completely relinked the page! =D lol
Reply With Quote
  #5 (permalink)  
Old 08-05-2008, 01:33 PM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 440
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
My question was not about where you're entering, but what you're receiving in your email. Make sure to include all the details while stripping out personally-identifying information.

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #6 (permalink)  
Old 08-05-2008, 02:19 PM
disbrowpr disbrowpr is offline
Novice
Join Date: Aug 2008
Location: Rolla, Mo
Posts: 14
iTrader: (0)
disbrowpr is on a distinguished road
Quote:
My question was not about where you're entering, but what you're receiving in your email. Make sure to include all the details while stripping out personally-identifying information.
We are a legit Non-Profit business with policies and terms, so were covered on that. Im wanting that entire application in my e-mail. Where when the Human Resources Manager gets it, she can review it and call them if needed for an interview.

Thanks,
Micah

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #7 (permalink)  
Old 08-06-2008, 12:40 AM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 440
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
Well, dude, I have asked a simple question and you have simply not answered it, so I can't help you further.

Best wishes!

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #8 (permalink)  
Old 08-06-2008, 05:21 PM
disbrowpr disbrowpr is offline
Novice
Join Date: Aug 2008
Location: Rolla, Mo
Posts: 14
iTrader: (0)
disbrowpr is on a distinguished road
You wanted to know what I was recieving in my e-mail. I want to recieve the entire application. Or the entire form on the page.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #9 (permalink)  
Old 08-06-2008, 05:24 PM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 440
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
I'm not sure where the communication breakdown is, but here's the facts:

I have asked for what you are receiving.

You keep tell me what you want to receive.

Do you see the difference now?

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #10 (permalink)  
Old 08-10-2008, 07:50 PM
disbrowpr disbrowpr is offline
Novice
Join Date: Aug 2008
Location: Rolla, Mo
Posts: 14
iTrader: (0)
disbrowpr is on a distinguished road
Icon5

This is all I recieve,

"Results from form:";

Thats about it.


Sorry it took so long to reply to it! =D

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

   Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 02:03 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50