| | |
How do get email from database?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2009
Posts: 39
Reputation:
Solved Threads: 0
Hello Guys,
I would like to know if its possible or not, where i can have a text box which when i enter the ID and press submit it gets the email matching that ID. and sends an email, please note that i know how to send email, i just dont know how to get data and send it can someone please give me an example on how i would do this. THank you
Have a good day
I would like to know if its possible or not, where i can have a text box which when i enter the ID and press submit it gets the email matching that ID. and sends an email, please note that i know how to send email, i just dont know how to get data and send it can someone please give me an example on how i would do this. THank you
Have a good day
•
•
Join Date: Jul 2009
Posts: 39
Reputation:
Solved Threads: 0
Hello,
I have a form when everytime i fill, it gives a unique id for example
name
surename
address
postcode
email@email.com
ID: 4
name
surename
address
postcode
email1@email.com
ID: 5
name
surename
address
postcode
email2@email.com
ID: 6
I then want a text box on say page called email.php
is like this
----------------
5 |
--------------- submit
when i click on submit, it goes to server and finds the email for record 5 and sends an email.
I hope that makes sense, thank you
have a good day
I have a form when everytime i fill, it gives a unique id for example
name
surename
address
postcode
email@email.com
ID: 4
name
surename
address
postcode
email1@email.com
ID: 5
name
surename
address
postcode
email2@email.com
ID: 6
I then want a text box on say page called email.php
is like this
----------------
5 |
--------------- submit
when i click on submit, it goes to server and finds the email for record 5 and sends an email.
I hope that makes sense, thank you
have a good day
php Syntax (Toggle Plain Text)
<?php if($_POST['submit'] == "Send Email") { $sql = "Select * from tablename where id=".$_POST['id']; $res = mysql_query($sql); $data = mysql_fetch_array($res); $to_email = $data['email']; //Send mail here // mail($to_email,$subject,$msg); } ?> <form name="frmEmail" action="" method="post"> <input type="text" name="id" id="id" /> <input type="submit" name="submit" id="submit" value="Send Email" /> </form>
Last edited by sikka_varun; Jul 14th, 2009 at 9:36 am. Reason: Changing $_SUBMIT to $_POST
![]() |
Similar Threads
- how to insert email into database (PHP)
- checkboxes to email and database (PHP)
- Coenso Consulting Firm - Place to go for your ecommerce needs (Post your Resume)
- email=username in_form (PHP)
- email assigned to username on submit (MySQL)
- Doesn't check if username or email exits in database properly (ASP.NET)
Other Threads in the PHP Forum
- Previous Thread: PHP Formula and syntax
- Next Thread: web crawler
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code codingproblem cron curl database date directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link login loop mail memmory menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select send server sessions sms snippet soap source space speed sql static structure syntax system table tutorial up-to-date update upload url validation validator variable video web wordpress xml youtube





