...

View Full Version : Resolved $_SERVER["REQUEST_METHOD"] with PHP_SELF and GET variable?



RonnyNishimoto
08-05-2012, 03:27 AM
Hi!

I have a form in which uses:



<form action="<?php echo $_SERVER["PHP_SELF"] . "?m=results"; ?>" method="POST">


in order to submit the form to itself (for php validation). It works fine, but when I try to use:



<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") { echo 'a'; }


it doesn't work :confused:

Anyway to fix this?

RonnyNishimoto
08-05-2012, 03:35 AM
Woops. So sorry.

I was staring at this for an hour, then I realized I had another $_SERVER[REQUEST_METHOD] at the top of the page which loaded the page.

My bad!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum