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

  • SEARCH
  • Home
  • 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 8087269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:43:23+00:00 2026-06-05T18:43:23+00:00

I am noob with php so pardon my ignorance. I have created php form

  • 0

I am noob with php so pardon my ignorance. I have created php form and it is working fine except one thing. When i get my mail it says that its send from nobody , i have no idea how can i solve this issue so i am asking for little help! Thank you!!!
Here’s my code:

     <?php  

    if (isset($_POST['Submit'])) {  

        if (!empty($_POST['name'])) {  
            $_POST['name'] = filter_var($_POST['name'], FILTER_SANITIZE_STRING);  
            if ($_POST['name'] == "") {  
                $errors .= 'Molimo unesite Vaše ispravno ime.';  
            }  
        } else {  
            $errors .= '<p>Molimo unesite Vaše ime.</p>';  
        }  

        if (!empty($_POST['email'])) {  
            $email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL);  
            if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {  
                $errors .= "$email is <strong>NIJE</strong>  valjana email adresa.<br/><br/>";  
            }  
        } else {  
            $errors .= '<p>Molimo unesite  email adresu.</p>';  
        }  




        if ($_POST['message'] != "") {  
            $_POST['message'] = filter_var($_POST['message'], FILTER_SANITIZE_STRING);  


        }  

        if (!$errors) { 

            $mail_to = 'dejo.dekic@yahoo.com';  
            $subject = 'Kontakt';  
            $tema = 'Info';
            $headers  = 'MIME-Version: 1.0' . "\r\n";
            $headers  = 'Od: ' . $_POST['name'] . "\n"; 
            $headers .= 'Email: ' . $_POST['email'] . "\n";  
            $headers .= "Poruka:\n" . $_POST['message'] . "\n\n";  

            $user = $_POST['email'];
            $poruka ='Vaš kontakt je uspjesno zaprimljen! Odgovorit ću vam u najkraćem mogućem roku. Hvala! Molimo ne odgovarajte na ovu poruku. Ova poruka je automatska.';
            mail($mail_to, $subject, $headers, "Content-Type: text/plain; charset=UTF-8;");  
            mail($user, $tema, $poruka, "Content-Type: text/plain; charset=UTF-8;"); 

            echo "<div style='color:white;margin:0px auto;padding-top:20px;width:290px;background-color:white;font-weight:bold;text-align:center;'><p>Hvala Vam na kontaktu!</p></div>";

        } else {  
            echo '<div class="errors">' . $errors . '<br/></div>';  

        }  
    }  

?>  

And this is how it looks in my yahoo mail:http://www.homepagepays.robertpeic.com/yahoo.png

  • 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-05T18:43:24+00:00Added an answer on June 5, 2026 at 6:43 pm
    $from = 'yourdesiredemail@here.com';
    $headers .= "From: " . $from . "\r\n";
    

    Just need an addition to the header.

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

Sidebar

Related Questions

I apologize in advance, I am a PHP noob! I have form with some
I'm a PHP noob. I have a database that I will update weekly with
I'm a noob with mysql and php, and need some help :) I have
I'm a total noob trying to create a website with PHP. I created a
I'm a PHP noob and have a question which seems to be simply -
I've been searching for a while now, but php-noob as I am, can't get
I made a PHP script for a form, but dont't know how to get
So, I'm a bit of a noob to iOS (PHP dev). I have a
Hey i am a noob when it comes to php because i have just
I'm a real noob with PHP, so here' goes. I have a script to

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.