Front-end HTML and PHP+MySQL connection
忧伤的大白兔
忧伤的大白兔 2021-02-18 17:21:27
0
8
1112

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

忧伤的大白兔
忧伤的大白兔

reply all(5)
进击的蜗牛

<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

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

PHP does not need to be referenced like js.

  • reply You are directly using action to link, right? I never noticed it.
    忧伤的大白兔 author 2021-02-21 14:31:07
秦皇乄少(已开举报双封)

Have you submitted the form? submit

平安一生

Why use javascript to quote

忧伤的大白兔

I compared the codes of teachers

  • reply I don't know how your teacher implements it. The common method is to use a form or ajax to submit data to php.
    云上屹立君 author 2021-03-05 09:47:18
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template