How to make contact form PHP_SELF into the same page?
I have code to submit form like:
<form id="remove" action="<?php echo $PHP_SELF; ?>" method="post" >
If there is management of files with detection of ID, how to influence that it will not go on index.php page as it should be index.php?id=contact_reply1
It seems that posting message goes file to index.php and NOT detecting ID number or/and value.
Is possible to manage this redirection when submitting message?
<?php echo $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; ?>
I've switched careers...
I'm NO LONGER a scientist,
but now a web developer...
Thank you. It works perfect.
Last edited by toplisek; 12-12-2008 at 09:57 AM.
And save as a PHP file.
$url = 'http://www.webdeveloper.com/forum/newreply.php?do=newreply&noquote=1&p=959499';
window.location = '<?=$url;?>';
Check this out.
alert(<?php echo $no; ?>);
This will surely give an alert box.
In a similar fashion one can write in any sort of php code with <script></script>..
Can I just point out that I have never found a single browser that demands a file name when specifying a query string, you can get away with:
I've been using this short cut for a long time, there's nothing wrong with it as far as I can tell(and I test everything in IE5, 6+7, firefox 1.5+, opera 9, latest safari, konqueror, lynx, links and w3m), I've not had problems with it in over 3 years.
<?php echo '?'.$_SERVER['QUERY_STRING']; ?>
If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
The same applies to HTML and the forums [HTML][/HTML] tags.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)