×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Storing Paths of PDF Files into MySQL

Storing Paths of PDF Files into MySQL

Storing Paths of PDF Files into MySQL

(OP)
Hi all ,

what im looking to do is to store the Filename.Ext "Filename only & ext " not actual File itself , and store the path of an uploaded PDF File into MySQL database, then once Displayed the user can select the PDF and it opens from the Folder on the server going by the Filename.ext and path stored in MySQL

any good examples of this or snippets would be Awesome.

thanks so much


RE: Storing Paths of PDF Files into MySQL

What part do you have already?
  • user authentication?
  • file upload function?
  • database inserts?
If you are starting from scratch, I recommend a ready-made content management system (Drupal/WordPress/Joomla) or a document management system (OwnCloud). It solves all the problems for you and has the security issues of file upload and user authentication worked out.

RE: Storing Paths of PDF Files into MySQL

(OP)
no CMS is actually to much work to make it do what i want to do ,

RE: Storing Paths of PDF Files into MySQL

A CMS with file upload and retrieval can be set up in a half hour. Developing a custom solution for your still undefined current infrastructure could take days or weeks. What exactly do you need? What do you have done already?

RE: Storing Paths of PDF Files into MySQL

Inserting text into a Db is fairly simple i.e you insert like you insert anything else into the Db.

INSERT INTO table name values ("filename.ext","folder/folder/path");

Retrieving from the Db is equally simple, then all you would need to do is build the link from the query results.

CODE

echo "<a href='" . $mysqlresults['path'] . #mysqlresults['filename'] . ">" . $mysqlresults['filename'] . "</a>"; 

Where exactly are you getting hung up?




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close