Hello everybody, I want to create one insert function in php, which I will use to insert data into database.
Of course all inserts are not the same, some use one table others use other, tables have different column numbers etc. What is the best way to do this ?
I'm currently on the web page for member registration, now I don't want to allow everyone to register, I want admin to approve which members will get approved and which ones will not, so I set one hidden field to 0 and after approval it becomes one.
CASE: Someone comes to the website and changes input field value to 1 with firebug and submits the registration, automatically gets approved, I didn't try this I'm just considering the possibility. Now if I put member_active inside insert function then it won't work for other insert queries with few/less database column rows.
What is the way to do this, is the global/general insert function good idea at all, I pretty much know how to program all of this, but lately I've become more careful about data/efficiency and such things that can make your website better/worse so I want a good start. Thank you