Hello Guys, i am currently using my localserver dont have a hosting where i can test it, so i would like to know if this basic idea will work or not. Here is the code do you think if i enter the ID it will get the email and then send an email? Also can some one please give me a basic idea on how i would do it so it used the email in the To variable ?
<html>
<head>
</head>
<body>
<?php
$con = mysql_connect("localhost","t","123456");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("t",$con);
if(isset($_POST['ID'])){
$result = mysql_query("SELECT Email FROM t_table WHERE ID = '".$_POST['ID']."'LIMIT 1");
}
$row = mysql_fetch_assoc($result);
//mail stuff here ?
mysql_close($con);
?>
<form method="post" action="">
<font>ID</font> <input type="text" name="ID"/>
<input type="Submit" value="Submit" name="Submit">
</form>
</body>
</html>
Thank you