Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6372463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:14:33+00:00 2026-05-25T01:14:33+00:00

Suppose that I have a comments form, and I want to prevent bad users

  • 0

Suppose that I have a comments form, and I want to prevent bad users from copying the form html source code , with the action attribute to use it elsewhere outside my website.

What I have to do?

I got a simple idea, But I don’t know if it’s working or not (even I don’t know what php methods to use)

The idea is to add a variable $ip in the page, this $ip is the php file (and form) location (maybe using $_SERVER[‘PHP_INFO’] or other)… then sending this variable to the add.php file with a POST method but without displaying in the html code source.

in add.php , the server will check if the ip of the page is equal to the ip adress of the server or not , then it will decide wether to add comment or kill the operation.

I hope discuss about this subject

thank you in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:14:34+00:00Added an answer on May 25, 2026 at 1:14 am

    You could do the following:

    1. Generate a unique hash.
    2. Store that hash in the session.
    3. Implement a hidden field, with the hash as value.
    4. Check the hash on the submitted page.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose that you have two huge files (several GB) that you want to concatenate
Suppose I have a Rails app that deals with Posts and Comments . A
Suppose that I have a simple form in my page like this : <form
Suppose I have a Post model which has_many Comments. I want to get the
suppose i have two tables. articles and comments. when i am selecting columns from
Suppose I have an Comment model that belongs_to a Post model. I want to
/* Suppose I have a multi-line comment with hard line-breaks * that are roughly
Suppose that I have a Java program within an IDE (Eclipse in this case).
Suppose that I have a Java class with a static method, like so: class
Suppose that I have a request handler that accepts an argument: key And let

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.