search

Home  >  Q&A  >  body text

Front-end HTML and PHP+MySQL connection

I make a login and registration function. (Registration function) I use

<script type="text/javascript" src="reg.php?id" in the HTML file (reg.html) =reg"></script>

<script type="text/javascript" src="reg.php"></script> (tried both)

Connect to the PHP file (reg.php), and then there is no interaction between the front and back ends during the test. When there are no code errors in the HTML file and PHP file, what is the problem? According to my own ideas, is it right? There is no trigger button written in the HTML file to trigger the code in the PHP file (meaning to get a button, click it and trigger the PHP file code effect), and is it possible that the above connection is wrong

忧伤的大白兔忧伤的大白兔1423 days ago1138

reply all(8)I'll reply

  • 进击的蜗牛

    进击的蜗牛2021-03-02 16:32:43

    <script src=""></script> This tag is used to introduce js files. The front-end and back-end data interaction can be done by writing js methods, or directly submitting the form

    reply
    0
  • 秦皇乄少(已开举报双封)

    秦皇乄少(已开举报双封)2021-02-21 02:03:52

    PHP does not need to be referenced like js.

    reply
    0
  • 忧伤的大白兔

    You are directly using action to link, right? I never noticed it.

    忧伤的大白兔 · 2021-02-21 14:31:07
  • 秦皇乄少(已开举报双封)

    秦皇乄少(已开举报双封)2021-02-21 02:02:05

    Have you submitted the form? submit

    reply
    0
  • 平安一生

    平安一生2021-02-18 20:40:39

    Why use javascript to quote

    reply
    0
  • 忧伤的大白兔

    Which one should be used?

    忧伤的大白兔 · 2021-02-20 16:28:40
  • 忧伤的大白兔

    忧伤的大白兔2021-02-18 17:21:56

    I compared the codes of teachers

    reply
    0
  • 云上屹立君

    I don't know how your teacher implements it. The common method is to use a form or ajax to submit data to php.

    云上屹立君 · 2021-03-05 09:47:18
  • Cancelreply