I wantto display the output ACTION prog. on same sreen

A

Anonymous

Guest
I wantto display the o/p ACTION prog. on same sreen
Normally with command
<FORM METHOD=POST ACTION="addhotel.php">

the control is shifted to "addhotel.php" and whatever messages I want to display are displayed on next page.

I donot want this to happen...I want to display the outcome of "addhotel.php" on the same form which has this "post action"



Report this post to a moderator | IP: Logged
 
So set the action to the same page
<form method='post' action='<?=basename($_SERVER['PHP_SELF'])?>'>

Just make sure your form can cope with the variables being present or not
 
vikaspa said:
I wantto display the o/p ACTION prog. on same sreen
Normally with command
<FORM METHOD=POST ACTION="addhotel.php">

the control is shifted to "addhotel.php" and whatever messages I want to display are displayed on next page.

I donot want this to happen...I want to display the outcome of "addhotel.php" on the same form which has this "post action"



Report this post to a moderator | IP: Logged

make this form to refer to the same script (the script, which posts it)
 
Back
Top