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!
Then on the following page, I want to get these values again... Which do I use $_POST or $_SESSION? I'm doing this but it only returns the PolicyNr and the IDNumber, not the length. Where am I missing something?
I've substituted SESSION with POST in that code you gave me, and gave me the same result... What can cause a session variable from not being stored when posting it?
Do a print_r($_SESSION) to just see if anything is set. Your starting the session correctly on the first page? Also not that the php is executed before the javascript will be.
Well at least you know that there being posted, your just not giving them a value. Go back to where you set them, and print out what you try to assign them to.
I'll do that... Forgive me but I'm going to throw in another question here as well. If you'll look at another post I've posted, this will maybe help solve this issues as well... It is at viewtopic.php?t=21719 .. The last 3or so posts explain what I'm trying to do. I need a number, but the leading zero's are cut off in that javascript function where I assign the value to the session variable and then submit the form. Now I've tried to convert the value to a string and also get the length of the string then, so I can then post both of those and on the next page, I can look at the length of the session variable, and if the length is shorter as the length value, I can just add as many zero's to the beginning of the string as is needed to get it long enough again. That's what I'm trying to do, but since I've tried that, this present problem happened...
But I'll just go and print out the values where I set them, maybe I'll see something obvious there...