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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:36:35+00:00 2026-05-27T23:36:35+00:00

I am trying my hand at creating an HTML5 form styled with CSS3. However,

  • 0

I am trying my hand at creating an HTML5 form styled with CSS3. However, in the past, I have only used form building tools that generate the PHP action code. I have found such varied examples online, that I want to ask here if someone can give me an example of simple, clean and valid PHP for a ‘post’ method.

I am going to take advantage of the HTML5 ‘input’ types and attributes, so I would like for the PHP to simply take the data (already validated by the browser through HTML5) and send it to me by email and then display a success message on the website for the sender. Thank you.

Edit: What I am asking for is the code for the PHP file that the form will point to for processing. I know how to do the HTML and CSS, but would appreciate an example of the PHP code to complete the actions I mention above.

  • 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-05-27T23:36:36+00:00Added an answer on May 27, 2026 at 11:36 pm

    It seems you are confusing html5 with css3 with php. They are all separate technologies that are used together. A form is just a form. You submit it and your php processes it. You need to read about post and get processing in php. For the html side you just submit a form and specify which of the two methods (get or post) you want to use

    <!-- none of this has anything to do with html5 or css3 -->
    <!-- for method specify POST or GET -->
    <form method="POST" action="blah.php" >
       <input type="text" name="foo" value="hello world" />
       <input type="submit" value="Submit" />
    </form>
    
    //receive the form data in php and do something with it
    <?php  $blah = $_POST['foo']; //returns hello world ?>
    

    Handling emailing stuff to yourself is whole other can of worms. Get this down first and then ask that part in a new SO question.

    Update – based on update to question by OP

    The two things you are looking for are pretty simple. First create a php file that the form submits to. In my example above I chose blah.php. There you can query the global variable $_POST[]. This variable will contain a hash for each input name and input value. In the example above these are foo and hello world.

    $message .= $_POST['foo'];
    

    You can then use the php mail method to send an email to yourself.

    mail('me@site.com', 'Subject', $message);
    

    And finally whatever you echo out will be returned to the user

    echo 'this is blah.php. Thank you for submitting a form!';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying my hand at creating a remote shell in C for
I've been curious in the past few months in trying my hand at doing
I'm trying to make a function that will take short hand hex color to
I'm trying my hand at creating a session which stores member information which the
Trying my hand at java and android and have run into a problem which
I am trying my hand at developing a Wordpress theme, however I seem to
I am trying my hand at writing test cases. From what I have read,
New programmer here with only some minor Java experience trying my hand at writing
I am just trying my hand at some WinForm Applications and was creating a
I'm trying my hand in asp.net. I have a dropdown list in my page.There's

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.