Why ???

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
For passing values trough successives pages, I use $_SESSION variable.

Here is a simple function I've created:
function getvalue($fieldname){
 if (isset($_GET[$fieldname]))
  return $_GET[$fieldname];
 elseif (isset($_SESSION[$fieldname]))
  return $_SESSION[$fieldname];
 elseif (isset($_POST[$fieldname]))
  return $_POST[$fieldname];
  return "";

I've this form:
<form name="ReturnBack" method="GET" action="/index.php?">
<center><input type="Submit" name="SubmitButton"

in the index.php page, when I show the SubmitButton value, I get "Search",
the one set in the $_SESSION["SubmitButton"]
Why the $_GET["SubmitButton"] value is empty ?? The Submit type doesn't set
the value ????

Re: Why ???

Bob Bedford wrote:
Quoted text here. Click to load it

Apparently (I didn't test it) it should work.
Do you have error_reporting set to E_ALL?

.... maybe that will report some misnamed index

USENET would be a better place if everybody read:    | to  mail  me:  simply |
http://www.catb.org/~esr/faqs/smart-questions.html    | "reply" to this post, |
http://www.netmeister.org/news/learn2quote2.html      | *NO* MIME, plain text |
http://www.expita.com/nomime.html                     | and *NO* attachments. |

Re: Why ???

Quoted text here. Click to load it

I'm not sure what you mean here, but from your story I gather that you
also have a $_SESSION variable called SubmitButton?

If this is the case then your function will never reach the $_POST
variables because isset($_SESSION['SubmitButton']) will evaluate to true.

Re: Why ???

It's the $_GET['SubmitButton'] that isnt' called, not the POST. And since my
form is in GET method, it should be called ???


Quoted text here. Click to load it

Re: Why ???

On Thu, 11 Nov 2004 16:15:25 +0100, "Bob Bedford"

Quoted text here. Click to load it

Do you see " SubmitButton=Retour " in the url after submitting the
form? That will confirm/deny the value is actually being transmitted.

Alternatively, change the form's action to a phpinfo page to confirm
exactly what's where.

David ( @priz.co.uk )

Re: Why ???

Found !!!

I had a redirect (header) that was called that didn't let me see the
javascript alert box !!!! sorry !!!!

Quoted text here. Click to load it

Site Timeline