Announcement

Collapse
No announcement yet.

Third time lucky?

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

  • #46
    No...

    I get this error
    Parse error: syntax error, unexpected ''".str_replace("%", "", '' (T_CONSTANT_ENCAPSED_STRING) in /home/pintotou/public_html/Search/Search1.php on line 64
    EDIT

    Please note that when I tested your line I took the liberty of adding the '' around '$searchq' which was what made it work before

    ..... INSERT INTO Visitors (ID, Search) VALUES ('', "'".str_replace("%", "", '$searchq')."'")");
    Last edited by qim; 12-18-2015, 05:36 AM.

    Comment


    • #47
      I'd already factored that in

      try this code

      Code:
      $searchq = removeSpecialChars($_POST['keyword']);
      $searchq = filter_var("%{$searchq}%", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH); // Sanitize the string 
      $auditq = str_replace("%", "", $searchq);
      $mysqli->query("INSERT INTO Visitors (ID, Search) VALUES ('', '$auditq')");
      Who needs a Signature?

      Comment


      • #48
        Hi sbeynon

        Perfect!

        With this one I leave you as I am going off on holiday. No doubt, I will be back in January for more of your help!...

        Have a Good Xmas and a Very Happy New Year!

        Thank you

        Comment


        • #49


          Enjoy your holiday!

          Some of us have to sit in an office and work most of the holiday period

          Have a good 'un!
          Who needs a Signature?

          Comment

          Working...
          X