[PHP]include_once("A.php");[/PHP]
I have the following in the A.php file.
Expand|Select|Wrap|Line Numbers
- <?php
- echo $HTML_HEAD . $PRE_CONTENTS;
- ?>
- <div id="content">
- <table width="460" border="0" cellspacing="0" cellpadding="0">
- ... some table infos here ...
- </table>
- <?php if (!isset($_GET['cf'])) { ?>
- <form name="contact_form" method="post" action="?<?php echo (HREF_GET) ; ?>">
- <input name="Fname" type="text" value="" size="30" maxlength="60">
- <input name="PrimaryNo" type="text" value="" size="29" maxlength="15">
- <input name="mobileNo" type="text" value="" size="30" maxlength="15">
- <textarea name="comments" cols="22" rows="4"></textarea>
- <input name="EAdd" type="text" value="" size="30" maxlength="80">
- <input type="submit" name="SubmitCF" value="Contact me please">
- </form>
- </div>
- <?php
- } else {
- ?>
- Thank you for submitting you request. We'll be in touch shortly.
- </div>
- <?php
- }
- echo $POST_CONTENTS . $HTML_FOOT;
- ?>
[PHP]
echo $HTML_HEAD . $PRE_CONTENTS;
[/PHP]
&
[PHP]
echo $POST_CONTENTS . $HTML_FOOT;
[/PHP] are well parsed. but the rest of them are not.
Testing it in a localserver I have the following $_SERVER array with the following values after submitting the form.
Expand|Select|Wrap|Line Numbers
- Array
- (
- [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
- [HTTP_REFERER] => http://localhost/qhs/?ni=2.
- [HTTP_ACCEPT_LANGUAGE] => en-gb
- [CONTENT_TYPE] => application/x-www-form-urlencoded
- [HTTP_ACCEPT_ENCODING] => gzip, deflate
- [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0(Compatible Mozilla/4.0(Compatible-EmbeddedWB 14.59 http://bsalsa.com/ EmbeddedWB- 14.59 from: http://bsalsa.com/ ; .NET CLR 1.1.4322)
- [HTTP_HOST] => localhost
- [CONTENT_LENGTH] => 70
- [HTTP_CONNECTION] => Keep-Alive
- [HTTP_CACHE_CONTROL] => no-cache
- [PATH] => C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;;C:\www\openssl\bin;C:\www\Apache22\bin;C:\www\php5;C:\www\mysql5\bin;C:\www\perl\bin
- [SystemRoot] => C:\WINDOWS
- [COMSPEC] => C:\WINDOWS\system32\cmd.exe
- [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
- [WINDIR] => C:\WINDOWS
- [SERVER_SIGNATURE] =>
- [SERVER_SOFTWARE] => Apache/2.2.4 (Win32) PHP/5.2.2
- [SERVER_NAME] => localhost
- [SERVER_ADDR] => 127.0.0.1
- [SERVER_PORT] => 80
- [REMOTE_ADDR] => 127.0.0.1
- [DOCUMENT_ROOT] => D:/WEBDEV/wamp/www
- [SERVER_ADMIN] => webmaster@localhost
- [SCRIPT_FILENAME] => D:/WEBDEV/wamp/www/qhs/index.php
- [REMOTE_PORT] => 1073
- [GATEWAY_INTERFACE] => CGI/1.1
- [SERVER_PROTOCOL] => HTTP/1.1
- [REQUEST_METHOD] => POST
- [QUERY_STRING] =>
- [REQUEST_URI] => /qhs/?
- [SCRIPT_NAME] => /qhs/index.php
- [PHP_SELF] => /qhs/index.php
- [REQUEST_TIME] => 1181157014
- [argv] => Array
- (
- [0] =>
- )
- [argc] => 1
- )
Expand|Select|Wrap|Line Numbers
- http://localhost/qhs/?<?php%20echo%20(HREF_GET)%20;%20?>
HREF_GET <-- this one holds the $_GET values before submitting the form, which I intend to send back again to retain the present status of the site.
$_GET['cf'] <-- is a variable that is set for 'forbidding' the form to display anymore. This is set once the form is submitted.
But none of them seem to listen to my feeble instructions.
Please ask if anymore infos are needed to help me out.
I'd really appreciate if somebody points me to a good direction to solve it.
Thanks in advance.