Hi, I would like to create a form using php that would submit information to a mysql database. I was wondering if anyone has tips on how I should secure the form so that I do not get spammed with entries into the database. Your advice would be greatly appreciated.
jdmml
0
Newbie Poster
Recommended Answers
Jump to PostI have an idea: Make it so that a user can only add one item each time they visit the website or clear their cookies. Here's some code:
<?php session_start(); if ($_SESSION['spamcheck']) { die('You have already submitted data to this database!'); // Or put whatever you like …
All 4 Replies
Sp!ke
13
Light Poster
Troy
commented:
Helpful post with high-quality code example and comments.
+1
Troy
35
Posting Whiz
jdmml
0
Newbie Poster
Sp!ke
13
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.