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!
It's because the conditions in the while loop are never being exceeded. Eg, $counter is always <= 5, $error['code'] is always "" and $_POST[$sku] is never null.
while ((isset($_POSTї$sku]) AND ($counter <=5) AND ($errorї'code'] == "")) {
If that doesn't work, I think you may have problems with your error handling. I've never tried the OCI functions before, so I don't know how they really work. However, it seems that if OCIExecute fails, then $error is not updated. The next time through the loop, it would still be "", at least I think it would be. Try echoing $error every time to see what it's doing. Is there any reason why you aren't using the error reporting on OCIExecute? Perhaps that would be a better way to do it. I guess this still doesn't explain why the other two conditions are failing. Do you know that $counter is getting incremented? Try echoing $counter in the loop to see if you actually do get an infinite loop. If not, perhaps it is hanging trying to connect to the database. Well, those are my suggestions, I hope it helps.