You are POSTing those variables to the server, so they won't appear in $_GET, they appear in $_POST or $_REQUEST.
Try changing to
Also remove the @ in front of the mail function in case that brings up errors too.
addslashes is not what you should be doing with POST variables to be used in an email. I would have a read through these threads:
http://www.christian-web-masters.com/forum...?showtopic=8259
http://www.christian-web-masters.com/forum...?showtopic=9290
Current linksubmit.php no errors, but I'm still not getting a email with the submitted data.
// Receiving variables
$sitename = addslashes($_POST['sitename']);
$siteurl = addslashes($_POST['siteurl']);
// Validation
//Sending Email to form owner
$pfw_header = "From: $sitename\n"
. "Reply-To: $sitename\n";
$pfw_subject = "Link submit.";
$pfw_email_to = "news@christiangamers.net";
$pfw_message = "sitename: $sitename\n"
. "siteurl: $siteurl\n";
mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header );
echo("<p align='center'><font face='Arial' size='2' color='#000000'>Thanks for the link...</font></p>");
?>
Fixed it. My server would not process the form with out a from (email address). New code, working.
// Receiving variables
$sitename = addslashes($_POST['sitename']);
$siteurl = addslashes($_POST['siteurl']);
// Validation
if (strlen($sitename) == 0 )
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid sitename</font></p>");
}
if (strlen($siteurl) == 0 )
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid siteurl</font></p>");
}
//Sending Email to form owner
$pfw_header = "From: news@christiangamers.net\n"
. "Reply-To: news@christiangamers.net\n";
$pfw_subject = "URL Submit";
$pfw_email_to = "news@christiangamers.net";
$pfw_message = "sitename: $sitename\n"
. "siteurl: $siteurl\n";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header );
echo("<p align='center'><font face='Arial' size='2' color='#000000'>Thank You...</font></p>");
?>
This form (see here - http://www.christiangamers.net/forum/template.php?page=36) is suppose to submit (via email). It seems to process fine, but no email. Do you see anything wrong?
<div align="center">
<p class="gensmall">Submit a link:</p>
<table width="500" border="0">
<tr>
<td width="217">
<div align="right" class="gensmall">Site Name</div>
</td>
<td width="273">
<input type="text" name="sitename">
</td>
</tr>
<tr>
<td width="217">
<div align="right" class="gensmall">Site URL</div>
</td>
<td width="273">
<input type="text" name="siteurl">
</td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td width="217">
<div align="right">
<input type="reset" name="Reset" value="Reset">
</div>
</td>
<td width="273">
<input type="submit" name="Submit" value="Submit" onClick="MM_validateForm('Site Name','','R','Site URL','','R','','','Select one','','','Select one','','','Select one','','','','');return document.MM_returnValue">
</td>
</tr>
</table>
</div>
</form>
action code
# ----------------------------------------------------
# -----
# ----- This script was generated by PHP-Form Wizard 1.1 on 2/9/2008 at 10:28:04 PM
# -----
# ----- http://www.tools4php.com
# -----
# ----------------------------------------------------
// Receiving variables
@$sitename = addslashes($_GET['sitename']);
@$siteurl = addslashes($_GET['siteurl']);
// Validation
//Sending Email to form owner
$pfw_header = "From: $sitename\n"
. "Reply-To: $sitename\n";
$pfw_subject = "Link submit.";
$pfw_email_to = "ked(at)kenerly.com";
$pfw_message = "sitename: $sitename\n"
. "siteurl: $siteurl\n";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header );
echo("<p align='center'><font face='Arial' size='2' color='#000000'>Thanks for the link...</font></p>");
?>
http://christiangamers.net
One Love, One God, One Way
"Allow me to live today, To give you the praise"