Jump to content

How should I start this project?

- - - - -

  • Please log in to reply
1 reply to this topic

#1
cdonate

cdonate

    Newbie

  • Members
  • Pip
  • 1 posts
Hi guys! This is my first post here, hope you can help me with some ideas.

I would like to create a very simple web page that has only two input fields, ID and PASSWORD and a send button.

The system will get the ID ans PASSWORD and access a simple database that stores a pdf file associated with that particular ID ans PW.

The system then will display the pdf file in the users screen.

Thats it!

I can code in JAVA, C, C++ and some basic HTML. How should I approach this problem? I've never created anything for web using and I do not have the faintest idea how to start.

Should a I use simple HTML and a POST data system for the webpage? How do I connect to the database, send the ID and PW and receive the pdf file? What database should I use?

I do not want the code itself, I would like to do it my self, I think it will be a good project for to learn some important thing, I just need some guidance on how do I approach it.

Thank you very much!

Claudio Donate.

#2
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
Hello,

First if you are on the web, you need html to show the 2 input.
You then need to name thoses input
<input type="text" name="id" />

<input type="password" name="password" />

Than you will need some server side script.
Even if you know java, I would not recommand jsp since you still need to learn a quite some stuff in java to make jsp, and the jsp hosts are less commons

If this is your final project, and you don't need to go any further into the developpement, I would suggest you forget about the database, and simply use file
Each id is a folder
Inside thoses folder, you have a file text, and the name of that file text is the password
And you have the pdf too.

I know this is not the most secure way, but this is a easy way to do so
If you are using php, you will need thoses functions
is_dir and file_exists

And this to display the pdf
// We'll be outputting a PDF

header('Content-type: application/pdf');

// It will be called downloaded.pdf

header('Content-Disposition: attachment; filename="downloaded.pdf"');

// The PDF source is in original.pdf

readfile('original.pdf');
Code taken from PHP: header - Manual

And you shoud be set.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users