Answers for "insert php in html"

PHP
1

load php in html

//Safe as:
index.html
number.php

//HTML:
<html>
   <head>
      <title>Home</title>
   </head>
   <body>
      <h1>Phone Number</h1>
      <?php include('number.php') ?>
   </body>
</html>

//PHP:
<?php
   echo 4895553268;
?>
Posted by: Guest on October-30-2020
1

inline php in html

<body>
Hello, today is <?php echo date('l, F jS, Y'); ?>.
</body>
Posted by: Guest on May-04-2020
1

insert php code

<?php
$host = "localhost";
$username = "username";
$pass = "";
$db="furniture";


// Create connection
$conn=mysqli_connect($host,$username,$pass,$db);

if(!$conn){
  die("Data connection error");
}
?>
Posted by: Guest on October-12-2020

Browse Popular Code Answers by Language