PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
if ("yesp2" == "".$_GET['id']."") {
$con = mysql_connect($server, $user, $password) or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db($database);
echo mysql_error();
$del = "DELETE FROM `join` WHERE `id` = '".$_GET['id']."'";
$sql1 = "SELECT * FROM `join` where `id` = '".$_GET['id']."'";
$result = mysql_query($sql1, $con) or die(mysql_error());
echo mysql_error();
while ($data = mysql_fetch_assoc($result)) {
$mail = $_POST['mail'];
$AdminMessage .= $mail;
mail("".$data['email']."", "Team Exile", $AdminMessage, "From: join@teamexileonline.com");
}
mysql_query($del, $con) or die(mysql_error());
echo mysql_error();
echo ("<br>Deleted from Requests & Sent mail to user for acceptance.");
}
?>
I dont get any errors, but the First 'Yes' page wont display itself... I posted 'Yes' page2 incase someone wants to see if there is any errors in that page cuz im not able to debug it until the First yes page works.
Please help!! ive been workin on this for 30min and still cant get any results!
Thanks
Last edited by bla5e on Tue Aug 09, 2005 11:47 am, edited 1 time in total.
"".$_GET['id']."" -> you're starting a string, then escaping to output php then escaping back to the string, then ending it.
So the "". and ."" isn't necessary. $_GET['id'] works just fine.
And putting your $_GET variable first is a more common practice, I don't know if it's more correct or not.
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.
if both of those aren't set in the URL string, isn't nothing = nothing ? Seems to me this expression would always evaluate to true if they're both empty.
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.
are both the $_GET['yes'] and $_GET['id'] set in the url string?
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.
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.
and all of your $_GET['id'] 's in that section should be changed to $_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.