Wednesday, August 30, 2006

damn you sessions

So, I am working on a project for HereNextYear. Basically, they have a client "Childrens Cancer Fund" and I am re-working their online donation page to work with Authorize.Net . Fun Fun. It also allows them to have teams sign-up, kinda like when people come to your house for a 5K run pledging how much money they will do. However, the teams have their own little page, with the donation form on it. So using some mod_rewrite I have it so they can do www.domain.tld/TeamName/ and it will pull data from a database based on their team name. Well I was having problems in the fact that, on one section of the page it returned the team_id session as one number, while on a different part of the page it returned something else. After 2 days of dicking with it, I finally found the solution, because of another session variable, I managed to catch the value and it was odd. What makes things weird is, 1. it was html that wasn't even wrapped around <?php ?>. 2. Why it was actually causing the problem. So here is the bugged code.

<body bgcolor=#ffffff marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" bottommargin="0" background="images/ccf_bg.gif">

Here is the fixed code
<body bgcolor=#ffffff marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" bottommargin="0" background="<?php echo PATH_TO_DISPLAY; ?>/images/ccf_bg.gif">

Basically I have a PHP constant that holds the url to the base project. That way, with the mod_rewrite I don't get anything funky like, www.domain.tld/teamName/images/ccf_bg.gif . Thats what the PATH_TO_DISPLAY is. That was my fix. After 2 days, it turns out something so random I just don't know what else to say..

Well thats it, for now. I gotta get this thing done.

Sunday, August 20, 2006

Second Weekend At RSB

So this weekend was pretty cool. I got off at like 9:30 this morning. w00t. We did some cool drills, that were related to medical / evacuation stuff. There was a competition divided into two teams, whoever won got to pick the PT(physical training) exercise the loosing team had to do. Luckily my team won all four rounds. I got to see some hand to hand fighting (not to hard, no injuries), with some moves to get the person on the ground. Overall it was a pretty good weekend. I just really have to work on push-ups and running so its not so hard on me. Thats about all the interesting stuff this weekend. So I leave you with this .....................................

Friday, August 11, 2006

shopping cart of the future

So, I am currently working on a multi-site shopping cart, that is URL friendly. That way if you were to have a cart it wouldnt be cart.php?cartid=12353456346&productid=3246346346346235246232346325 instead it is like /yoursite.com/products/HotDog. Now isn't that a crap load easier to remember. I think so, also works better for search engines. Thats all i am gonna tell of the project so far, as there is still a lot to develop and a lot that is a secret. I gotta tell you, when its done it will be a BAMF (bad ass mother f***er) ('thank you Dane Cook for that one'). With loads of stuff other subscription based carts don't have.