Jump to content

Recommended Posts

 <input type="text" size="35" name="search" id="search" style="text-align: center"/>

 

i have the above in a form. is the below code enough to prevent stuff like spam-bombs etc

 

$search = mysql_real_escape_string($_POST['search']);

 

 

if any better suggestions please let me know.

 

 

Link to comment
https://forums.phpfreaks.com/topic/195548-htmlhack-prevention-search-bar/
Share on other sites

i have a time limit between each post.

How are you storing and checking if a post is within a certain amount of time from the previous post?

 

Edit: and if this is a search form, how are you identifying which visitor each post comes from?

i checked phpmyadmin.. and it seemed a spambomb which generated 1000 replies , causes 1000 rows.  what would you recommend to prevent this?  i have a time limit between each post.

 

Like Thorpe said, you need to validate all incoming data.  Running data through an escape (like mysql_real_escape_string) should be the last step before database insertion.

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.