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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:41:37+00:00 2026-05-22T22:41:37+00:00

I am coding for an Intranet. In theory, I don’t have to worry too

  • 0

I am coding for an Intranet. In theory, I don’t have to worry too much about SQL injection (I can see you throwing up your hands in horror already 😉 It’s not really a secure app & doesn’t have any “secret stuff”.

I’m more concerned about storing and retrieving strings which contain quotes.

It has to use ODBC function (order from on high).

1) is it enough to addslashes() when executing commands and stripslashes() when retrieving them?

2) I am aware of which input might contain quotes & which not (e.g, some form input field require number input an are validated, so, if they are going to be written to the d/b, they are known to be free of quotes)

However, I do have central functions to OdbcExec() and to odbc_fetch_row() and then extract the value of a named column.

Is there any reason why I should nod add/strip-slashes in those?

If you can make it a bit securer while still using OSBC functions then by all means do so. My main concern at this early stage in development is to prevent crashes when entering strings containing quotes. 1 or 2 central functions seem best to me, but maybe you knwo better.

Thanks for clarifying

  • 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-22T22:41:38+00:00Added an answer on May 22, 2026 at 10:41 pm

    Use parameterized queries / statements. The odbc prepare and execute functionality provides you this feature like so:

    <?php
      $a = $_GET['a'];
      $stmt = odbc_prepare($db_conn, "SELECT b FROM c WHERE a=?");
      $res = odbc_execute($stmt, array($a));
    ?>
    

    There is some limitation with regards to parameters that begin and end /w single quotes, see here:

    http://php.net/manual/en/function.odbc-execute.php

    Validate input as best you can prior to putting it in the DB, and use parameterized queries and you’ll be in business.

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

Sidebar

Related Questions

We have a intranet site that runs on Drupal. If an employee hits the
Coding Language: C# Framework: .NET We have built a software, which among many other
i am coding a pretty large intranet based web system that needs to support
I have created a small survey web page on our company Intranet. This web
I have a contract in the offering from a client to develop an intranet
Coding standards in place mean I do not have an option of using ajax
Coding in ASP.NET 4.0 / javascript/ jQuery/ WebServices The Scenario I have an analytics
When coding up Ajax calls in ASP.Net MVC we have a lot of options
Do coding this way pose any security risks? $test = $_GET['test']; if($test) { $sql
Coding Platform: ASP.NET 4.0 WebForms with C# We have a website with the existing

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.