I've checked to see if the data is actually sent to the next page also and that it does so I'm usure why it does not work. I've checked to make sure all the rows are the same but still can't find anything
first page:
<select name="rankname">
<?
$rankq = 'SELECT * FROM rank ORDER BY rankid ASC';
$rankquery = mysql_query($rankq);
while($rows = mysql_fetch_array($rankquery)){
$rankid = $rows['rankid'];
$rankchoice = $rows['rank'];
echo'<option value='.$rankchoice.'>'.$rankchoice.'</option>';
}?>
</select>
second page:
require ("connection.php");
require ("session.php");
$updaterank = 'UPDATE user set rank = '.$_POST['rankname'].' WHERE userid = '.$_SESSION['userid'].'';
$rankres = mysql_query($updaterank);
Database look:
rank varchar(20) latin1_general_ci No
This post has been edited by Decypher: 14 January 2010 - 06:00 PM

New Topic/Question
Reply




MultiQuote







|