Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

PHP Help

Status
Not open for further replies.
Joined
May 20, 2005
Posts
1,197
Reaction score
6
im told this is simple, but i have no idea where to start
can anyone help (or quickly knock up a quick page/script)

i will have a directory with .pdf files in, all named, doc1.pdf , doc2.pdf, doc3.pdf
(and so on...)

i want a page, with a simple search box, that i can enter "doc1.pdf" into and it will open / show me doc1.pdf.


hopefully that makes sense?
 
really simple stuff:

<?php
if(file_exists('./'.$_POST['filename'])) {
header("Location: /folder/".$_POST['filename']);
}
?>

THat assumes the textfield is called filename

I would probably do some sanity checking to make sure that someone isn't naughty.

Jee
 
thanks. i will check that c0de snippet out :)


i just want to be able to tell mr smith to go to such and such website, type in his unique code number (the doc filename) and be able to download/view the document (which will be a passworded pdf)

the info is not secret/sensitive.
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

No members online now.

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom