how to invoke function writen in a validation.php and stroe all function name in database.
Posted
by
saint
on Stack Overflow
See other posts from Stack Overflow
or by saint
Published on 2011-01-16T10:18:25Z
Indexed on
2011/01/16
10:53 UTC
Read the original article
Hit count: 276
Respected all, i'm in trouble. I created a file with name validation.php and store all my validation functionality in this file with different function names like,
check_textbox(parm1, pram2, pram3, pram4) { // Definition here }
check_chkBox(parm1, pram2) { // Definition here } and so on.....!
then i created a table in mysql with the name tbValidation and stored all the function name with parameters in a table. the record stored in table look like as:
interfaceid---------- functionNameWithReturnValue
1 ------------ check_textbox(parm1, pram2, pram3, pram4) = 1
2 ------------ check_textbox(parm1, pram2, pram4) = 0
3 ------------ check_textbox(parm1, pram2, pram4) = 1) AND (check_chkBox(parm1, pram2)=0)
when i fetch record from database i want to invoke those functions that store in validation.php
$data = mysql_fetch_array($drow);
if($db->row_count > 0)
{
// when i fetch row one from database. I used this one but not working
// @ $data[0] have value "check_textbox(parm1, pram2, pram3, pram4) = 1"
if($data[0])
{
// Do this
}
}
How i can do this task...? :(
© Stack Overflow or respective owner