I'm trying to create a web-based application for stores dept. One of the pages is a basic product search. Unless I put in the exact string it does not show product details. Please help on how I can enable search even if the user misses whitespace or hyphen etc while searching?
Tried to strip out the whitespaces in the string but unable to crack it. I'm a newbie to coding and unable to understand how to go forward with this.
<title>Product Details</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
PRODUCT DETAILS SEARCH
<form method="post" action="part_details.php">
<center><input type="text" class="form-control" id= "Part_No" name="Part_No" placeholder="Please enter Part No of the spare" required="true" style='width:30em'>
<br><br>
<center> <input type="button" class="btn btn-primary" value="Display Part Details" onClick="location.href = 'part_details.php';">
</form>
<br><br><br><br><br><br>
<footer class="footer">
<center>
<p>Copyright © Track Machines . All Rights Reserved.</p>
<p>This website is developed by Shripad Saraswat</p>
</center>
</footer>
If I enter UD.22.350 to search, it gives exact output fetched from DB. But if I put in UD.22350 by chance, it shows no product found. Please help