Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
A Review Page with Stars have to be added for a webpage using PHP.Frontend is PHP and Database used is PHPSQLADMIN.How to create Review page and make it dynamic

What I have tried:

<!DOCTYPE html>
<!html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Review</title>
    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Cookie">
    <link rel="stylesheet" href="assets/fonts/font-awesome.min.css">
    <link rel="stylesheet" href="assets/css/styles.css">
    <link rel="stylesheet" href="assets/css/Pretty-Footer.css">
    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<style>

.one{
text-transform:uppercase;
text-align:center;
background-color:blue;
padding:10px;

}
.navbar img{
width:100px;
}
.card-title{
background-color:blue;
color:red;
}
.gf{

height:400px;
background-color:red;
}
.leave-reply {
    float: left;
    width: 100%;
}
.input-block-level {
    display: block;
    width: 100%;
	
    min-height: 30px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.row-fluid:after {
    clear: both;
}

.card-title{
font-size:20px;
text-align:center;

}
.accordion .card-header:after {
    font-family: 'FontAwesome';  
    content: "\f068";
    float: right;
	background-color:yellow;
	color:red;
}
.accordion .card-header.collapsed:after {
    /* symbol for "collapsed" panels */
    content: "\f067"; 
}
.pain p{
color:white;
background-color:black;
font-size:25px;
}
.pain img{
width:100%;
height:300px;

}

.express{
background-color:lightblue;
}
.card {
    /* Add shadows to create the "card" effect */
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    transition: 0.3s;
}

/* On mouse-over, add a deeper shadow */
.card:hover {
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

/* Add some padding inside the card container */
.container {
    padding: 2px 16px;
}
.checked {
    color: orange;
}
.rating {
  unicode-bidi: bidi-override;
  direction: rtl;
}
.rating > span {
  display: inline-block;
  position: relative;
  width: 1.1em;
}
.rating > span:hover:before,
.rating > span:hover ~ span:before {
   content: "\2605";
   position: absolute;
}
.quotation{
border:2px solid red;

}
.quotation p{
text-align:justify;
color:black;
font-size:30px;
font-family: 'Lato', sans-serif;
}
.video{
border:2px solid blue;
}
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    height:500px;
}

/* The Close Button */
.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
.softskill{

background-color:blue;

}
.softskill h1{
color:red;
}
.softskill p{
text-align:justify;
text-transform:capitalize;
font-family:verdana;
font-size:20px;
color:white;


}
.hero{
background-image:url("assets/img/city_bg.jpg");

}

.onnn img{

width:35%;
}
.footer1{

background-color :#444141;
}
.footer1 p{
color:black;
}
.footer-contacts p a {
   color: #f5f5f5;
   text-decoration: none;
}
.footer about{
color:black;

}
.footer1 p h3 {
   color:white;
}
.footer1 p {
   color: #f5f5f5;
}
.blog{
    box-sizing:border-box;
    border:2px solid blue;
    margin-top: 40PX;
}
blog h1{
    font-size: 40px;
}
.blog p{
    text-align: justify;
    color: blue;
}

div.stars {
  width: 270px;
  display: inline-block;
}

input.star { display: none; }

label.star {
  float: right;
  padding: 10px;
  font-size: 36px;
  color: #444;
  transition: all .2s;
}

input.star:checked ~ label.star:before {
  content: '\f005';
  color: #FD4;
  transition: all .25s;
}

input.star-5:checked ~ label.star:before {
  color: #FE7;
  text-shadow: 0 0 20px #952;
}

input.star-1:checked ~ label.star:before { color: #F62; }

label.star:hover { transform:  scale(1.3); }

label.star:before {
  content: '\f006';
  font-family: FontAwesome;
}

button {
  display: inline-block;
  padding: 15px 25px;
  font-size: 24px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  outline: none;
  color: #fff;
  background-color: black;
  border: none;
  border-radius: 15px;
  box-shadow: 0 9px #999;
}

.button:hover {background-color: #3e8e41}

.button:active {
  background-color: #3e8e41;
  box-shadow: 0 5px #666;
  transform: translateY(4px);
}
.timer{
    box-sizing:border-box;
    border:2px solid blue;
}
</style>
<body>
<?php require 'first.php'?>


	<div class="jumbotron jumbotron-fluid">
            
<div class="container-fluid">
<div class="container">
    <div class="col-md-12">
    
    <div class="col-md-8 blog">
       
      
       <h1>About Counsellor</h1>
       <p style="text-align: justify;">Veena Ramu founder of SanMarga is a Certified Career Counsellor
        cum Career Coach  through INTERNATIONAL SCHOOL OF COUNSELLING AND HEALING STUDIES and a Professional Life Coach 
        accredited from Transformation Academy having over 3+ years of Counselling experience.<br> 
        She specializes in Career Consulting and Coaching, Emotional wellness,Life skills and Education supports.
       With a passion to serve students and corporate professionals in aspiring a successful career with proper guidance and support. 
       She puts into use her Knowledge of real time experience along with the application of scientific tested methods 
       to steer an aspirant towards a career which he/she is best suited to succeed,not only in materialistic context ,
       but in the context of deriving maximum happiness and satisfaction out of it. <br>
       check out my blog Learnvise to learn more about latest updates in Career trends and Career development.</p> 
       </div>
               <div class="col-md-4">
                   
                   <h2>class="fa fa-share-alt" style="font-size: 24px" href="https://www.facebook.com/"></a><a href="#">^__em class="fa fa-github"></a></div>
                   <div class="timer">
                   <h2>^__em class="fa fa-clock-o" aria-hidden="true"> Timings:</h2>
        <ul class="available-list">
            <li>Sun  :  <span>off</span></li>
            <li>Mon :  <span>9:00 AM to 6:00 PM</span></li>
            <li>Tue  :  <span>9:00 AM to 6:00 PM</span></li>
            <li>Wed :  <span>9:00 AM to 6:00 PM</span></li>
            <li>Thur :  <span>9:00 AM to 6:00 PM</span></li>
            <li>Fri    :  <span>9:00 AM to 6:00 PM</span></li>
            <li>Sat    :  <span>off</span></li>               
        </ul>
                           </div>
                   
                          
 
                   <h2>^__em class="fa fa-pencil" aria-hidden="true"> Write Your Review:</h2>
                   <form action="post2.php" method="post">
                   <div class="elem-group">
                 <h3><label for="name">Name:</label></h3>
                 <input type="text" id="Name" name="Name"  pattern=[A-Z\a-z]{3,20} required>
               </div>
               
               
               <div class="elem-group">
 
                 <h3><label for="message">Write Review:</label></h3>
                 <textarea id="writereview" name="writereview" required></textarea>
               </div>
               
               <div class="elem-group">
                 <h3><label for="name">Phone Number:</label></h3>
                 <input type="int" id="PhoneNumber" name="PhoneNumber"  pattern={0,9} required>
               </div>
               
                <div class="stars"> 
                 
                   <h3><label for="name">Give Rating:</label></h3>
                   <input class="star star-5" id="star-5" type="radio" value="1" name="star"/>
                   <label class="star star-5" for="star-5"></label>
                   <input class="star star-4" id="star-4" type="radio" value= "2" name="star"/>
                   <label class="star star-4" for="star-4"></label>
                   <input class="star star-3" id="star-3" type="radio" value="3" name="star"/>
                   <label class="star star-3" for="star-3"></label>
                   <input class="star star-2" id="star-2" type="radio"value="4" name="star"/>
                   <label class="star star-2" for="star-2"></label>
                   <input class="star star-1" id="star-1" type="radio" value="5" name="star"/>
                   <label class="star star-1" for="star-1"></label>
                    </div><br> 
                    <input type="submit" value=submit>
                   </form>
               </div>
           </div>
</div>
</div>

	
	
</div>
	
<div class="container-fluid footer1">
    <div class="row">
        <div class="col-md-4 col-sm-6 footer-navigation ">
            <h3><a href="#"><img src="assets/img/milestone.png"alt="milestone"></a></h3>
            <p class="links"><a href="index.php">Home</a> · <a href="#">Blog</a> · <a href="companies.php">Companies</a> · <a href="About.php">About</a> · <a href="#">Faq</a> · <a href="Contact.php">Contact</a></p>
            <p class="company-name">Milestone © 2020</p>
        </div>
        <div class="col-md-4 col-sm-6 footer-contacts">
            <div> 
                <p><a href="https://goo.gl/maps/Ka6ifXj4WUm">IndiraNagar  100 feet road, BANGALORE</a></p>
            </div>
            <div>class="fa fa-phone footer-contacts-icon" href="https://www.gmail.com/" target="_blank"></a><a href="#">^__em class="fa fa-twitter"></a><a href="#">^__em class="fa fa-linkedin"></a><a href="#">^__em class="fa fa-github"></a></div>
        </div>
    </div>
    <div class ="row">
    <div class="col-md-12 col-sm-12 one">
    <p>@2020 Copyright Powered by Milestone</p>
    </div>
    </div>

    <script src="assets/js/jquery.min.js"></script>
    <script src="assets/bootstrap/js/bootstrap.min.js"></script>
	<script>
// Get the modal
var modal = document.getElementById('myModal');

// Get the button that opens the modal
var btn = document.getElementById("myBtn");

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];

// When the user clicks the button, open the modal 
btn.onclick = function() {
    modal.style.display = "block";
}

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
    modal.style.display = "none";
}

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
}
</script>

</body>

</html>
Posted

1 solution

 
Share this answer
 
Comments
kokilag 14-Mar-22 8:19am    
Thanks..will surely try..Will this code work on server side..as few will work in localhost but not on server

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900