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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:23:29+00:00 2026-05-27T15:23:29+00:00

I have been writing php for quite some time and never really thought about

  • 0

I have been writing php for quite some time and never really thought about it until now but if i were to just use a raw post variable in an if statement does it have the slightest chance of being harmful? or is it only harmful in mail,mysql or file strings?

  • 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-27T15:23:30+00:00Added an answer on May 27, 2026 at 3:23 pm

    No. A string in itself is not harmful unless there’s a bug in PHP.

    Strings can be harmful if you make specific assumptions about the data and use it in sensitive processes without validating them. Think about values you insert in SQL statements, file names, fragments used in eval (which you should never use anyway)…

    You could basically say that these strings are all executed or used in an execution in some way.
    If you get input from a user, and use that input without validation in those situations, you’re at risk. 

    Inside an if statement (I assume you’re talking about a string comparison, like if (userInput === 'whatever')) this is not a problem at all. In this case, you’re only comparing data and nothing gets executed.

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

Sidebar

Related Questions

I've been writing PHP for about six years now and have got to a
I've been writing PHP web applications for some time, and have come across very
I have been pondering writing this question for quite some time. I work for
I have been writing web applications for quite sometime in PHP with MySQL. I
I have been writing C++ Console/CMD-line applications for about a year now and would
I am not really familiar with Joomla but I have been tasked with writing
I have been programming in PHP and C# for a long time, but I
I have been writing articles on the wordpress.com blog , now I am looking
I have been writing some code that creates a generic blog. Its features are
I've been writing some code for PHP 5.3, and I wanted to do something

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.