Forum Moderators: coopster
I can set up MySql tables and databases no problem.
I can make a php connect to a database no problem.
So now I want to create a program for my website which enables me to have the results sent from any form to the correct email address in Mysql.
For example the form id = 45 so the php program will access Mysql and find the id = 45 then collect the email address then send the form results to the email address selected.
I need this for my web site that has over 100 property owners all advertising. Their is no hurry but I want to learn php.
Can any one give me a few ideas and pointers on what will be required and which part of the whole process should i set up first.
I understand the Mysql databases should be created first and ready for testing your programs.
Any advice for beginner really appreciated
Cheers
I can make a php connect to a database no problem.
Next step would be to extract the email id you need from database ..
that is done by a select query.
eg.
$id = 45;
$query = "SELECT email_id from property_owners where id = $id";
$result = mysql_query($query);
list($email_id) = mysql_fetch_row($result);
this will give you email id in the variable $email_id.
You can then use "mail()" function in PHP to send email as required.
HTH
Jaski
Thanks for that,
I am going to try that now and then see if i can start to build something up.
It sounds like a nice easy program to get me started in Php the only problem I have to think about is keeping my mind focused on making sure all veriables and strings are correct.
We all have to start somewhere!
Cheers
I could not find it on the internet so I created my own out of frustration. Now I have caught the bug to learn more and see how far I can push myself. What can I create next.
A simple script that connects to a database and finds the email address from the correct id submitted and the results are sent through email. Copies are sent to other specified email addresses with full or partial content from the form.
12 months ago I frowned at most php scripts because of Mysql, and now I have managed to overcome the nightmare.
Sorry for going on about it but its a success story for me and from the great people who post on Webmaster World.
Cheers