Following code is saved as html file:
<?php
$IP = 4;
?>
<textarea name="comments">$IP</textarea>
I want to access the value of php variable in html tags.
Example I want the value of IP to be displayed in textarea.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can execute
.htmlfiles as.phpfiles by adding a line to your.htaccessfile..AddType application/x-httpd-php .htmlAnd obviously use the
<?php echo $variableName; ?>style syntax