Announcement

Collapse
No announcement yet.

how to deal with a ' in a string

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to deal with a ' in a string

    For the poll hack, I have this pretty big problem:

    entering a ' in the question or options cause a mysql error, as it things the insert command in done, as ' are used to denote strings.

    How is this handled in vB, can't seem to find the code for this.

    thanks

  • #2
    You'll have to backslash it: \', this can easily be done with the php-function addslashes, eg:

    $query = addslashes($query);

    http://php.net/manual/function.addslashes.php

    [Edited by Mas*Mind on 07-07-2000 at 04:14 AM]

    Comment


    • #3
      thx

      thanks! another bug bites the dust

      Comment

      Loading...
      Working...
      X