ExtBasic 13

Learn how to do code review

ExtBasic 13

Post by droptable on Sun Feb 08, 2009 11:45 pm
([msg=17549]see ExtBasic 13[/msg])

I am submitting the answer in the form:
[Edited by: Defience]

Is this the correct way? I am pretty sure I know what the answer is, and I tested it with my own php script but the page won't accept it.
User avatar
droptable
Experienced User
Experienced User
 
Posts: 79
Joined: Sun Jun 01, 2008 5:32 pm
Blog: View Blog (0)


Re: ExtBasic 13

Post by dsurge on Sun Feb 15, 2009 10:54 pm
([msg=17978]see Re: ExtBasic 13[/msg])

kinda stuck a little on this one...

unless i'm missing something, the idea has to do with why m_r_e_s isnt always fool-proof.

and the other possibility has to do with how the script is put together (i.e. validation is sometimes pointless if the script has logical flaws)

i guess what i'm looking for is either "you have the right idea" or "you're out in left field homie"

thanks in advance
dsurge
New User
New User
 
Posts: 6
Joined: Tue Feb 10, 2009 9:45 pm
Blog: View Blog (0)


Re: ExtBasic 13

Post by Defience on Mon Feb 16, 2009 10:46 am
([msg=18018]see Re: ExtBasic 13[/msg])

dsurge wrote:kinda stuck a little on this one...

unless i'm missing something, the idea has to do with why m_r_e_s isnt always fool-proof.

and the other possibility has to do with how the script is put together (i.e. validation is sometimes pointless if the script has logical flaws)

i guess what i'm looking for is either "you have the right idea" or "you're out in left field homie"

thanks in advance


You have the right idea.
User avatar
Defience
Addict
Addict
 
Posts: 1277
Joined: Thu Jun 12, 2008 3:16 pm
Blog: View Blog (0)


Re: ExtBasic 13

Post by jeratt on Mon Feb 16, 2009 3:18 pm
([msg=18026]see Re: ExtBasic 13[/msg])

Can I please have some more clues?
Does it have to do with omitting data?
User avatar
jeratt
New User
New User
 
Posts: 4
Joined: Thu Aug 14, 2008 12:31 pm
Blog: View Blog (0)


Re: ExtBasic 13

Post by gareththegeek on Tue Feb 17, 2009 10:36 am
([msg=18088]see Re: ExtBasic 13[/msg])

The first line (if statement) seems to be wrong, couple of mistakes. Or is it my mistake?
gareththegeek
New User
New User
 
Posts: 3
Joined: Wed Feb 11, 2009 1:34 pm
Blog: View Blog (0)


Re: ExtBasic 13

Post by jeratt on Tue Feb 17, 2009 11:19 am
([msg=18093]see Re: ExtBasic 13[/msg])

gareththegeek wrote:The first line (if statement) seems to be wrong, couple of mistakes. Or is it my mistake?

Yeah. I ran it on my localhost, and it gave me an error.
I had to change:
Code: Select all
if ((!isset($_GET['name']) || (!isset($_GET['email'])) {

To:
Code: Select all
if ((!isset($_GET['name'])) || (!isset($_GET['email']))) {


Notice the missing parentheses?
User avatar
jeratt
New User
New User
 
Posts: 4
Joined: Thu Aug 14, 2008 12:31 pm
Blog: View Blog (0)


Re: ExtBasic 13

Post by dsurge on Tue Feb 17, 2009 11:36 am
([msg=18096]see Re: ExtBasic 13[/msg])

i noticed it as well. figured it was just a way to try to trip people up. unless i'm mistaken, i dont think it has much to do with the mission

to add to that, for those who threw the script on their own server to play with it, doesnt it seem like it doesnt really do what it looks like its trying to do from a practical standpoint (compare the result of a query to one of the input variables)?
dsurge
New User
New User
 
Posts: 6
Joined: Tue Feb 10, 2009 9:45 pm
Blog: View Blog (0)


Re: ExtBasic 13

Post by Defience on Tue Feb 17, 2009 11:43 am
([msg=18098]see Re: ExtBasic 13[/msg])

Keep in mind that the first line was added after the mission was already posted.
User avatar
Defience
Addict
Addict
 
Posts: 1277
Joined: Thu Jun 12, 2008 3:16 pm
Blog: View Blog (0)


Re: ExtBasic 13

Post by gareththegeek on Wed Feb 18, 2009 6:45 am
([msg=18149]see Re: ExtBasic 13[/msg])

I don't understand this challenge, as I looked at the code it seemed too easy but my answers weren't accepted.

So I put the script on my own server and there are loads of ways to get it to reply '1'. Have I missed something here?

Is the first line meant to read
Code: Select all
if (isset($_GET['name']) && isset($_GET['email'])) {


Cheers
G
gareththegeek
New User
New User
 
Posts: 3
Joined: Wed Feb 11, 2009 1:34 pm
Blog: View Blog (0)


Re: ExtBasic 13

Post by Defience on Wed Feb 18, 2009 10:14 am
([msg=18160]see Re: ExtBasic 13[/msg])

Don't forget that the filename is included for a reason.
User avatar
Defience
Addict
Addict
 
Posts: 1277
Joined: Thu Jun 12, 2008 3:16 pm
Blog: View Blog (0)


Next

Return to Extended Basics

Who is online

Users browsing this forum: No registered users and 0 guests