Jump to content
MakeWebGames

Recommended Posts

Posted

While I see where you was going with this I simply recoded the file, Now you can see what over the top is xD

 

There was no errors when I did a quick test however my version of MCCodes is highly edited and restructured so there may be errors, however i'll happily fix :)

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

meh. was bored so thought I'd help

Posted

Jordan, why do you escape 'user' twice? You establish it's a number with ctype_digit()

And you don't need to end the page when using else, I also don't get why in some instances you force echo to be a function and others you don't ?

Also, on your INSERT $userid will insert as "$userid" - not a number as you haven't defined it. This will happen when using single quotes, you can get away with it using double quotes because it looks for a variable

Otherwise, nice.

Posted

Again with the Exceptions, Djkanna XD

Maybe you should explain what they do, not everyone will know what the try/catch method is.

I'd much prefer to use Djkanna's version :P

Posted

Um this may help people understand it a little better (manual) Here

The exceptions class isn't exactly suitable in this situation I would much prefer to use an actual error class however as it's a built-in class therefore available to everyone so I didn't think it would do much damage to use it like this in this example.

Thanks Equinox in my opinion it's much clearer and cleaner this way.

Posted

@Equinox my version was only to give a general idea, It was early in the morning and basically i couldn't be arsed, I have a habbit of using abs(intval( because i rarely use the ctype_digit on my project due to having a function that handles that, so i started off then realised i could actually use that, so yeh lol

 

djk great job :)

 

Posted

So you have a function that does the same as ctype_digit() and you still use abs(intval()) ? Or you have a function that does part of what ctype_digit() does and doesn't check it's completely a number so you need abs(intval()) aswell?

Seems a bit pointless to me :/

Posted

I have a function that does the same as ctype_digit, however i could not use that in the script so I started of by using abs(intval then decided to use the ctype_digit() function but basically couldn't be bothered moving the abs/intval

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...