Hi, i have here a upload system + a dropdown list of users you can select from DB.
The issue i want to fix is for it to display everyone username except mine, is there a way to do this? Here is my script below and thankyou!
PHP Code:
<?php if(isset($_SESSION['user'])) { //Show content for users logged in
include 'connect.php';
$result = mysql_query("SELECT * FROM members WHERE id != '" . $myId . "'"); print "<form action='process_upload.php' method='post' enctype='multipart/form-data'>\n"; print "<strong>Opponent</strong>:\n"; print "<select name =\"oppname\">\n"; while ($row = mysql_fetch_array($result)){ $oppname1 = $row['setname']; print "<option value='$oppname1'>$oppname1\n</option>"; } print "</select><br />\n";
?> <br>
<input type="hidden" name="MAX_FILE_SIZE" value="100000" /> <label for="file"><strong>Replay</strong>:</label> <input type="file" name="file" id="file" /> <br /> <input type="submit" name="Upload" value="Submit" /> <br><br> </form> <?php } else { echo "You are not allowed to do this, Please login or <u><a href='register.php'>register</a></u> an TGL account."; ?> <?php } ?>
|