Jump to content

can someone tell me why this don't work..


corillo181

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.