• Need help reverse engineering a simple PHP code
    5 replies, posted
-snip-
Where did you get that in the first place? The only columns used in that script are steamid and rank (the former appears to be used as a key). The script is also terrible and open to SQL injection.
-snip-
[QUOTE=Samg381;47112416]This was from a auto donation code I used a while ago.[/QUOTE] So you lost the database schema, documentation (assuming there was any), and the other parts of the code? [QUOTE]Would you elaborate on the formats of the two columns?[/QUOTE] The script doesn't say. I have no idea what "rank" is supposed to be. Steam ID could be a 17-digit number starting with 7656119, or just the digits after 7656119 in that number, or a string (STEAM_0:X:XXXXXX). Without all the other code that would use this table, there's no way to tell. [QUOTE]Would I select key for 'steamid'?[/QUOTE] It seems to me that steamid is supposed to be a primary key, yes. [QUOTE]Also did you spell them as they should be listed on the SQL?[/QUOTE] Yes, I did. If the above code (and config.php) are all you have, what you're trying to do is probably not gonna work. And as I said, this script is poorly written and insecure. If you use it, people will be able to run arbitrary queries against your database. [editline]10th February 2015[/editline] I hope you didn't pay for this :v:
-snip-
-snip-
Sorry, you need to Log In to post a reply to this thread.