daydreamer Posted November 30, 2008 Share Posted November 30, 2008 I am using PHP to accept payments automatically then update a users credits. switch ($currencyamount) { case "0.60": // add 0.60 worth of credits. I have a list of different payment amounts. Is there anything that currency amount could be that would get the case code to run, other than 0.60? Link to comment https://forums.phpfreaks.com/topic/134904-how-secure-is-this-code/ Share on other sites More sharing options...
Mchl Posted November 30, 2008 Share Posted November 30, 2008 as long as default branch of swich is not defined, no. Link to comment https://forums.phpfreaks.com/topic/134904-how-secure-is-this-code/#findComment-702502 Share on other sites More sharing options...
Mark Baker Posted November 30, 2008 Share Posted November 30, 2008 although I wonder what I'd expect to happen as a user if I tried to add 0.80 worth of credit, or 0.50 Link to comment https://forums.phpfreaks.com/topic/134904-how-secure-is-this-code/#findComment-702517 Share on other sites More sharing options...
daydreamer Posted November 30, 2008 Author Share Posted November 30, 2008 you would get no credit lol yeh i got buttons with the values. so "add 0.60 credit" etc. I was just thinking about if somebody tries to post values to my process PHP script without clicking the button. ok cheers Link to comment https://forums.phpfreaks.com/topic/134904-how-secure-is-this-code/#findComment-702521 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.