Jump to content

"Should be simple" Email Form Script


xtremeone

Recommended Posts

So basically here is what Im trying to do:

 

I have a site that has an employee roster on it...this roster obviously has the employees information including their email addresses next to their names.

 

I am trying to create a script that will allow an employee to easily email another employee on the roster simply by clicking the email address for that employee.

 

To sum this up (or make it even more confusing) ...

 

If i have an email address LINK of "myname@company.com" next to an employees name and a person clicks on that link ... I need some code that will take that email address link (myname@company.com) and add it into the email script into the "$to" function so that when they submit the email form it will go to the employees email (myname@company).

 

I have several employee on this roster so I need a universal script that takes the email links information (ie myname@company.com) and puts it into the mail.php script.

 

I do not want to have to make individual email scripts for each employee just to add to change the "$to" variable on each script!!!

 

So basically how do I add a "links information" into a php script ??

 

Does this make sense ???

Are you confused ?? I can TRY to explain better if need be.

 

I have looked all over the internet for this and have searched this forum however I have not been able to find a solution to this.

 

A step in the right direction would be great!!!  :P

Link to comment
Share on other sites

Thats just it ... I dont have any code ... I can stumble through a php email script ... but you usually have to define "$to" as a specific email address. I want the "link" that the person clicks on to define the "$to" string. For the life of me I have never seen a script like what Im looking for.

Link to comment
Share on other sites

if you're pulling the email addresses from a database you could use get. So instead of linking to the email address it links to: myscript.php?email=example@example.com

 

then you'd do something like the following:

 

<?php
//this would get the email and make into a variable.
$email = $_GET['email'];

?>

 

Then you'd include the email script here and a probably a textarea box.

 

Once you click submit it would send an email to that user.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.