how to send email automaticly to admin when users send a form and the data insert into database....example...a booking form..therefore the admin will alert of the booking...
See [man]mail/man.
Something like:
<? if ($_POST['submit']) { mail("me@my.com", "A form has been posted","Someone just clicked 'Submit'!"); } ?>
Of course that is a very basic example....
i try but have a error..(Failed to Connect....)
Well, that makes things a tad more difficult. What are you SMTP settings in php.ini? Is an MTA running on the host computer? Can you send mail from this machine by other means?
How to check SMTP settings in php.ini?
They're listed under [mail function]. Try using your editor's search function to look for "SMTP".