psn
06-07-2005, 02:51 AM
I have 2 programs called prog1.php and prog2.php.
------------------------------------------------------------------------
prog1.php
<form name="form1" action="prog2.php">
<input type="text" name"txtname"><br>
<input type="submit" value="submit">
</form>
Clicking submit button in prog1.php should redirect the browser
to prog2.php
--------------------------------------------------------------------------
But my question is, If I directly run prog2.php without coming from prog1.php, then the browser should redirect me to prog1.php.
So how to do this.
Note: this is not a login page.
Regards
------------------------------------------------------------------------
prog1.php
<form name="form1" action="prog2.php">
<input type="text" name"txtname"><br>
<input type="submit" value="submit">
</form>
Clicking submit button in prog1.php should redirect the browser
to prog2.php
--------------------------------------------------------------------------
But my question is, If I directly run prog2.php without coming from prog1.php, then the browser should redirect me to prog1.php.
So how to do this.
Note: this is not a login page.
Regards