Jump to content


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


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

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..
$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'");
$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/');

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites


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.