Discussion:
Submitting data to MySql Table and sending email notification
(too old to reply)
abhidev
2009-03-30 16:25:42 UTC
Permalink
Hello,

I have created a form in Adobe Dreamweaver CS4 and I am using PHP and MySql.
Currently,when user hits the submit button,it captures data in the form and
submits it to a MySql table.What I would like it to do is to send an email to
me notifying that a form has been submitted,along with a summary of the data
entered in the form.So, essentially I want to execute two behaviours on click
of submit button.

I would really appreciate if someone could help me with it.
David Powers
2009-03-30 16:34:18 UTC
Permalink
Post by abhidev
Currently,when user hits the submit button,it captures data in the form and
submits it to a MySql table.What I would like it to do is to send an email to
me notifying that a form has been submitted,along with a summary of the data
entered in the form.
Dreamweaver doesn't have a server behavior to send an email, but what
you want to do is very simple to achieve, as long as you have a mail
processing script. Just include the mail processing script after the
line of code that submits the data to the database.
--
David Powers
Adobe Community Expert, Dreamweaver
http://foundationphp.com
abhidev
2009-03-30 18:31:46 UTC
Permalink
David,

I wrote the script to capture data from the form and email it to a particular
email address.I have not uploaded the page,but I am still testing it on a
testing server.Do you think it should send the email or do I have to upload it
to see if its working?
David Powers
2009-03-30 18:35:02 UTC
Permalink
Post by abhidev
I am still testing it on a
testing server.Do you think it should send the email or do I have to upload it
to see if its working?
You need to test mail() on a remote server.
--
David Powers
Adobe Community Expert, Dreamweaver
http://foundationphp.com
abhidev
2009-03-30 19:23:51 UTC
Permalink
David,

I changed the testing server to the remote FTP server for my site.Now,I do the
put operation and when I try to open the page, I am getting this error.

Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local
MySQL server through socket '/tmp/mysql.sock' (2) in
/usr/home/bciinc/htmldocs/Connections/BCI_Webtrack.php on line 9

Fatal error: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2) in /usr/home/bciinc/htmldocs/Connections/BCI_Webtrack.php
on line 9

I have no clue about this error.I really apprreciate your help
David Powers
2009-03-30 21:41:23 UTC
Permalink
Post by abhidev
I changed the testing server to the remote FTP server for my site.Now,I do the
put operation and when I try to open the page, I am getting this error.
I don't recommend using a remote testing server with Dreamweaver. Too
much can go wrong.
--
David Powers
Adobe Community Expert, Dreamweaver
http://foundationphp.com
abhidev
2009-03-30 22:07:17 UTC
Permalink
David,

So, how can I test if the form is sending the email without putting it on a remote FTP server.Please advice

Thanks
David Powers
2009-03-30 22:14:58 UTC
Permalink
Post by abhidev
So, how can I test if the form is sending the email without putting it on a remote FTP server.Please advice
Upload the relevant pages to your remote server and test them there.
--
David Powers
Adobe Community Expert, Dreamweaver
http://foundationphp.com
DWFAQ.info
2009-03-30 17:40:29 UTC
Permalink
Dreamweaver has an extension that adds a server behavior to do what you'd like. Check out Adobe Developers Toolbox there's a free trial download available.
Loading...