Jump to content

php form handler problem


erekthebug

Recommended Posts

I have a simple form on an html page. The collected information should then be e-mailed using a php form handler. I am a designer, not a coder...I cobbled this php together from somewhere. I have no idea why it's not working. Can someone please take a look and help...? I have uploaded the html page and the php page as well...formsend.phprequest.html

Link to comment
Share on other sites

 

 

I have no idea why it's not working. 

What do you mean by this? What are expecting the formsend.php to do? What is happening when you submit the form. Any errors shown? Where are you running formsend.php? What have done to try and solve the problem?

Edited by Ch0cu3r
Link to comment
Share on other sites

Change this line

if ((!$email))

to

if (!isset($_POST['email']))

This may prevent the All fields required message from showing but it is not checking if all form fields are filled in to your requirements, such as making sure their entered email address is an email address, phone number is in the valid format etc. You need to check each posted value individually and validate each input and make sure it is safe to use. This is called form validation. There are many tutorials that cover this.

Edited by Ch0cu3r
Link to comment
Share on other sites

Change this line

if ((!$email))

to

if (!isset($_POST['email']))

This may prevent the All fields required message from showing but it is not checking if all form fields are filled in to your requirements, such as making sure their entered email address is an email address, phone number is in the valid format etc. You need to check each posted value individually and validate each input and make sure it is safe to use. This is called form validation. There are many tutorials that cover this.

Now we're making progress. It delivered the e-mail...but I only got the e-mail address mailed to me. How do I validate the individual input fields...?

Link to comment
Share on other sites

 

 

I'm running Dreamweaver CS6...do I have that validation filter capability...?

I have no idea? Dreamweaver is good for HTML/CSS etc but when it comes to php code just no. It can do something for you but the code it injects is bloated, not required and makes debugging the php code difficult when the code doesn't work.

 

If you want to code in php click the code/source tab and start coding, dont expect the editor to do everything for you. Stay way from design view when programming your php script.

 

Read the tutorials above, learn the code and try to implement to your script. You'll learn to code much better this way.

Edited by Ch0cu3r
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.