<?php require_once('../../config/auth.php');
include "../../config/connection.php";
$rank = $_SESSION['SESS_USER_RANK'];
if ($rank == 0){
header("location: ../../errors/606.php");
exit();
}
$custom = $_POST['name'];
$ulx = $_POST['ulx'];
$price = $_POST['price'];
$desc = $_POST['desc'];
$addrank = "INSERT INTO ranks (rank_name, rank_ulx_name, rank_price, pr_desc)
VALUES ('$custom', '$ulx', '$price', '$desc',)";
mysql_query($addrank);
header("location: ../../editranks.php");
exit();
?>
<h4>Add Custom Rank</h4>
<table class="table table-hover table-hover">
<thead>
<tr>
<th>Rank Name</th>
<th>Ulx Name</th>
<th>Price</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<form method="post" action="functions/admin/addrank.php"><tr>
<td style="width: 14%;"><input class="form-control" type="text" name="name" value=""></td>
<td style="width: 14%;"><input class="form-control" type="text" name="ulx" value=""></td>
<td style="width: 14%;"><input class="form-control" type="text" name="price" value=""></td>
<td style="width: 15%;"><input class="form-control" type="text" name="desc" value=""></td>
<td style="width: 11%;"><input class="btn btn-primary" type="submit" value="Add Rank!"></a></td>
</tr></form>
</tbody>
</table>
Right so, the code is above and when I try and add a rank, it doesn't do anything. Flat out, just refreshes the page pretty mcuh and nothing shows. I can go into PhpMyAdmin and add things manually to each catagory that is already in the database. But other than that, it doesn't work. I don't get any errors and the form does show up, but nothing happens when I send. Any help would be great, I am not an expert in MySQl/PHP so this is what I have. Thanks!