×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

PHP validation for html form

PHP validation for html form

PHP validation for html form

(OP)
I have a html_form_send.php script that couples with my html form code.

I am mostly clueless when it comes to forms and php; I wonder if I can get some information on where to copy and paste this code in my website to make it work?

Do I copy and paste the html and php both in the <head></head>?

Or, do I post in the <body></body>?
Do I paste the php form into notepad as a stand alone script and upload it to my server?

From what I understand forms don't need <body>. I want to put this form on my contact page with a large image to the left and was confused on where to ultimately copy and paste the above information without disrupting both my layout and hoping the form works.

Also I've read online that php can be hacked easily. Is there a script that I can add to my php script to prevent this?
An encryption of sorts perhaps?

Any information would be most appreciated.
ChrissyB
Thanks so much.

RE: PHP validation for html form

Quote:

o I copy and paste the html and php both in the <head></head>?

Or, do I post in the <body></body>?
Do I paste the php form into notepad as a stand alone script and upload it to my server?
All of the above

Quote:

From what I understand forms don't need <body>.
Incorrect. the PHP to send the data doesn't but the <form> does


http://www.tizag.com/phpT/examples/formex.php

Quote:

Also I've read online that php can be hacked easily
It can't, it is the way the PHP handles the form data that can be abused.

Quote:

Is there a script that I can add to my php script to prevent this?
CAPTCHA and sanitising data (Google is your friend here)

Quote:

An encryption of sorts perhaps?
Uneccessary unless you are collecting financial or sensitive and personally identifiable information.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: PHP validation for html form

(OP)
Thanks so much for your assistance Chris. I plan to put together my form page today. It's nice to know that I have a professional such as yourself to get the very best of advise.

Chrissy

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close