close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


problem with passing session variable from cart

Thread began 3/14/2009 8:01 pm by contact341526 | Last modified 3/16/2009 4:03 pm by contact341526 | 1605 views | 2 replies |


problem with passing session variable from cart

Hello, I have my information from my confirm page sending to my database. Then as the visitor clicks submit order the the success page shows up and behind the scenes a php xml pages is being created and submitted to a fulfillment company. That all works fine. However I need to filter recordsets on the page that creates the xml.

Right now anyone can go to that url and see the last posted order(containing all of the shipping, and order information). I need this page to come up blank and figured I should do this with a recordset filter. However, I have tried everything. I can not do a form or url filter - I am thinking I need to do a session variable filter - but I get blank results when I do that. Maybe someone has an idea or code that can help me out. Below is an example of what I have currently.

Top of Page
if (!session_id()) session_start();

Not sure if I needed this one - but figured this wold specifically pull in the last name variable - which is just one example of what I could filter by


if (!session_id()) session_start();
$_SESSION["eCartCheckoutForm_lastname"] = "".((isset($_POST["lastname"]))?$_POST["lastname"]:"") ."";

Here is the where query

mysql_select_db($database_tconnect, $tconnect);
$query_rsxmlorders = sprintf("SELECT * FROM order_detail WHERE billlname = %s ORDER BY `date` DESC", GetSQLValueString($colname_rsxmlorders, "text"));
$rsxmlorders = mysql_query($query_rsxmlorders, $tconnect) or die(mysql_error());
$row_rsxmlorders = mysql_fetch_assoc($rsxmlorders);
$totalRows_rsxmlorders = mysql_num_rows($rsxmlorders);

Here is what is actually entered in for the variable to filter by


I get completely blank results when I do this.

Thank you for any help that you may be able to provide.

Sign in to reply to this post

Ray BorduinWebAssist

Looks like you need to debug a little... add:


That should tell you why the RS is empty... are you adding the recordset AFTER the insert details in database server behavior? If the records haven't been inserted yet, then the RS would be empty.

Sign in to reply to this post
Did this help? Tips are appreciated...


not sure

I guess that does not make much sense to me. The records are in the database and I can get them to display, but I need to apply a filter using the session so that anyone the finds that page outside of the session will see it as empty.

Right now anyone who goes to that page from any browser will see information regarding the last order that was placed.

when I choose to filter by session I get a blank page, even when I am still in the session - that is the problem. Hopefully that makes more sense.


Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...