PHP Simplicity Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Some of SFU features: Universal password protection, notification of uploads and logging just to name few.

Author Topic: Add a contact field to the form...  (Read 9619 times)

0 Members and 1 Guest are viewing this topic.

justin

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Add a contact field to the form...
« Reply #10 on: April 06, 2006, 03:42:28 AM »

thnx it works now

thanks for helping  ;D ;D ;D
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: Add a contact field to the form...
« Reply #11 on: April 06, 2006, 06:25:41 PM »

no problem at all! :)
Logged

We don't need a reason to help people

snicka

  • Guest
Re: Add a contact field to the form...
« Reply #12 on: May 26, 2006, 12:41:23 PM »

I tried to get this to work and am having problems with it.

I would like to add 2 new text fields but I can't figure out how the text field data gets assigned to $extra_message. It would seem there is no code that assigns the data to this variable.

I tried following this post and made the same changes but it would not work. The email address did not get printed.

Any help is appreciated.
Logged

snicka

  • Guest
Re: Add a contact field to the form...
« Reply #13 on: May 26, 2006, 06:15:21 PM »

Well, I found my mistake and got it to work with 1 text field, but how can I add another?

Thanks for any help.
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: Add a contact field to the form...
« Reply #14 on: May 27, 2006, 05:39:44 AM »

just add the new field like you did with the first one and then you can retraive its value with: $_POST['the_field_name']
Logged

We don't need a reason to help people

snicka

  • Guest
Re: Add a contact field to the form...
« Reply #15 on: May 27, 2006, 11:47:40 AM »

Thanks for your help.
Logged

Royal

  • Newbie
  • *
  • Offline Offline
  • Posts: 1
    • View Profile
Re: Add a contact field to the form...
« Reply #16 on: June 26, 2006, 11:44:05 AM »

SWEET SCRIPT! - Thanks

Can anyone describe the procedure for adding more fields I am a hacker more than a coder and having some issues.

Installed the email option but wanted to add a few other text fields and can not seem to get anything to work.

Thanks,
Royal
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: Add a contact field to the form...
« Reply #17 on: June 27, 2006, 12:16:25 PM »

the previous posts should help.. what exactly you don't get to work?
Logged

We don't need a reason to help people

Dallas

  • Newbie
  • *
  • Offline Offline
  • Posts: 1
    • View Profile
Re: Add a contact field to the form...
« Reply #18 on: November 12, 2006, 05:19:17 PM »

Fantastic script, thanks! I've had fun playing with it all day.

I do have a question about adding additional fields. I'm not great with php - just starting to learn - but I've managed to add 3 additional fields but how do I get the info in all of them sent in the email notification ( I have this turned on )? Right now it sends 3 separate emails, one with each piece on info...so you can probably tell I've used this:

   if ($notify_admin == true)
      MailUploaded($_POST['email']);
   if ($notify_admin == true)
      MailUploaded($_POST['name']);
   if ($notify_admin == true)
     MailUploaded($_POST['additional_info']);

I know that's wrong but don't know the right way. Any help would be very much appreciated.

Thanks
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: Add a contact field to the form...
« Reply #19 on: November 18, 2006, 01:01:27 PM »

Simply merge all those info into one variable and then send them:
$email_message $_POST['email'] . "\n" $_POST['name'] . "\n" $_POST['additional_info'];
if (
$notify_admin == true)
      
MailUploaded($email_message);


Hope that helps :)
Logged

We don't need a reason to help people
 

+ Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.
Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
Are you a bot/spammer?: