Shoutbox

Why isnt this working? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Why isnt this working? (/showthread.php?tid=76061)

Why isnt this working? by Eddie on 07-12-2007 at 11:32 AM

This form doesnt seem to be sending stuff on my website :( here is the php..

code:
<?php
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "haboz_jobs@hotmil.com";
$Subject = "Job Application";
$Position = Trim(stripslashes($_POST['Position']));
$HabboName = Trim(stripslashes($_POST['HabboName']));
$Name = Trim(stripslashes($_POST['Name']));
$Title = Trim(stripslashes($_POST['Title']));
$Report = Trim(stripslashes($_POST['Report']));
$Ip = $_SERVER[REMOTE_ADDR];

// prepare email body text
$Body = "";
$Body .= "Habbo Name: ";
$Body .= $HabboName;
$Body .= "\n";
$Body .= "Position: ";
$Body .= $Position;
$Body .= "\n";
$Body .= "IP: ";
$Body .= $Ip;
$Body .= "\n";
$Body .= "Title: ";
$Body .= $Title;
$Body .= "\n";
$Body .= "Report: ";
$Body .= $Report;
$Body .= "\n";

// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
  header('Location: http://www.haboz.net/index.php?page=job_apps_ok');
exit();
}
else{
  header('Location: http://www.haboz.net/index.php?page=job_apps_error');
exit();
}

?>

Heres the code on the page with the form...

code:
<form method="POST" action="pages/php/job_apps.php">
            <label></label>
            <p>*Position: <br>
            <select name="Position">
            <option selected="selected">Select...</option>
            <option>Journalist</option>
            <option>Guide Writer</option>
            <option>Events Host</option>
            </select>
            <p>*Your E-Mail: <br />
            <label>
            <input type="text" name="EmailFrom">
            </label>
            <p>*Habbo Name: <br />
            <input type="text" name="HabboName">
            <p>*Report Title, Guide Title or Event Name: <br />
            <input type="text" name="Title">         
            <p>*The Report, Short Guide Example, Event Description: <br />
            <label>
            <textarea name="Report" cols="60" rows="4" wrap="physical"></textarea>
            </label>
            <p><input type="submit" name="submit" value="Submit">
            <input name="Reset" type="reset" id="Reset" value="Reset">
            </form>

Help would be appreciated :)
RE: Why isnt this working? by Ezra on 07-12-2007 at 11:50 AM

Maybe because you made a typo in your emailaddress?

quote:
Originally posted by Eddie
$EmailTo = "haboz_jobs@hotmil.com";

Else, are you sure you can email? Try testing with this:

code:
<? mail("eddie@host.com", "TESTING EMAIL", "NOTHING"); ?>

Also check your spam folder?
RE: Why isnt this working? by Eddie on 07-12-2007 at 11:53 AM

quote:
Originally posted by Ezra
Maybe because you made a typo in your emailaddress?

quote:
Originally posted by Eddie
$EmailTo = "haboz_jobs@hotmil.com";

Else, are you sure you can email? Try testing with this:

code:
<? mail("eddie@host.com", "TESTING EMAIL", "NOTHING"); ?>

Also check your spam folder?
mmm the name was the bug there...but when i make it jobs@haboz.net only half of the emails go through, doesnt make any sense.