b1b5bcd65faa6c52ea907a08cdfa2b4254a6ca16
galt
  Mon Jun 11 14:12:24 2012 -0700
Revert "Removing out of form input tag."
This reverts commit 152ec1fcab421d8e4663191e9012fd28434537a3.

diff --git src/hg/lib/cart.c src/hg/lib/cart.c
index 563f5ae..a714116 100644
--- src/hg/lib/cart.c
+++ src/hg/lib/cart.c
@@ -1473,30 +1473,37 @@
 webStartWrapper(cart, db, format, args, FALSE, FALSE);
 inWeb = TRUE;
 }
 
 void cartWebStart(struct cart *cart, char *db, char *format, ...)
 /* Print out pretty wrapper around things when working
  * from cart. */
 {
 va_list args;
 va_start(args, format);
 cartVaWebStart(cart, db, format, args);
 va_end(args);
 jsIncludeFile("jquery.js", NULL);
 jsIncludeFile("utils.js", NULL);
 jsIncludeFile("ajax.js", NULL);
+// WTF - variable outside of a form on almost every page we make below?
+// Tim put this in.  Talking with him it sounds like some pages might actually
+// depend on it.  Not removing it until we have a chance to test.  Best fix
+// might be to add it to cartSaveSession, though this would then no longer be
+// well named, and not all things have 'db.'  Arrr.  Probably best to remove
+// and test a bunch.
+cgiMakeHiddenVar("db", db);  
 }
 
 void cartWebEnd()
 /* Write out HTML footer and get rid or error handler. */
 {
 webEnd();
 popWarnHandler();
 }
 
 void cartFooter(void)
 /* Write out HTML footer, possibly with googleAnalytics too */
 {
 #ifndef GBROWSE
 googleAnalytics();	/* can't do this in htmlEnd	*/
 #endif /* GBROWSE */