PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm a flash guy, I'm no expert in PHP. So please any help is highly appriciated.
Question:
When the server side PHP script receives data from a field which will contain the domain name ($thedomain) it should match an email from my email list and send the mail to that perticular email address.
You can use regular expressions to pull the domain out of the URL. A quick Google search pulled this up: http://www.experts-exchange.com/Web_Dev ... 19065.html (scroll to the bottom of the page to actually find the answers)
As far as matching it to the list of email addresses, that might be a bit trickier, especially if you have multiple addresses for the same domain. Unfortunately, I don't know enough about finding strings inside of arrays to be of much assistance there. This may help, though: http://us2.php.net/manual/en/function.array-search.php
Ron_e, have you got anything written at all currently? If so, please post it and explain where you're having difficulty. Otherwise I could probably give you an outline of steps that might help you write the solution yourself.
Sorry if I'm confusing you. I'll start all over again.
I've done the form in flash using "LoadVars" and the data is been transfered to the PHP script on the server (PHP code is as in my previous post). It's working fine! The Flash Form even captures the browser URL and sends to the PHP script.
But I don't know how to make the URL match an email address (which is in the PHP script or in an external PHP file) and automatically use it as the senders email address!!!
You can use regular expressions to pull the domain out of the URL. A quick Google search pulled this up: http://www.experts-exchange.com/Web_Dev ... 19065.html (scroll to the bottom of the page to actually find the answers)
You can't actually view those things unless you're a member of that site.