PHP? > PDF

Associate
Joined
10 Feb 2009
Posts
9
Hi there, i hope someone can point me in right direction
i dont know any PHP to be honest but im assuming this is whats needed for this
Basically i would like a webpage for our firms intranet that allows you to enter an order number into a field and this will then bring up that order numbers PDF document
in other words, if i save a pdf document onto the network - or even upload it on this page, and name it 180642 i would then like to be able to come back in a few weeks and enter 180642 and this will display this pdf document i created previously

i hope this is clear and i hope someone can help on this...

Many thanks guys
 
Doesn't need to be done in PHP... it's page with a search function is what it sounds like... could be asp, aspx...
 
Okay so pretty new to PhP myself but it should work something like this:

have "search.html"
<html><title> daniel545's super search page</title>

<h3>Enter the Order No:</h3>
<form action="get.php" method="post">
No: <input type="text" name="no" />
<input type="submit" />
</form>
</html>

Then have get.php as

<html>
<body>
Click open open the order <a href="where_i_save_my_order_pdfs/<?php echo $_POST["no"]; ?>.pdf </a>

</body>
</html>
 
its going to be on a linux server if that helps
any ideas where i could find the info to create this?
doesnt have to be anything fancy at all

cheers
 
its going to be on a linux server if that helps
any ideas where i could find the info to create this?
doesnt have to be anything fancy at all

cheers

You'll need to install apache, then put your put PhP code in
/var/www/html

Google PhP help and you'll find lllooooaaaddddssss of tutorials on PhP
 
i cant seem to get this working using this
just to check in the href do i use the url or the file path?
im currently using the url and i get to the search fine - i enter the number and i then get this

Click open open the order <a href="http://internalurl/testing/test.pdf
it looks like a simple error but could do with a pointer...

cheers



Okay so pretty new to PhP myself but it should work something like this:

have "search.html"
<html><title> daniel545's super search page</title>

<h3>Enter the Order No:</h3>
<form action="get.php" method="post">
No: <input type="text" name="no" />
<input type="submit" />
</form>
</html>

Then have get.php as

<html>
<body>
Click open open the order <a href="where_i_save_my_order_pdfs/<?php echo $_POST["no"]; ?>.pdf </a>

</body>
</html>
 
you know that the code above should be on 2 pages?

e.g.

this file called whatever you want
Code:
<html><title> daniel545's super search page</title>

<h3>Enter the Order No:</h3>
<form action="get.php" method="get">
No: <input type="text" name="no" />
<input type="submit" />
</form>
</html>

this file is called get.php
Code:
<html>
<body>
Click open open the order <a href="where_i_save_my_order_pdfs/<?php echo $_GET["no"]; ?>.pdf </a>

</body>
</html>

notice i changed the method from post to get as i see no reason for it not to be, makes life a little easier as you can easily change the pdf you are viewing by changing the value in the url :)
 
yes i have two pages
one called search.html and another get.html
i have tried your code and its still failing

im still getting the same error as before

"Click open open the order <a href="http://internaladd/testing/test.pdf"

any ideas?



you know that the code above should be on 2 pages?

e.g.

this file called whatever you want
Code:
<html><title> daniel545's super search page</title>

<h3>Enter the Order No:</h3>
<form action="get.php" method="get">
No: <input type="text" name="no" />
<input type="submit" />
</form>
</html>

this file is called get.php
Code:
<html>
<body>
Click open open the order <a href="where_i_save_my_order_pdfs/<?php echo $_GET["no"]; ?>.pdf </a>

</body>
</html>

notice i changed the method from post to get as i see no reason for it not to be, makes life a little easier as you can easily change the pdf you are viewing by changing the value in the url :)
 
Looks like your missing an extra > in get.php, try this:

Code:
<html>
<body>
Click open to open the order <a href="where_i_save_my_order_pdfs/<?php echo $_GET["no"]; ?>.pdf">Open</a>

</body>
</html>
 
Back
Top Bottom