The following warnings occurred: | ||||||||||||||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Upload with link - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: General (https://userspice.com/forums/forumdisplay.php?fid=20) +--- Forum: UserSpice 5 - Roadmapping the Future (https://userspice.com/forums/forumdisplay.php?fid=31) +--- Thread: Upload with link (/showthread.php?tid=261) Pages:
1
2
|
Upload with link - Disruptionz - 09-12-2016 Hey, Can anybody help me? I am working on an address book and need to add a CV upload to it. The plan is to upload the cv on the join page and have the upload go into a folder on the server and a link saved in mysql under users so it can get echoed out to a downloadable link. Also after this project I should have some spare time on my hands, would people be interested in a free dashboard theme? Upload with link - mudmin - 09-12-2016 I would check out this solution http://www.codingcage.com/2014/12/file-upload-and-view-with-php-and-mysql.html You can skip all the db config stuff since you already have the userspice classes. And you can just do your sql queries as outlined in the Documentation-> db class Upload with link - Disruptionz - 09-13-2016 Thank you Mudmin, I did what it said but i get this error http://prntscr.com/ches53 any ideas? I did the following, I added file etc to the users db I added this to _join.php <pre> Code: <div class="col-md-6"> <label>CV</label> I also tried this at the bottom of validate and join.php <pre> Code: if(isset($_POST['submit'])) Upload with link - Disruptionz - 09-13-2016 Sorry that issue was me. I added this to Join.php but nothing is uploading and no data to the user db. http://prntscr.com/chfzwl Upload with link - Disruptionz - 09-13-2016 Sorry Wrong Image http://prntscr.com/chh4qt Upload with link - brian - 09-14-2016 Not ignoring you, just haven't had time to address it yet. I'm not THAT familiar with file upload stuff, so it still might take a bit for us to get back to this. Upload with link - firestorm - 09-14-2016 the problem with dashboard themes is that many of them require markup changes that stray somewhat from bootstrap, i've just implemented a realy good one but it has meant a complete markup rewrite Upload with link - brian - 09-14-2016 Haha, took me a while to figure out what theme stuff you were talking about, then checked the first post again. In UserSpice 5, we are planning to use the CDN version of bootstrap and Font Awesome, and pretty much using bootstrap stylings exclusively. UserSpice 4.1 still has some references to SB-Admin, but we weren't really using any of the built in stuff, so it also has been removed. We feel that makes it easy for us to maintain, but people are welcome to customize their bootstrap themes and such to get different feels. For example, the US 5 stuff I have has a demo website on the front end using the CDN version, while the UserSpice backend is using its own styling for now. Upload with link - Disruptionz - 09-16-2016 Sorry for the late response, I had the apple update issue and spent 5 hours sorting that out and then had a whole tin of gloss spill so it's been hell lol. Any and all help really would be preheated, If I manage to figure it out ill post back with the how to etc. Upload with link - Disruptionz - 09-16-2016 Ok, I got the file to upload, but now I cant get it to post into into the db (I managed to before but forgot how) Hopefully you guys can help me. Code: if(isset($_POST['btn-upload'])) Code: { Code: $file = rand(1000,100000)."-".$_FILES['file']['name']; Code: $file_loc = $_FILES['file']['tmp_name']; Code: $file_size = $_FILES['file']['size']; Code: $file_type = $_FILES['file']['type']; Code: $folder="cvs/"; // new file size in KB Code: $new_size = $file_size/1024; // make file name in lower case Code: $new_file_name = strtolower($file); Code: $final_file=str_replace(' ','-',$new_file_name); Code: if(move_uploaded_file($file_loc,$folder.$final_file)) Code: { mysql_query($sql);` Code: ?> |