PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 26th, 2012, 11:09 PM
Qyla21 Qyla21 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 1 Qyla21 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 17 sec
Reputation Power: 0
Create a folder on database for particular user

hi!i need your help.Here are my question. i need to create a folder for that particular user and store the .pdf file inside, means different user for different folders.and inside the folder.i really need full coding.please help me!!

here is my coding:

in php:
PHP Code:
<?php /* VIEW.PHP Displays all data from 'upload' table */ session_start(); if ($_SESSION['password']) echo "<div style='font-family: Times New Roman; font-size: 18px; border: 1px solid #43A5EC; background: #F0F0F0; padding: 10px;'>"."Selamat Datang ke Sistem PBPaySlip Ruangan Admin"."<b>!</b>"; else die("<div style='font-family: Verdana; font-size: 12px;>"."You must be logged in!"."</div>"); echo " | "."<a href='http://localhost/PBpayslip/view-paginated.php'>View Payroll here</a> | "."<a href='http://localhost/PBpayslip/uploadpenyatagaji.php'>Upload Staff's Payroll Here</a> | <a href='logout.php'>Logout<a/>"."</div>"?> <?php if(isset($_POST['upload']) && $_FILES['userfile']['size'] > 0) { $fileName $_FILES['userfile']['name']; $tmpName $_FILES['userfile']['tmp_name']; $fileSize $_FILES['userfile']['size']; $fileType $_FILES['userfile']['type']; $fp fopen($tmpName'r'); $content fread($fpfilesize($tmpName)); $content addslashes($content); fclose($fp); if(!get_magic_quotes_gpc()) { $fileName addslashes($fileName); } include 'library/config.php'; include 'library/opendb.php'$query "INSERT INTO upload (name, size, type, content ) ""VALUES ('$fileName', '$fileSize', '$fileType', '$content')"mysql_query($query) or die('Error, query failed'); include 'library/closedb.php'; echo "<br>File $fileName uploaded<br>"; } ?>


and this is code in html:

Code:
<!doctype html> <html> <head> <title>Upload PBpayslip</title> <link rel="icon" href="http://http://localhost/PBpayslip/index1.php/img/icon32.png" sizes="32x32"> <style> body { text-align:center; background-color:#DEF3FE; background-image:url(http://assets.sapphion.com/img/bg.gif); font-family:Arial, Helvetica, sans-serif; font-size:80%; color:#666; margin: 0; padding:0; } .File_Upload_Form { width:600px; margin:30px auto; background-color:#FFF; border-radius:4px; padding: 4px 20px 20px 20px; } h1 { font-family:Georgia, "Times New Roman", Times, serif; font-size:170%; color:#645348; text-decoration:none; font-weight:100; } input[type="submit"]{ border:1px solid #917568; border-radius: 4px; margin:0; padding:4px 10px 4px 10px; font-family:Georgia, "Times New Roman", Times, serif; font-size:14px; color:#333333; text-shadow:1px 1px 0 #fff; background-color:#A5B276; background-image: -webkit-linear-gradient(#CED8AF, #A5B276); background-image:-moz-linear-gradient(center bottom , #A5B276 0%, #727E47 100%); background-size:1px 50px; padding: 5px; cursor:pointer; -webkit-transition: background .5s ease-out; } input[type="submit"]:Hover,:focus{ background-position:100px; } </style> </head> <body> <p>&nbsp;</p> <p>&nbsp;</p> <div class="File_Upload_Form"> <h1>Please Upload Staff's Payroll Here!</h1> <form enctype="multipart/form-data" id="upForm" action="Testing2" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="2000000"> <input type="file" name="file_input[]" id="file_input" multiple webkitdirectory="" directory="" mozdirectory> <input type="submit" value="Hantar" /> </form> </div> <p>&nbsp;</p> <p>&nbsp;</p> <table width="359" border="0" align="center" bgcolor="#FFFFFF"> <tr> <th width="242" height="12" scope="row"><pre>ARAHAN : Please drag the folder that have you choose into button "Choose File". Thank You! :)</pre></th> </tr> </table> </body> </html>

Reply With Quote
  #2  
Old December 3rd, 2012, 01:29 AM
stevarbour3 stevarbour3 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 7 stevarbour3 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 44 sec
Reputation Power: 0
If you want help on the TransferSpreadsheet function, put the cursor over it and press F1.





Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Create a folder on database for particular user


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap