corillo181 Posted May 7, 2006 Share Posted May 7, 2006 if the person got a record this supost to change it if they cahng eit but instead it just puts a new one..[code]$checkpic=mysql_query("SELECT * FROM userpic where username='$actuser' LIMIT 1")or die(mysql_error());if($check > 0){$update=mysql_query("UPDATE userpic SET name='$filename',username='$actuser',datetime='$datetime', size='$filesize', type='$filetype', path='$filepath' WHERE username='$actuser'");}elseif($check<=0){$sql2=mysql_query("INSERT INTO userpic (name,username,datetime, size, type, path)VALUES('$filename','$actuser','$datetime','$filesize', '$filetype', '$filepath')");header('Location: http://www.travesurahouse.com/testphp/');}}?>[/code] Quote Link to comment Share on other sites More sharing options...
AndyB Posted May 7, 2006 Share Posted May 7, 2006 Looking at the code, I'd say it's because the test if ($check > 0) fails. Take a look at where $check is determined and if/how it gets to this script. Quote Link to comment Share on other sites More sharing options...
corillo181 Posted May 8, 2006 Author Share Posted May 8, 2006 damn ! thanx.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.