🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

How to Create & Display dynamic HTML content using CSS challenge in PHP?

In this blog, I am going to explain How to Generate dynamic HTML content using CSS challenge in PHP. So, before you create a page which extension should be .php file.


In this form, I am using basic HTML & CSS for form design and attractive, and for output, I am using Switch Statement with “POST” method.

<!DOCTYPE html>
<html>
<head>
<title>Generate dyanamic HTML content using CSS challenge in PHP</title>
</head>
<style type="text/css">
p{
color:blue;
}
</style>
<body>
<form method="POST" width="80%" style="padding:1% 15%; border:2px solid black; margin:2% 30%;">
<p>Name : <input type="text" name="name"></p>
<p>Email : <input type="text" name="email"></p>
<p>Phone : <input type="number" name="phone"></p>
<p>Message</p> <textarea name="message" rows="4" cols="28"></textarea> <br>
<input style="background-color:green; color:white; border:1px solid green; padding: 5%;" value="submit" type="submit" name="submit"><br><br>
</form>
<p style="border:2px solid green; padding: 1% 15% ; margin:2% 30%;">
<?php
if(isset($_POST['submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
echo $name .'<br>';
echo $email .'<br>';
echo $phone .'<br>';
echo $message .'<br>';
}
?>
</p>
</body>
</html>

Output-
This is a blank form in HTML with CSS.

Result-
After that when you submit this form then show result as shown below with the help for PHP.

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.