Server IP : 172.16.15.8 / Your IP : 18.224.56.127 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/bdstamour/www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); if (isset($_SESSION['username'])) { ?> <HTML> <HEAD> <TITLE>FirstStep </TITLE><link rel="stylesheet" type="text/css" href="research.css"> </HEAD><BODY> <CENTER> <H2> My Interests </H2><HR><Form action=MyInterestsAction.php method=post><p> <?php $host = 'localhost'; $user = 'bdstamour'; $passw = 'cs480'; $database = 'bdstamour'; $connect = mysqli_connect($host, $user, $passw); mysqli_select_db($connect, $database); $usernamesesh = $_SESSION['username']; $query = "select id from FirstStep2 where username='$usernamesesh'"; $UserArray = mysqli_fetch_array(mysqli_query($connect, $query)) or die(mysqli_error($connect)); $UserID = $UserArray[0]; $query = "select Interest from Interests where UserID='$UserID'"; $result = mysqli_query($connect, $query) or die(mysqli_error($connect)); if(mysqli_num_rows($result) == 0) { print "You have not selected any interests at this time."; } else { print '<table border=1>'; print '<th>Interest<th>Remove Interest?'; while($row = mysqli_fetch_row($result)) { print "<tr>"; foreach($row as $field) { print "<td>$field</td>"; } print "<td><input type=checkbox name=interestsremove[] value='$row[0]'>Remove</td>"; print "</tr>"; print "<p>"; } ?> <p><p><p> </table><p> <INPUT type=submit value=Submit> <INPUT type=reset value=Reset> <?php } ?> <?php } else { ?> <CENTER> <?php print "You are not logged in. Please <A HREF=FirstStepIndex.php>login.</A><p>"; print "<A HREF=NewUser.php>Not registered? Let's get started!</A><p>"; } ?> <HR> <?php include("date.php"); ?> </HTML> </CENTER> </BODY>