What to do if php placeholder cannot be used

藏色散人
Release: 2023-03-09 13:42:01
Original
1937 people have browsed it

php placeholder cannot be used because of a code error. The solution is: first open the corresponding code file; then change "placeholder "Your name here"" to "placeholder="Your name here"" that is Can.

What to do if php placeholder cannot be used

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

Error code:

<form role="search" method="get" id="searchform" class="searchform" action="<?php echo esc_url(home_url(&#39;/&#39;)); ?>">
  <input type="search" class="search rm-input" value="<?php echo get_search_query(); ?>" name="s" id="s" placeholder "Your name here"/>
  <input type="submit" style="display:none" id="searchsubmit" value="<?php echo esc_attr_x(&#39;Search&#39;, &#39;submit button&#39;); ?>" /></form>
Copy after login

I don't know why the placeholder text is not showing in the field...

Workaround:

The missing "=" in the code should be:

placeholder="Your name here"
Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if php placeholder cannot be used. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template