| | |
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: 34
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: 34
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 |
# 5.2.10 action address apache api array auto autoincrement beginner binary broken cakephp checkbox class classes cms code cron curl database date dehasher destroy display dissertation domain dynamic echo echo$_get[x]changingitintovariable... email error errorlog fatalerror file files folder form forms function functions google href htaccess html if-else image images include insert ip javascript joomla legislation limit link load login mail masterthesis menu mlm multiple mysql mysqlquery oop open paypal pdf persist php popup problem query radio random record recursion remote script search server sessions sms sockets source space sql syntax system table tutorial update upload url validator variable video web youtube





