PHP, Variables, and Truncating

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Sepsis2x
Forum Newbie
Posts: 6
Joined: Fri Jun 13, 2008 3:32 pm

PHP, Variables, and Truncating

Post by Sepsis2x »

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
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Re: PHP, Variables, and Truncating

Post by Stryks »

How are you getting the data back to order.php from orderprocess.php ?

Code would help also.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Re: PHP, Variables, and Truncating

Post by Maugrim_The_Reaper »

Code would be useful - also what kind of user input filtering is being used? If input is being altered a filtering layer would be a prime suspect.
Post Reply