php - What is wrong with my function? (new to user defined functions) -
i trying post previous page form on it, , rather typing out code on , on again tried making function it, didnt work. in advance
function postorempty($field){ isset($_post[$field]) ? $_post[$field] : ""; } $szfname= postorempty('fname');
you not return value. try add return keyword.
function postorempty($field) { return (isset($_post[$field]) ? $_post[$field] : ""); } $szfname= postorempty('fname');
Comments
Post a Comment