Jump to content
wldwmn64

Form question to include HTML & PHP code. I get email, but it doesn't have user input from website

Recommended Posts

The PHP code sends me an email from the server, but the user input is empty or "blank". I only receive: "From: \ Email: \ Subject: \ Message: " and that's it.

How do I fix my PHP and/or HTML code to receive user input from the form? Attached is my existing HTML and PHP code that doesn't send me any "user input" from the form.

Thanks to anyone who can help!!

PHP.png

HTML.png

Share this post


Link to post
Share on other sites

In your form, your form element name= parameters need to match the $_POST[] variable names.  They don't match.  

For example:  <input type="text"... name="Name">  and $_POST['name'].  The form element name should be name="name".

 

Share this post


Link to post
Share on other sites

Also, if you submit the form and see the form data in the URL, that means it isn't being sent to the server the right way...

Share this post


Link to post
Share on other sites
4 hours ago, requinix said:

Also, if you submit the form and see the form data in the URL, that means it isn't being sent to the server the right way...

Yeah I missed that key point as well.  Your form tag needs to specify method="post"!

 

<form method="post" target=...etc >

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.