Hello all and I have a question...

cms659

75.***.***.***
1,092 days ago

Hello all and I have a question...

Hi:

I am new to this site and would like to say "HELLO EVERYONE" and after reading some of the posts here it appears that there is someone here who can answer just about anything. I feel rather silly here as I am pretty proficient at many many aspects of PHP myself. This one, try as I may, I haven't quite figured out.

Here is the problem (going to try to explain it with an example):

Say your website is: 'http://www.mysite.com'

You create a form in your website that when submitted (whether using method="post" or method="get" does not matter but for the sake of this example I'll use 'post').

The action in the form is as follows:
<form action="00001.php" method="post">
(this is assuming all the files you'd take someone to are in the same directory on the website)

Now for the problem:

I want to md5 mask the page the action statement takes you to. Obviously, I can create a variable like this:

$a="00001.php";

and then md5 mask the variable:

$a = md5($a) - and then change the 'form' command to read:

<form action=$a method="post">

The form does execute properly with the problem being the 'action' attempts to open the md5 value php file, which obviously does not exist (i.e.-- '00001.php' converts to 'ddb7d4fbb4fc8d5aaa23a7438e39e756' so the 'action' when the form is submitted attempts to open: 'http://www.mysite.com/ddb7d4fbb4fc8d5aaa23a7438e39e756' - a file which is not existent but the original file '00001.php' is).

Can anyone help me get a around this? Would appreciate any suggestions.

Thank you,

Chuck

Bill

80.***.***.***
1,091 days ago
Welcome to the forum!

A form and everything about it is all client side, so if you want to hide the destination page to the casual source viewer you would have to use a client side language such as JavaScript.

You could however, have the form go to a script that include()s another script, or that is set up through .htaccess to serve up that other file. The client side of things would never know the real filename/path of the output in front of them, but then again I don't know what you are trying to do and whether it would help.

If you explain what you are trying to accomplish I'm sure we can help.