Add in * into PHP statement for MySQL search

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zhair
    New Member
    • Apr 2020
    • 1

    Add in * into PHP statement for MySQL search

    When I try to add in a * into a $... Statement it throws errors. This is going to be a search function for mysql.

    <?php $page = *; >? So, basically there is a PHP form which will search my SQL with the values entered. I got it working so that it searches from the https://100001.onl/ values entered but I just can't have it search all fields if there is nothing entered into the database. I have if else statements written the check if it's empty and applies a value to search for all items, and that is where I have the $page statement. I just need it so that it will add in an asterisk without throwing errors.
Working...