I'm currently being payed by a small business to improve their current website. I've gone as far as making it look sleek and laying everything out efficiently, but there's one aspect the owners requested that I'm having difficulty with.
They requested a single page where the owners could upload images of documents (reference forms they could look at on the go), display them on the page and delete them when necessary.
I'm pretty sure something like this could be done with mySQL, but, alas, I have no knowledge of how to use it.
If anyone here could help me to get started on the right foot for designing this page, I would appreciate it immensely. Also, I have full access to the server from which this website draws its files, having written most of them myself.
Thanks in advance for any advice.
MySQL + PHP.
Use form submission. Just please, oh please, properly do it. Or I'll just upload C99. :smugdog:
[php]
<?php
$uploads_dir = '/uploads';
foreach ($_FILES["pictures"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$tmp_name = $_FILES["pictures"]["tmp_name"][$key];
$name = $_FILES["pictures"]["name"][$key];
move_uploaded_file($tmp_name, "$uploads_dir/$name");
}
}
?>
[/php]
you are quite welcome
I would honestly store them outside the readable website directory.
[QUOTE=andersonmat;24969614]I would honestly store them outside the readable website directory.[/QUOTE]
this is the efficiently optimized revision that is engineered to execute at hyperprocessor clock rates.
[QUOTE=Floyd Pinkerton;24969673]this is the efficiently optimized revision that is engineered to execute at hyperprocessor clock rates.[/QUOTE]
Sounds badass.
[editline]10:21AM[/editline]
You don't mind if I use this script do you? :v:
andersonmat just got served
Or he could put the file in the MySql table
[QUOTE=cas97;24970220]Or he could put the file in the MySql table[/QUOTE]
Get the fuck out. :smile: There are so many things wrong with that.
[QUOTE=jaybuz;24970066]andersonmat just got served[/QUOTE]
No, not really.
haha
[QUOTE=cas97;24970220]Or he could put the file in the MySql table[/QUOTE]
that is the suboptimal method of user uploaded filedata storage.
The aforementioned method outlined by myself is far superior, as it is tuned to ultimate performance fidelity.
[QUOTE=Floyd Pinkerton;24970286]that is the suboptimal method of user uploaded filedata storage.
The aforementioned method outlined by myself is far superior, as it is tuned to ultimate performance fidelity.[/QUOTE]
Too bad your method is full of vulnerabilities. :hurr:
Well, I appreciate the answers so far.
How would I incorporate the code given into the html files? Straight copy and paste? And what would it produce, a button of some kind?
[editline]d[/editline]
How does this look?
[url]http://www.snippetmaster.com/index.php[/url]
It's a free CGI resource tool, in conjunction with PHP, that allows clients to log in and use WYSIWYG editors.
Too shady/archaic? Or will it work?
:saddowns: Well, putting it into a folder is ok if it has the correct permissions not to run any scripts
It has an installer package. It asks you to upload it to a new folder on your FTP server and run it from there...
I don't know. It seems too good to be true and I'm afraid to download it. Can anyone verify this product?
Write it yourself. Immensely more satisfaction.
[QUOTE=thirty9th;24970748][url]http://www.snippetmaster.com/index.php[/url]
It's a free CGI resource tool, in conjunction with PHP, that allows clients to log in and use WYSIWYG editors.
Too shady/archaic? Or will it work?[/QUOTE]
CGI is an inefficient technology. The web application server environment must spawn a new process for every incoming application request.
[QUOTE=Floyd Pinkerton;24971169]CGI is an inefficient technology. The web application server environment must spawn a new process for every incoming application request.[/QUOTE]
I for one must concur with this statement. I highly recommend the application of the Apache package's methods of mod_php in order to facilitate the dynamic structure of the script.
[QUOTE=Qombat;24972742]I for one must concur with this statement. I highly recommend the application of the Apache package's methods of mod_php in order to facilitate the dynamic structure of the script.[/QUOTE]
stop being so pompous jesus
[QUOTE=Floyd Pinkerton;24972783]stop being so pompous jesus[/QUOTE]
:irony:
I for one welcome our new robot suzerains.
[quote=magicgism;24972822]i for one welcome our new robot suzerains.[/quote]
welcome....
TO THE MACHINE
[QUOTE=andersonmat;24970517]Too bad your method is full of vulnerabilities. :hurr:[/QUOTE]
Although you are right, I am sure he meant that is the bare minimum.
[editline]08:39AM[/editline]
[QUOTE=thirty9th;24970748]
How does this look?
[url]http://www.snippetmaster.com/index.php[/url]
It's a free CGI resource tool, in conjunction with PHP, that allows clients to log in and use WYSIWYG editors.
Too shady/archaic? Or will it work?[/QUOTE]
I used one called "tinyMCE", it works awesome for clients (although most are web design retarded to use it).
If you have the time to configure it, it's great. Although a little knowledge of JS is needed.
Sorry, you need to Log In to post a reply to this thread.