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 7816559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:54:30+00:00 2026-06-02T05:54:30+00:00

link to PHP File Link to HTML File Ok so I am doing my

  • 0

link to PHP File
Link to HTML File

Ok so I am doing my first php form and I have tried Googling this and didn’t have any luck (if anyone knows any good tutorials on basic php or php forms I have been looking at a lot of them and could use a good one).

Anyway basically I can’t figure out why my emails get sent with from ( Unknown ) in Hotmail, even though when I go to reply I get the correct email put in.

Here is the HTML page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My First Basic Form</title>
</head>

<style type="text/css">
</style>

<!-- Form Opening Tage -->
<table width="600">
<tr><td>
<form method="post" name="form1" action="http://www.richie.id.au/TAFE/form        /php/form1_send.php"><br /><br />
<table width="600" border="5" bordercolor="#990000">

<!-- Name Field -->
<tr><td>Name:</td></tr>
<tr><td><input type="text" name="name" size="40" /></td></tr>

<!-- email Field -->
<tr><td>Email:<br /></td></tr>
<tr><td><input type="text" name="email" size="40" /><br /><br /></td></tr>

<!-- Message Field -->
<tr><td>Message: <br /></td></tr>
<tr><td><textarea name="message" width="100%" rows="12" cols="60" style="resize:none;">    </textarea><br /><br /></td></tr>

<!-- Sbumit Button -->
<tr><td><input type="submit" name="submit" /><br /><br /></td></tr>

</table>
</form>
</td>
</tr>
</table>

<body>
</body>
</html>

Here is the PHP page

<?PHP

// $name variable declared as name that was inputed into text field
$name = $_POST['name'];

// $email variable declared as email that was inputed into text field
$visitor_email = $_POST['email'];

// Email to show the message as coming from
$email_from = $_POST["$visitor_email"];

// Message text asigned to variable message
$message = $_POST['message'];

// Email subject
$subject = 'New form submission from richie.id.au';

// Email Body
$email_body = "New message from: $name.\n\n Message:\n\n $message\n";

// Email address to send form submission email to
$to = "richie_hayward_01@hotmail.com";

// headers
$headers = "From: $email_from \r\n";
$headers .= "Reply-To: $visitor_email \r\n";

// Function that actually sends the mail
mail($to,$subject,$email_body,$headers);


?>
  • 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-02T05:54:34+00:00Added an answer on June 2, 2026 at 5:54 am

    Problem is in below line in your php code

    // Email to show the message as coming from
    $email_from = $_POST["$visitor_email"];
    

    $email_from is blank and that is the reason for unknown sender.

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

Sidebar

Related Questions

I have a .php file with HTML code also in it. Through this file
I am using this in my viewregistration.php file <html> <head> <link rel=stylesheet type=text/css href=<?php
I have borrowed code from this link PHP regex templating - find all occurrences
I have a .php file, and a .html file. Within a button click, I
In my public_html I have a profile.php file and some links in this format
I have written jQuery code, in files Main.html and ajax.php . The ajax.php file
I have a problem in integrating PHP and JQuery: My main file is MyFile.html
Can anyone tell me if its possible to validate a link with php? By
I got this script called rapidshare link checker v2 php by Bigfish At the
http://steph.net23.net/work.php here is my test link. This page has a jquery script in it

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.