This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// script.js | |
// To access the stars | |
let stars = | |
document.getElementsByClassName("star"); | |
let output = | |
document.getElementById("output"); | |
// Funtion to update rating | |
function gfg(n) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* style.css */ | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
body { | |
min-height: 50vh; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- index.html --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Star Rating</title> | |
<meta name="viewport" | |
content="width=device-width, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.App { | |
text-align: center; | |
} | |
.App-logo { | |
height: 40vmin; | |
pointer-events: none; | |
} | |
@media (prefers-reduced-motion: no-preference) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
// import logo from './logo.svg'; | |
import axios from 'axios'; //Import Axios | |
import './App.css'; | |
class App extends Component{ | |
state = { | |
text : "" | |
} | |
handleAdd = async e =>{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$serverName="localhost"; | |
$userName="root"; | |
$password=""; | |
$databaseName="react_php"; | |
$conn = mysqli_connect($serverName, $userName, $password, $databaseName); | |
$recText = $_POST['text']; | |
$query = ("INSERT INTO react_php (texts) VALUES('$recText')"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" type="text/css" href="css/fontawesome/css/all.min.css"> | |
<link rel="stylesheet" href="css/style.css"> | |
<title>3D Car Drive!</title> | |
</head> | |
<body onload="done()"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
body { | |
min-height: 100vh; | |
transition: 0.5s; | |
transition-timing-function: ease-in; |