Questions about the html form.

come across this code:

<form method=post action=http://www.baidu.com/xxx>
    <textarea name=text_a>
        phpinfo();
    </textarea>
    <input type=submit>
</form>

I have three questions here:

  1. for forms:

    <form method=post ...>   
    Can the value of the

    parameter be wrapped without quotation marks?

  2. action= http://www.baidu.com/xxx the action here is submitted directly to the outside website. What is the difference between the program and the local project in general? will the submission be unsuccessful?
  3. The
  4. PHP code is written directly inside the html tag. Why is this the case with phpinfo (); ?
May.22,2021

1.

in the early days of HTML, tags were strictly restricted, and the restrictions were completely relaxed in HTML5, that is, packages without quotation marks were allowed, because the browser would handle them automatically, and add spaces if there were spaces in them. Including non-closed tags and not actively closing, such as

  
  1. can
  2. just get the external domain API and call it directly
  3. learn about the functions of the textarea tag
Menu