Login With Any Password
#7

1) Use the %e specifier instead of the %s specifier to escape database inputs. Not using it will leave it vulnerable to SQL attacks. Note: works only with mysql_format.

2) To add to Stinged's reply, you have to specify your database's connection ID before specifying the size when the destination variable is an enum-array:
PHP код:
cache_get_field_content(row, const field_name[], destination[], connectionHandlemax_len); 
3) You're getting the "invalid row index" error because rows start counting at 0 instead of 1 as you thought.

@Shinja, cache_insert_id() retrieves the generated ID from the sent query. You don't generate an A_I ID from a SELECT query. You have to retrieve it like you would retrieve any other integer value:
PHP код:
variable cache_get_field_content_int(row, const field_name[]); 
I haven't tried using cache_insert_id() after a SELECT query, but it sounds logical.
Reply


Messages In This Thread
Login With Any Password - by Allura - 03.08.2016, 21:51
Re: Login With Any Password - by Stinged - 03.08.2016, 22:04
Re: Login With Any Password - by Allura - 03.08.2016, 22:24
Re: Login With Any Password - by Allura - 04.08.2016, 16:35
Re: Login With Any Password - by Shinja - 04.08.2016, 18:36
Re: Login With Any Password - by Threshold - 05.08.2016, 05:45
Re: Login With Any Password - by AndySedeyn - 05.08.2016, 06:29
Re: Login With Any Password - by Shinja - 05.08.2016, 13:32

Forum Jump:


Users browsing this thread: 1 Guest(s)