php - Getting error with function to check for set variables to propagate form fields -


I am creating a form that promotes field names if a specific condition is completed with the variable from the SQL query And if it does not, it leaves the field blank.

I have a function that checks whether the checkbox has been set or not, if so, then a query is running and get value to enter in the field, if it is' I field Do not want to be empty, but I'm getting an error message in that field that the variable is not defined.

  function addEditValue ($ fieldName) {global $ edit_check_gtg; If ($ edit_check_gtg) {echo $ fieldName; }  

};

And this is html that brings it to the field

  time:  & Lt; Br>  

I tried to make a function to test, if the variable is set using the isset (), but not working until I write it every time Does

  function Amiset ($ fieldName) {if (isset ($ fieldName)) {echo "I am set"; } And {echo "I'm not set"; }};  

I can understand that there is another way to do this. I know that I could have added the variable at the beginning and could make them an empty string, but I did not know that there is a brief investigation within these functions for these things. Thanks for your help.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -