I am new to PHP/MySQL and started it mainly for fun, heres the problems I'm having.
I am trying to read details from a database, turn them into email links that include the subject line. I have managed to do this but I want to bo able to delete the entries individually when I have used the links the problem whenever it reads from the database I always get more then 1 entry for each entry. i.e. I had 3 entries in th database and it returned 6 entries, with 3 being duplicates. Any Ideas?:-
<form action="delete1.php" method="post">
<?
$db=mysql_connect("localhost", "generators", "") or die(mysql_error());
mysql_select_db("generators");
$query = "select * from find order by make asc";
$result = mysql_query($query);
$records = mysql_num_rows($result);
while ( $row = mysql_fetch_assoc($result) )
{
$tag = $row['email_addy'];
$name = " " .$row['make'] ." ". $row['minkva'] ." ". $row['condition'] ." ". $row['email_addy'];
$name2 = " " .$row['condition'] ." ". $row['make'] ." ". $row['minkva']." kVA Generator";
$email_addy = $row['email_addy'];
$output .= "\n<input type=radio name=\"tag\" value=\"$tag\"> ".
"<a href=\"mailto:$email_addy?subject=$name2\" target=\"_other\">$email_addy</a><br>";
echo "$output";
}
?>
<input type="submit" class="button" value="Delete Entry" name="submit">
</form>
Second is I want to make a mailing list from entries in a database, how do I get the e-mail addresses to all go into one variable so I can use it instead of entering the addresses manually.