Hey guys, The query for updating a $_POST form isn't working, instead, it goes all blank... Here is the code: <?php include 'sql/dbcon.php'; $userstuff= mysql_query("SELECT * FROM users"); while($user = mysql_fetch_array($userstuff)) { ?> <div id = users> <form> Username: <input type='text' name='Username' value='<?php echo $user[0];?>' /> Password: <input type='text' name='Password' value='<?php echo md5($user[1]);?>' /> Paypal/E-mail: <input type='text' name='Paypal' value='<?php echo $user[2];?>' /> <br /> Account Type<font size = 1>(MasterAdmin/Admin/blank for normal)</font>: <input type='text' name='AccountType' value='<?php echo $user[3];?>' /> <br /> Allow Admin to Register Users(Yes/blank): <input type='text' name='Allow' value='<?php echo $user[4];?>' /> <br /> Money: $ <input type='text' name='Money' value='<?php echo $user[5];?>' /> User ID: <input type='text' name='ID' value='<?php echo $user[6];?>' readonly='readonly'/> <br /> <input type="submit" name="Update" id="Update" value="Update" /> <input type="submit" name="Delete" id="Delete" value="Delete" /> </form> </div> <br /> <?php } if($_REQUEST['Update']) { $Username=$_POST['Username']; $Password=$_POST['Password']; $Paypal=$_POST['Paypal']; $AccountType=$_POST['AccountType']; $AllowAdmin=$_POST['Allow']; $Money=$_POST['Money']; $ID=$_POST['ID']; $query = "UPDATE users SET Username='$Username', Password='$Password', PayPal='$Paypal', Acctype='$AccountType', CreateUsers='$AllowAdmin', Money='$Money' LIMIT 1"; mysql_query($query) or die(mysql_error()); } Code (markup): I really don't know whats wrong... Thanks guys, Majo0od
put this at the top of your script. It sounds like you have error reporting disabled error_reporting(E_ALL ^ E_NOTICE); ini_set('display_errors', 1); PHP:
error is in the form tag use this <form method="post" name="frm1" action="<?php echo $_SERVER['PHP_SELF']; ?>"> Code (markup):