Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > General > Site Users Chat

Site Users Chat Use this forum for general chat, introductions, and to share your favourite websites.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2005-05-01, 01:56 AM
Junior Member
 
Join Date: Apr 2005
Posts: 4
Sharon
Default

I am trying to configure a script. I am trying to upload a picture. At first I wasn't able to upload because it said the permission was denied. So I changed that. Now it says uploaded picture but it's not in my database.

Here's my code. Is it the $mysql1 operator

if (move_uploaded_file($_FILES['picture']['tmp_name'], $uploaddir . $picture)) {
$size = getFileSize($uploaddir.$picture);
} else {
printMessage("Error uploading file");
}

$sql1 = "INSERT INTO `listings_pictures` ";
$sql1 .= "(`title`,`file`,`size`,`listings_id`) VALUES ";
$sql1 .= "('$title','$picture','$size','$id')";

if (@mysql_query($sql1)) {
} else {
printMessage("Error Uploading Picture (" . mysql_error() . ")");
}

}

New and confused...
Reply With Quote
  #2 (permalink)  
Old 2005-05-02, 03:24 AM
Moderator
 
Join Date: May 2004
Location: Portugal
Posts: 143
gesf is an unknown quantity at this point
Send a message via ICQ to gesf Send a message via MSN to gesf Send a message via Skype™ to gesf
Default

It seems that your query is not working.
Try taking that @ off of the mysql_query() function 'cause it supress the function erros.
__________________
Best Regards,
Gonçalo "GesF" Fontoura

Website : gesf.org
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:42 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.