It is currently Sun May 31, 2020 4:32 pm

All times are UTC

Forum rules

Please click here to view the forum rules

Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Problem Uploading files to Database
PostPosted: Fri May 11, 2007 10:09 pm 

Joined: Thu Aug 10, 2006 6:09 pm
Posts: 16
Location: Palma de Mallorca
Hello, I'm trying to upload some files for my installation of phpbb XS2 forum to my sql database, I already do it once a while ago, but silly me, I don´t remember :oops:

pls any help, thks :lol:


 Post subject:
PostPosted: Sat Jul 07, 2007 2:33 am 

Joined: Fri May 13, 2005 10:24 am
Posts: 54
upload form:
<form id="Upload" action="upload.php" enctype="multipart/form-data" method="post">
<label for="file">File to upload:</label>
<input id="file" type="file" name="file">
<label for="submit">Press to...</label>
<input id="submit" type="submit" name="submit" value="Upload me!">

Upload page:
$errors = array(1 => 'php.ini max file size exceeded',
                2 => 'html form max file size exceeded',
                3 => 'file upload was only partial',
                4 => 'no file was attached');
    or error('the upload form is neaded');
($_FILES[$fieldname]['error'] == 0)
    or error($errors[$_FILES['file']['error']]);
    or error('not an HTTP upload');

*     now we have the file without errors we can      *
*       moveit to a new directory using the               *
*                       move_uploaded_file                     *
*         function, orif you want you could add it        *
*            to a DB if the configs already done.....     *

$my_file = fopen($_FILES['file']['tmp_name'], 'r');
$contents = fread($my_file, filesize($_FILES['file']['tmp_name']));

mysql_query("INSERT INTO DBfiles(id, name, contents)
               ."', '".str_replace("'", "\\"."'", $contents)."');");
if you want more info let me know.

 Post subject:
PostPosted: Wed Sep 26, 2007 8:22 am 

Joined: Wed Sep 26, 2007 8:01 am
Posts: 1
Hello, could you please help me, i'm a very very newbie here.

I made some file with using site builder wysiwyg web builder, and i'm so confuse how to upload it.

could you please help me where should i start.


 Post subject:
PostPosted: Wed Sep 26, 2007 10:29 am 
Support Team Member

Joined: Wed Sep 19, 2007 8:17 am
Posts: 7
You can try to use your File Manager menu, which is very easy to use, or you can try yo upload your files via the FTP protocol.

Best Regards

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ]  Moderators: KJ, fhmagic, Moderators, Support Team

All times are UTC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
100WebSpace © 2011