no errors but not updating
Posted: Tue Jun 17, 2003 4:32 am
I have the following code and i am not getting any errors but the information it should update is not being updated.
Code: Select all
<?php
<?
if (isset($_SESSION['valid_user']))
{
echo '<p>Please change the relevant fields below and submit to update the profile for '.$_GET['select'].'</p>';
$name = $_GET['select'];
if (isset($_GET['lvledit']))
{
echo '<form method="post" action ="index.php?page=charedit">';
echo 'Level:<input type="text" name="lvlform" value="'.$_GET['lvledit'].'" style="font-size:10px;border:solid 1px;"><br />';
echo '<input type="submit" value="Update" style="font-size:10px;color:#FFFFFF;background-color:#9A0602;border: 0px;">';
echo '</form>';
if (isset($_POST['lvlform']))
{
$lvlupdate = "UPDATE characters SET level='$_POST[lvlform]' WHERE charactername='$name'";
$lvlresult = mysql_query($lvlupdate, $db_conn) or die("query [$lvlupdate] failed: ".mysql_error());
}
}
}
?>
?>