Unable to connect php and html file

前端 未结 6 734
野性不改
野性不改 2021-01-29 12:53

i have added action value Registration file

  

Electronic Montessori Learning

相关标签:
6条回答
  • 2021-01-29 13:16

    You have to add connect.php as your action attribute value in your form :

    <form id="RegisterUserForm" action="connect.php" method="post">
    
    0 讨论(0)
  • 2021-01-29 13:19

    With action="" in your form, nothing gets submitted. You need to tell it to call the connect.php

    0 讨论(0)
  • 2021-01-29 13:25

    if you use the same page as action , you should copy the code in action.php on the page that contains form , or replace action="" with action="connect.php"

    0 讨论(0)
  • 2021-01-29 13:27

    Your form doesn't know where to send its data to:

    <form id="RegisterUserForm" action="" method="post">
    

    should be

    <form id="RegisterUserForm" action="connect.php" method="post">
    
    0 讨论(0)
  • 2021-01-29 13:28

    If on clicking the Register button , php code appears on the page , then most probably it has nothing to do with your code. Please check if you are directly double-clicking the html file for your testing . Please execute it by entering the localhost page address in the browser instead.

    Eg : http://localhost/registration.html

    Now the HTML should be able to execute the PHP code. And your folder containing html and php file should be in XAMPP->htdocs.

    0 讨论(0)
  • 2021-01-29 13:29

    If on clicking the Register button , php code appears on the page , then most probably it has nothing to do with your code. Please check if you are directly double-clicking the html file for your testing . Please execute it by entering the localhost page address in the browser instead.

    Eg : http://localhost/registration.html

    Now the HTML should be able to execute the PHP code.

    -ShazzDecoder

    0 讨论(0)
提交回复
热议问题