i already had that.
when i do
echo $email;
on the mailer it doesnt show anything
[Solved] Code problem
Moderator: General Moderators
that's because your form isn't being passed to a page
You said you already had that.... but I didn't see it in your code 
Code: Select all
echo ("<form method=\"post\" action=\"".$_SERVER['php_self']."?yesp2=".$_GET['yes']."");Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
ok i got it to work..
it wouldnt work cuz i had the email value disabled becuase i didnt want it edited.. but instead i just made it a hidden value:
it wouldnt work cuz i had the email value disabled becuase i didnt want it edited.. but instead i just made it a hidden value:
Code: Select all
echo ("<input type=\"hidden\" name=\"email\" value=\"".$data['email']."\">");ok everything works! thanks for all the help guys!
heres the final code:
heres the final code:
Code: Select all
<?php
if($_GET['yes']) {
$con = mysql_connect($server, $user, $password);
mysql_select_db($database, $con);
$result = mysql_query("SELECT * FROM `join` where `id` = '".$_GET['yes']."'");
while($data = mysql_fetch_assoc($result)) {
echo ("<br>");
echo ("<form method=\"post\" action=\"view.php?yesp2=".$_GET['yes']."\">");
echo ("<textarea cols=90 rows=15 name=mail> </textarea><br>");
echo ("<input type=\"hidden\" name=\"email\" value=\"".$data['email']."\">");
echo ("<input type=submit name=submit value=Add>");
echo ("</form>");
}
}
if($_GET['yesp2']) {
$con = mysql_connect($server, $user, $password);
mysql_select_db($database, $con);
$email = $_POST['email'];
$mail = $_POST['mail'];
$AdminMessage = $mail;
mail($email, "Team Exile", $AdminMessage, "From: join@teamexileonline.com");
mysql_query("DELETE FROM `join` WHERE `id` = '".$_GET['yesp2']."'");
echo ("<br>Deleted from Requests & Sent mail to user for acceptance.<br>Email sent to:");
echo $email;
echo "<BR>Containg the message:";
echo $AdminMessage;
echo "<BR>";
}
?>