HTML ignoring php tags and print plain text issue -
hi in html document i'm including some inside 1 of divs, prints php code plain text , kind of ignores php tags. here how code it.
</form> //just html tags right before php tags <br/> <br/> <p id="hint"></p> <?php // begining of php tags form(); function form(){ print "<form method='post' action='$_server[php_self]'>"; print"<input type='text' name='species'/>"; print"<input type='submit' name='submit'/>"; print"</form>"; } echo '<div id='language_information'>'; ?> </div> <div style ="display:none;"id="about" title="how works">'
here inspect element in chrome gives me, commented , plain text
<p id="hint"></p> <!--?php form(); function form(){ print "<form method='post' action='$_server[php_self]'--> "; print" <input type="text" name="species"></input> "; print" <input type="submit" name="submit"></input>
make sure document extension should .php
not .html
.
in servers files .php
extensions parsed, if use php in html file extension should .php
Comments
Post a Comment