Server IP : 172.16.15.8 / Your IP : 18.118.144.98 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/wcdavis/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); ?> <head> <link rel="stylesheet" type="text/css" href="upos.css"> </head> <H2>Hire Employee Results</H2><hr> <?php $username = $_POST['username']; $password = $_POST['passwd']; $newusername = $_POST['newusername']; $newname = $_POST['newname']; $store = $_POST['storenum']; $position = $_POST['position']; if($position = 'Manager') {$priority = 3;} elseif($position = 'Consultant') {$priority = 2;} elseif($position = 'Cashier') {$priority = 1;} $host = 'localhost'; $user = 'wcdavis'; $pass = 'cs480'; $database = 'wcdavis'; $connect = mysql_connect($host, $user, $pass); $table_name = 'USERS'; if($connect) { MYSQL_select_db($database); $query = "insert into USERS values('$newusername', '$password', $store, $priority, '0', '0', '0', '0', '0', '0', '0', '0', '', '');"; //echo "$query <br>"; $result_id = mysql_query($query, $connect); if($result_id) {echo "Success! Employee $newusername has been hired at store $store.<br><br>";} else {echo "Hire not successful. Please try again.<br><br><A HREF='UposHF.php'>Back to hire page?</A>";} } ?> <hr> <br> <a href="uposdir.php"> <img src="HouseBlack.png" width="64" height="64"></a>