Hi guys,

I have two questions, I wonder if they are possible to implement.

1. <form action="nextform.php" method="POST"> Is it possible to hide nextform.php from other users as I don't want anyone seeing where the data is being POSTed. Or similar solution.

2. Is it possible to hide javascript files as well? Again, I don't want anyone seeing where javascript file is stored. Or similar solution.

Thanks in advance

6 Years
Discussion Span
Last Post by Akash Saikia

hi, for the first case what you can do is,just replace the action="nextform.php" with
action="#" ,so in case of any submit method it will redirect to the current page. So do not use submit to post the data,change the method="get" or leave it as it is ,but do not use submit in any button.

Instead use java-script function to call nextform.php on clicking a button that you wished to use for submitting the data,and send the data through query string like this

And your second question is quite difficult,because most of the developer tools in the browsers and source code will provide the javascipt file location
But you can try this link,a bit hard to understand but it may solve your problem


Good luck....


For the 1st question, is this what you mean?

<form action="" method="GET">
<input type="text" name="myname" />
<input type="submit" name="submitbutton" value="Show my name" />

if(isset($_GET["myname"]) && $_GET["myname"] != ""){
	header("location: nextform.php?myname=".urlencode($_GET["myname"]));


if(isset($_GET["myname"]) && $_GET["myname"] != ""){
	echo "Process is finalised in this page and redirected to thanks page.";
	header("location: thanks.php");

Edited by veledrom: ,


Yes it is correct,i suggested you to use java script and you are using php instead.
But it is correct :)

But try using java script,because the code you have shown will make two page calls
1st is your index page itself
--> There it will check the query string and then call 2nd the nextpage.php

But in case of java script,only nextpage.php will get called.



I understand you but if I use it in javascript, the name of the file (nextpage.php) will be visible to everyone who opens source code from their browsers. I don't want anyone to see which file I am sending the data.

If I use window.location.href="nextpage.php?id=...........", it will be visible.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.