dongzhuanlei0768 2015-04-08 16:24
浏览 32

搜索续集数据库的基本搜索功能

I'm a beginner programmer that wants to create a basic search bar that searches my Sequel database. So far I created a search bar in my HTML document: (I'm using Materialize)

<nav>
  <div class="nav-wrapper">
    <form method="post">
      <div class="input-field">
        <div class="valign-wrapper">
          <div class="valign" style="width:100%;">
            <input type="text" name="search" placeholder="Search" required>
            <label for="search"><i class="mdi-action-search"></i></label>
            <input type="submit" value="Search"/>
          </div>
        </div>
      </div>
    </form>
  </div>
</nav>

I want to have it so this search bar will search my database and then display the information instantly below on the same page. I have searched online and found that one can do this through using PHP. Is there any other way of creating this search bar other than using a PHP document?

If not, I looked under the PHP documentation to try and download it. How can I download it using a Mac and Terminal? Then where within a RubyMine project would my PHP document go within (a public directory, views directory, etc)?

  • 写回答

1条回答 默认 最新

  • dongliechuich10319 2015-04-08 16:38
    关注

    There are lots of ways other than PHP to do this. It's really about preference.

    Some of your choices are PHP(duh), Ruby, Python, C# and Javascript.

    Installing PHP is relatively easy on a Mac.

    The thing is with running PHP is that it's a Server-Side language, which means that you need a server to process the files before you can view it in your browser.

    This may be different from how you are viewing your website right now(I'm guessing you're just opening the files in your browser of choice).

    Have a look at MAMP.

    RubyMine is an IDE, which means that it's primary use is just for you to code in. As long as you create a project in the folder where your HTML and PHP reside you will be fine.

    Using RubyMine is in now way exclusive to coding and you could use a texteditor if you wanted too.

    As for the part about a search feature on your website; I suggest you do some googling on "PHP MySQL search" and choose a tutorial/guide of your choosing.

    评论

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用