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] Link to comment https://forums.phpfreaks.com/topic/9274-can-someone-tell-me-why-this-dont-work/ 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. Link to comment https://forums.phpfreaks.com/topic/9274-can-someone-tell-me-why-this-dont-work/#findComment-34176 Share on other sites More sharing options...
corillo181 Posted May 8, 2006 Author Share Posted May 8, 2006 damn ! thanx.. Link to comment https://forums.phpfreaks.com/topic/9274-can-someone-tell-me-why-this-dont-work/#findComment-34229 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.