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 4086364
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:42:58+00:00 2026-05-20T18:42:58+00:00

i am into php coding for 1 year now. i don’t know everything or

  • 0

i am into php coding for 1 year now. i don’t know everything or consider myself professional.but i want to write clean hacker proof coding. i tried to research for example how to stop XSS attacks.but it seems that there is a lot of expressions and a lot of vulnerabilities. i tried htmlawed and html purifiers. but not every simple form or script i write will need heavy script to make it secure. so what i need is : is there a coding style that i can follow that make my coding secure?

  • 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-20T18:42:58+00:00Added an answer on May 20, 2026 at 6:42 pm

    Basically, to avoid XSS, you have to make sure no HTML can be injected by the users into the HTML output of your page.

    The simplest way of doing that is to use functions such as htmlspecialchars() on any output that goes to the browser as HTML.

    This means that, if anyone inputs something like this *(simple example)* :

    <script>alert('plop');</script>
    

    The HTML of your page will contain :

    &lt;script&gt;alert('plop');&lt;/script&gt;
    

    And no HTML / Javascript code that could be interpreted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a clear button that I want to tie into some php coding.
I know we can get some path with <?php bloginfo('something');?> into php files, but
I'm slowly getting back into PHP, and now I run into a problem, I
I want to store the data returned by $_SERVER[REMOTE_ADDR] in PHP into a DB
In PHP, I want to read a file into a variable and process the
I have historically used a monolithic approach to PHP coding. That is, I write
I'm currently coding a CMS in PHP in order to get back into PHP
I've been coding websites for a couple of years now, mostly in php and
I love getting myself into these ridiculous situations where I over-evaluate my coding practices,
I've been studying php for about 6 months now and want to start learning

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.