Jump to content

PHP or basic form method


paradoxmime

Recommended Posts

I have a search result page that displays a link to a file if the file exists. I want to instead create another page that contains some java that I want to use to embed a pdf instead of trying to open the file with Adobe reader or any pdf reader. I need to pass 2 variables when the link is clicked. Those 2 variables are then caught by the page with the java on it and the correct location of the file will then display the PDF in the applet.

 

My question is whether to pass those variables using php or using hidden form fields. It's been years since I've worked on my site and I have no idea what or how to do it.

Link to comment
https://forums.phpfreaks.com/topic/167852-php-or-basic-form-method/
Share on other sites

Is the Java applet secure? If it is then just pass them with hidden form vars. But if you need PHP to protect your Java applet then use PHP to intercept the form and clean the variables before passing them to the Java applet. With out further information can't help beyond that.

here is the simple code for the page with the java:

 

<?php

echo "<applet src=\"EmbedPDF.class\" archive=\"EmbedPDF.jar\" width=\"900\" depth=\"500\"><param name=\"pdf\" value=\"http://".$_SERVER["HTTP_HOST"]."/Designers/".$row_Recordset2['Des_ID']."/pdf/review/".$row_Recordset2['Review_PDF']."\"<a href=\"http://".$_SERVER["HTTP_HOST"]."/Designers/".$row_Recordset2['Des_ID']."/pdf/review/".$row_Recordset2['Review_PDF']."\"><strong>Click Here</strong></a></applet>"

; ?>

 

The two variables are Des_ID and Review_PDF

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.