i want know if i am giving the action in same page. then what the file name in action. Something one word "PHP-SELF". I am not conformed and i have used but error is showing something access forbidden and error no. 403. If anybody know very well please inform to right suggestion. thanks.
action in same page
Collapse
X
-
Tags: None
-
Originally posted by devsusenHi,
I think this should work $_SERVER['PHP_SELF'] instead of $PHP_SELF.
Try this by your self by putting this in a single .php page.
[PHP]<?php
echo '<form name="PHP" action="'.$PHP_ SELF.'" method="POST">' ;
echo '<input type="submit" name="click_php " value="PHP form" />';
echo '</form>';
if($_POST['click_php'])
{
echo 'This is from PHP form';
}
?>
<HTML>
<body>
<form name = "HTML" action="<? $_SERVER['PHP_SELF'] ?>" method="POST">
<input type="submit" name="click_htm l" value="HTML form" />
</form>
</body>
</HTML>
<?
if($_POST['click_html'])
{
echo 'This from HTML form';
}
?>[/PHP]Comment
Comment