As part of my plans for expanding my programing knowledge i have decided to try out making Classes since i have mastered making usable and very handy functions.
I very much hope this scenario is possible so i can explore the means to make it happen and it will result in hopefully much more secure database queries as they will all use the one method.
So my question today is related to functionality that i would like to know if it is possible to successfully execute my scenario.
Scenario.
Have a class that i can send it variable forum variables and have it add new records to a database table.
form 1
send title
send body
to tbl_post
form 2
send title
send body
send username
to tbl_reply
Class (send to database)
get tbl name
if title sent store title
if body sent store body
if username sent store username
do validation
upload validated data to tbl
return result
Result Page
if result true
successful entree
else
show errors
I very much hope this scenario is possible so i can explore the means to make it happen and it will result in hopefully much more secure database queries as they will all use the one method.
So my question today is related to functionality that i would like to know if it is possible to successfully execute my scenario.
Scenario.
Have a class that i can send it variable forum variables and have it add new records to a database table.
form 1
send title
send body
to tbl_post
form 2
send title
send body
send username
to tbl_reply
Class (send to database)
get tbl name
if title sent store title
if body sent store body
if username sent store username
do validation
upload validated data to tbl
return result
Result Page
if result true
successful entree
else
show errors