Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Begginner - I need some help

$
0
0

Hello PHPFreaks.
 
First time here and ive been trying to check through the forums for some help. But i cant seem to figure it out.
Whatever, lets get to the point.
 
Im running a webpage for LAN events. And i have the feature that you can upload profile images. (but i have to accept these).
 
And when im accepting them, it turns like this.
 

Warning: rename(/user/user_bilder/1_1.jpg,1.jpg) [function.rename]: No such file or directory in /home/winglans/public_html/admin/acceptera_avatar.php on line 22

 
The code on line 22 is:

 

rename('/user/user_bilder/'.$_GET['fil'].'', ''.$_GET['uid'].'.'.$format.'');

 

The pictures should be saved at '/user/user_bilder/.

 

Code closeby:

 

if(isset($_GET['accept'])) {

$query = mysql_query("delete from bild_upload where bID = '".$_GET['bid']."'");
 
$format = "jpg";
 
rename('/user/user_bilder/'.$_GET['fil'].'', ''.$_GET['uid'].'.'.$format.'');
 
$laggTill = "INSERT INTO user_meddelande (`from_id`, `to_id`, `from_nick`, `to_nick`, `ip`, `date`, `tid`, `titel`, `meddelande`) VALUES ('".$_SESSION['lan_uid']."','".$_GET['uid']."','Bild accepterings system','".$_GET['user']."','".$_SERVER['REMOTE_ADDR']."','" .date("d/m-y"). "','" .date("H:i:s"). "','Bild accepterad/nekad','Din bild har blivit accepterad')";
mysql_query($laggTill) or die(mysql_error());

 

I got some more stuff ill probably be posting later, thanks for reading my thread and helping/trying.

 

Best Regards

Tobias


Viewing all articles
Browse latest Browse all 13200

Trending Articles