Skip to content

Instantly share code, notes, and snippets.

View lukxxx's full-sized avatar
🎯
Focusing

lukxxx

🎯
Focusing
  • Slovakia
View GitHub Profile
@lukxxx
lukxxx / results.php
Last active December 6, 2020 18:16
PHP PDO not returning anything if value isn't %
<?php
$error = "";
if(isset($_POST['submit'])){
if(empty($_POST['A1'])){ $a1 = ""; } else { $a1 = '(^|,)A1(,|$)'; }
if(empty($_POST['A2'])){ $a2 = ""; } else { $a2 = '(^|,)A2(,|$)'; }
if(empty($_POST['A'])){ $a = ""; } else { $a = '(^|,)A(,|$)'; }
if(empty($_POST['B1'])){ $b1 = ""; } else { $b1 = '(^|,)B1(,|$)'; }