Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if(!isset($_SESSION['userName']))
- {
- session_destroy();
- header("location:index.php");
- }
- if(isset($_SESSION['userName'])){
- $results=mysqli_query($con, "select * from Users where `userName` ='$userName'");
- $row = mysqli_fetch_array($result);
- $id = $row['id_cust'];
- }
- if(isset($_POST['logout']))
- {
- header("location:logout.php");
- }
- include 'database_connector.php';
- $currenttime=date("Y-m-d");
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <link href="index.css" rel="stylesheet" type="text/css" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Users Page</title>
- </head>
- <body>
- <div id="floatleft">
- <iframe src="//www.gamechanger.io/team-52c86f6d1645cf08a4c3ff43/scoreboard?g=5&p=5131254a45506d60704191af" width="728" height="90" scrolling="no" frameborder="0"></iframe>
- </div>
- <div id="signin">
- [ <a href="signup.php">Sign Up</a> ]
- [ <a href="signin.php">Sign In</a> ]
- [ <a href="logout.php">Log Out</a> ]
- </div>
- <div id="clear"></div>
- <div class="navbar">
- <ul>
- <li><a href="concerts.php" target="_self">Concert</a></li>
- <li><a href="restaurants.php" target="_self">Restaurant</a></li>
- <li><a href="sports.php" target="_self">Sports</a></li>
- <li><a href="users.php" target="_self">Users</a></li>
- <li><a href="addconcert.php" target="_self">Add Concerts</a></li>
- <li><a href="addrestaurants.php" target="_self">Add Restaurants</a></li>
- <li><a href="addsports.php" target="_self">Add Sports</a></li>
- </ul>
- </div>
- <div id="results">
- Current Sports Event you have added
- <?php echo $userName;
- ?>
- <?php
- $result=mysqli_query($con, "select * from Sports where `id_cust` = '$id'");
- echo "<table>";
- echo "<tr>
- <th>Date</th>
- <th>Event Type</th>
- <th>Team 1</th>
- <th>Team 2</th>
- <th>Place</th>
- <th>Price</th>
- <th>Delete</th>
- <th>Update</th>
- </tr>";
- while($rows=mysqli_fetch_array($result)){
- ?>
- <td><? echo $rows['date']; ?></td>
- <td><? echo $rows['event']; ?></td>
- <td><? echo $rows['Team 1']; ?></td>
- <td><? echo $rows['Team 2']; ?></td>
- <td><? echo $rows['Place']; ?></td>
- <td><? echo $rows['Price']; ?></td>
- <td align="center"><input name="checkbox[]" type="checkbox" id="checkbox[]" value="<? echo $rows['id_cust']; ?>"></td>
- <td align="center"><input name="radio[]" type="radio" value="<? echo $rows['id_cust']; ?>"></td
- }
- <?php
- }
- echo "</table>"
- ?>
- <form name="update" action="" method="post">
- <input type="submit" value="submit" name="submit" />
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement