retrobsession Posted February 12, 2008 Share Posted February 12, 2008 Hi everyone, First post for me so here goes. I have a for sale section on my website but I want people to be able to click on a link next to the item that allows them to email the recipient, is there some code that will alow me to handle it all from one contact form for all contacts. Thanks, Mark Quote Link to comment Share on other sites More sharing options...
trq Posted February 12, 2008 Share Posted February 12, 2008 Its not really clear what your trying to do, but you could simply have a text field which your users can input email addresses seperated by , then simply explode by , to send the emails. eg; <?php if (isset($_POST['submit'])) { $recipients = explode(',',$_POST['recipients']); foreach ($recipients as $email) { // send mail. } } ?> Quote Link to comment Share on other sites More sharing options...
retrobsession Posted February 12, 2008 Author Share Posted February 12, 2008 Hi, I'll try and explain a little more Ok, e.g. I have 10 items for sale on my for sale page by 10 different people and a potential seller wants to contact any one them. I want them to be able to click on a link which will launch a contact form, they will fill in item of interest, their email address, press submit and the email will go to the particular seller. I know I could create a contact form for each person/item but that is a lot of work so I was wondering if I could acheive the same using a single file but referecing a list with all the individual email addresses in so if they sellect contact seller 1, the email goes to seller 1 and so on. e.g. item 1 - seller email = blah@blah.com, item 2 - seller email = blah2@blah2.com Thanks, Mark Quote Link to comment Share on other sites More sharing options...
trq Posted February 12, 2008 Share Posted February 12, 2008 Were going to need to see some code. Assuming your sellers are allready related to the items they are seeling this should be simple. Are your items stored within a database, and if so, are the sellers email addresses also? Quote Link to comment Share on other sites More sharing options...
retrobsession Posted February 12, 2008 Author Share Posted February 12, 2008 These are simply images at the moment with no contact facility, I have no database as it's simply a website using html and stylesheets Quote Link to comment Share on other sites More sharing options...
trq Posted February 12, 2008 Share Posted February 12, 2008 Then you going to be a bit stuck. You need to relate each item to a seller, then it would be simple. Quote Link to comment Share on other sites More sharing options...
retrobsession Posted February 12, 2008 Author Share Posted February 12, 2008 Umm, thought so. Any ideas for a simple database I can download, I can support mysql Quote Link to comment Share on other sites More sharing options...
trq Posted February 12, 2008 Share Posted February 12, 2008 Its not simply a matter of downloading a database. Your looking to setup a simple ecommerce site by the sounds of it, unfotunately, this isn't so simple. Quote Link to comment 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.