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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:57:58+00:00 2026-06-18T05:57:58+00:00

Firstly I would like to say I’m just a very newbie in php. I

  • 0

Firstly I would like to say I’m just a very newbie in php.

I have this simple php and as it is at the moment, when it sends the info it appears a horrible “Ok” message.

could you help me improving this php with:
-better code (is it ok? could it be better?)
-I would like to add a fancier answer (like in a box or something similar) in order to advice the user that his message has been sended.

Another thing is I am not sure this is working. I have xampp installed and locally it is not working. I also tried completing the form with all the files uploaded to the server and I´m still waiting for em….the miracle of the mail arriving to my inbox? =S Maybe I did something wrong?

<?php
if(isset($_POST["nombre"]) && isset($_POST["email"]) && isset($_POST["consulta"])){
$mymail = "myemail@gmail.com";
$subject = "Consulta";
$contenido = ":: Nombre: ". $_POST["nombre"]."\n";
$contenido .= ":: E-mail: ". $_POST["email"]."\n";
$contenido .= ":: Escribiò el siguiente mensaje: ". $_POST["consulta"]."\n";

$header = "From:".$_POST["email"]."\n"; 

mail($mymail, $subject, utf8_decode($contenido));*/
echo "&estatus=ok&";
}?>

Thanks in advance for your help!
regards,

  • 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-18T05:58:00+00:00Added an answer on June 18, 2026 at 5:58 am

    In terms of understanding PHP and the mail function, this Link is a pretty good resource on it (as is the site for PHP/web coding in general.
    You’re message to the user is on the last line where it says echo “&status=ok&”; Echo is the function that outputs text to the page. If you know html, you could output any html you would like e.g.

    echo "<b>This success message is in BOLD</b>";
    

    You’ll want to be careful with quotes though, as you need to Escape them along with some other special characters, e.g.

    echo "This \"code\" will\nprint like \\\"this\\\"";
    

    will look like

    This "code" will
    print like \"this\"
    

    Anyways, that’s going off on a tangent. As for your xampp, you have to have your smtp settings configured. Check out this Post.

    Let me know if your questions are answered 🙂

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

Sidebar

Related Questions

firstly I would like to say sorry if this is a repost, onto the
Firstly I would just like to thank everyone for reading this and answering my
Firstly, I would like to say that I have tested if my link to
Firstly I would say that I have read this post however I still have
Firstly, I have to say that I am new in Wicket. I would like
Firstly, I do not have any malicious intent out of this question. I would
Firstly I would like to say that I am quite new to Spring (in
Firstly I am pretty new to C#. I would like to have an interface
Firstly, I would like to say that I don't mean the full path, what
The scenario is I would like to insert an record like this: Firstly, i

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.