I am new with php and I was wondering how can I add css to my php code? I basically want to do form handling using php.So I want to collect the username and email and display it as soon as the user hits submit.But how can I render the text on php page using different colors or change its css styles? For example if I want my 'id:fullname' to render in red color.How can I do it??
I googled it but didn't got a clear answer.
CSS I want to add:
#fullname{
color: red;
}
My html code:
<!-- language: lang-html -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sign Up!</title>
<!-- FONT AWESOME -->
<script src="https://kit.fontawesome.com/887e6e97bd.js" crossorigin="anonymous"></script>
<!-- CSS STYLESHEET -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<!-- FONTS -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@900&family=Ubuntu:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" href=" css/login.css ">
</head>
<body>
<div class="container" id="container">
<div class="form-container sign-in-container">
<form id="signupform" action="sign.php" method="post">
<h1 style="font-weight: bold; margin: 0;">Create Account</h1>
<div class="social-container">
<a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
<a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
</div>
<span>or use your email for registration</span>
<input id="fullname" type="text" placeholder="Name" name="fullname" />
<input id="emailid" type="email" placeholder="Email" name="emailid" />
<input id="password" type="password" placeholder="Password" name="password" />
<input id="cpassword" type="password" placeholder=" Confirm Password" name="cpassword" />
<button id="signbutton">Sign Up</button>
<a style="color: #000000" href="login.html">Already have an account?</a>
</form>
</div>
</div>
</div>
<script src="s.js" charset="utf-8"></script>
<footer id="footer">
<p>© Copyright 2020 Foodzie</p>
</footer>
</html>
<!-- end snippet -->
this is my php code:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<style>
<?php include 'CSS/styles.css'; ?>
</style>
<body>
Welcome to Foodzie!!<?php echo $_POST["fullname"]; ?><br>
Your email address is: <?php echo $_POST["emailid"]; ?>
</body>
</html>
Your email address is: – Khushi Zawar Oct 26 '20 at 08:37
Your email address is: `. – Snake14 Oct 26 '20 at 19:18