postgresql - PHP Session Variable not Available -


I have a PHP file (approvals.php) that executes only on an AJAX call. It has a postgrascape query that searches for a table and uses a customer ID, which is set as a session variable. The problem is that I do not use this session variable in this file can. My query is like:

  $ query = "SELECT merchant_id FROM ndovu_merchant_users WHERE customer_id = {$ _ session ['customer_id']}"; $ Result = pg_query ($ query);   

I have tried to resonate the session variable $ _ session ['customer_id'] but nothing. Although given a certain value on the query, it returns a result.

In your case, I have checked that the session has been set to the first place.

  // This page should be placed at the top of session_start (); If (isset ($ _ session ['customer_id']) & amp; empty! ($ _ Session ['customer_id'])) {$ _SESSION ['customer_id']; } And {Echo session is not set '; }    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -