PHP, Variables, and Truncating
Posted: Thu Sep 18, 2008 8:19 pm
Ok guys, I'm sure that I'm ridiculously stupid for not knowing this, but here goes...
I've designed a php ecommerce section for my employer's website. Things were going great until we realized our variables are being truncated. Let me explain how I have it set up. I have our order.php page that users verify their order, but more importantly, gathers all their shipping and billing info. Once they hit submit on the page, it takes them to our orderprocess.php to verify their information. If their information was complete, their order is processed and they continue to the next step, if their info was incomplete, it knocks them back to the order.php page.
Here's the problem, if they enter don't enter all the necessary fields, and get kicked back to the order.php page, any variable that has more than one word stored gets truncated to just the first word. So for example, if they enter their address as 123 fake street, and they submit that, and the rest of their form was rejected in orderprocess.php, the address variable truncates it down to just 123. Any suggestions? Also, let me know if it would be helpful for me to post some code. Thanks
I've designed a php ecommerce section for my employer's website. Things were going great until we realized our variables are being truncated. Let me explain how I have it set up. I have our order.php page that users verify their order, but more importantly, gathers all their shipping and billing info. Once they hit submit on the page, it takes them to our orderprocess.php to verify their information. If their information was complete, their order is processed and they continue to the next step, if their info was incomplete, it knocks them back to the order.php page.
Here's the problem, if they enter don't enter all the necessary fields, and get kicked back to the order.php page, any variable that has more than one word stored gets truncated to just the first word. So for example, if they enter their address as 123 fake street, and they submit that, and the rest of their form was rejected in orderprocess.php, the address variable truncates it down to just 123. Any suggestions? Also, let me know if it would be helpful for me to post some code. Thanks