By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,067 Members | 864 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,067 IT Pros & Developers. It's quick & easy.

Add in * into PHP statement for MySQL search

P: 1
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.
Apr 13 '20 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.