Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9021561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:17:04+00:00 2026-06-16T05:17:04+00:00

Hi quys I have a problem with a PHP script. It should send an

  • 0

Hi quys I have a problem with a PHP script. It should send an e-mail to my e-mail adress but it doesn’t:(

<html>
<head>
<title>Aliens Abducted Me - Report an Abduction</title>
<link rel="stylesheet" type="text/css" href="css/mystyle.css">
</head>
<body>
<h2> Aliens Abducted Me - Report an Abduction</h2>
<p> Share your story of alien abduction:</p>
<form  method="POST" action="report.php">
<label for="firstname">First Name:</label>
<input type="text" id="firstname" name="firstname"><br>
<label for="lastname">Last Name:</label>
<input type="text" id="lastname" name="lastname"><br>
<label for="email">What is your email adress?</label>
<input type="text" id="email" name="email"><br>
<label for="whenithappened">When did it happen?</label>
<input type="text" id="whenithappened" name="whenithappened"><br>
<label for="howlong">How long where you gone?</label>
<input type="text" id="howlong" name="howlong"><br>
<label for="howmany">How many did you see</label>
<input type="text" id="howmany" name="howmany"><br>
<label for="aliendescription">Describe them:</label>
<input type="text" id="aliendescription" name="aliendescription"><br>
<label for="whattheydid">What they do to you?</label>
<input type="text" id="whattheydid" name="whattheydid"><br>
<label for="fangspotted">Have tou see my  dog Fang?</label>
<input type="radio" id="fangspotted" name="fangspotted"  value="YES">Yes
<input type="radio"id="fangspotted" name="fangspotted" value="NO">NO<br>
<img src="img/fang.jpg" alt="Fang Picture" title="Fang Picture"><br>
<label for="other">Anything else you want to add</label>
<textarea rows="4" cols="50" id="other" name="other"></textarea><br>
<input type="submit" value="Send report!">
</body>
</html>

That is the HTML part of code, and the PHP script is:

<html>
<head>
<title>Aliens Abducted Me - Report an Abduction</title>
</head>
<body>
<h2>Aliens Abducted Me - Report an Abduction</h2>
<?php
$name = $_POST['firstname'] . ' ' . $_POST['lastname'];
$when_it_happened = $_POST['whenithappened'];
$how_long = $_POST['howlong'];
$how_many = $_POST['howmany'];
$alien_description = $_POST['aliendescription'];
$what_they_did = $_POST['whattheydid'];
$fang_spotted = $_POST['fangspotted'];
$email = $_POST['email'];
$other = $_POST['other'];
$to = 'my_email@gmail.com';
$subject = 'Aliens Abducted Me - Abduction Report';
$msg = "$name was abducted $when_it_happened and was gone for $how_long.\n" .
"Number of aliens: $how_many\n" .
"Alien description: $alien_description\n" .
"What they did: $what_they_did\n" .
"Fang spotted: $fang_spotted\n" .
"Other comments: $other";
mail($to, $subject, $msg, 'From:' . $email);
echo 'Thanks for submitting the form.<br/>';
echo 'You were abducted ' . $when_it_happened;
echo ' and were gone for ' . $how_long . '<br />';
echo 'Number of aliens: ' . $how_many . '<br />';
echo 'Describe them: ' . $alien_description . '<br />';
echo 'The aliens did this: ' . $what_they_did . '<br />';
echo 'Was Fang there? ' . $fang_spotted . '<br />';
echo 'Other comments: ' . $other . '<br>';
echo 'Your email address is ' . $email;
?>
</body>
</html>

My php.ini configurations are :

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = NULL

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = NULL

There are no error, not reciving any e-mails on my mail box or spam
Thanks for helping me guys, I want to solve this problem before 21/12 at midnight because I don’t like to die with my business unfinised~just kidding.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:17:06+00:00Added an answer on June 16, 2026 at 5:17 am

    You have to replace your SMTP : localhost by a smtp server name valid, for exemple by your web provider or your web hosting stmp. Some of them require to be identifie before sending mai..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.