Skip to content

Instantly share code, notes, and snippets.

View emmykolic's full-sized avatar

Emmanuel Okolie (Emmykolic) emmykolic

View GitHub Profile
// script.js
// To access the stars
let stars =
document.getElementsByClassName("star");
let output =
document.getElementById("output");
// Funtion to update rating
function gfg(n) {
/* style.css */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
min-height: 50vh;
@emmykolic
emmykolic / index.html
Last active September 17, 2024 10:38
<!-- index.html -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Star Rating</title>
<meta name="viewport"
content="width=device-width,
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
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 =>{
<?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')");
<!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()">
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
min-height: 100vh;
transition: 0.5s;
transition-timing-function: ease-in;