xtremeone Posted March 5, 2012 Share Posted March 5, 2012 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 "[email protected]" next to an employees name and a person clicks on that link ... I need some code that will take that email address link ([email protected]) 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 [email protected]) 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!!! Quote Link to comment https://forums.phpfreaks.com/topic/258296-should-be-simple-email-form-script/ Share on other sites More sharing options...
Pikachu2000 Posted March 5, 2012 Share Posted March 5, 2012 Where are you stuck, exactly? What have you tried already? Post your code and any errors it's generating. Quote Link to comment https://forums.phpfreaks.com/topic/258296-should-be-simple-email-form-script/#findComment-1324031 Share on other sites More sharing options...
xtremeone Posted March 5, 2012 Author Share Posted March 5, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/258296-should-be-simple-email-form-script/#findComment-1324033 Share on other sites More sharing options...
ReeceSayer Posted March 5, 2012 Share Posted March 5, 2012 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: [email protected] 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. Quote Link to comment https://forums.phpfreaks.com/topic/258296-should-be-simple-email-form-script/#findComment-1324075 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.