dov6891 2019-06-12 10:19
浏览 30

即使用户遗漏,也要搜索特定的产品详细信息。 - 等特殊字符

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 &copy 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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探