By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

Hide the form action value

P: 1
Sample code:
Expand|Select|Wrap|Line Numbers
  1. <form method="POST" enctype="multipart/form-data" action="process.php?id=$id&name=$name" >";
  2. //code
  3. <input type="file" name="text" size="70">";
  4. </form>
  5.  
I want to hide the "action" value, so when user see my source code from the page, they won't see the next page target.
Is it possible?

Thx.
May 26 '07 #1
Share this Question
Share on Google+
3 Replies


pbmods
Expert 5K+
P: 5,821
Heya, vihanay. Welcome to TSDN!

I want to hide the "action" value, so when user see my source code from the page, they won't see the next page target.
Is it possible?
The direct answer to your question is, "No. Anything you send to the browser is visible to the User."

The indirect answer to your question is, "If you save variables in the session instead of putting them in URLs, you don't have to send them to the browser."
May 26 '07 #2

P: 17
i'm not entirely up to speed on how sessions work yet myself but i would assume something like this:

instead of having to send the information through the url as you are doing, keep it stored on the server in a session. put the variables $id and $name in the session like so ( i think! ):
$_SESSION['id'] = their id;
$_SESSION['name'] = their name;

then when you go the the form handling page you can access them through the session variable names.
May 26 '07 #3

pbmods
Expert 5K+
P: 5,821
then when you go the the form handling page you can access them through the session variable names.
You got it nailed.

Here's some more info about sessions in PHP:
http://www.php.net/manual/en/ref.session.php
May 26 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.