Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: [RESOLVED] Form validation and Undefined variable error

Started 1 month, 3 weeks ago by tua1
Hello I had a very long brake from coding in PHP. Now I am learning it once again. I want to create a form validation script, which I can use for all my forms with some little changes. The script and html are for testing reason in one file. From form php script can get a values in two arrays, one for required values and second for optional. In my example I use only required....
Site: PHPBuilder.com  PHPBuilder.com - site profile
Forum: Newbies  Newbies - forum profile
Total authors: 2 authors
Total thread posts: 3 posts
Thread activity: no new posts during last week
Domain info for: phpbuilder.com

Other posts in this thread:

NogDog replied 1 month, 3 weeks ago
Add a parameter to that function so that you can pass the $a_req array into the function. (Alternatively you could declare it as global within the function, but that is generally considered sub-optimal programming.) PS: If it's not clear as to why, see http://php.net/manual/en/language.variables.scope. php

tua1 replied 1 month, 3 weeks ago
Quote: Originally Posted by NogDog Add a parameter to that function so that you can pass the $a_req array into the function. (Alternatively you could declare it as global within the function, but that is generally considered sub-optimal programming.) PS: If it's not clear as to why, see http://php.net/manual/en/language.variables...

 

Top contributing authors

Name
Posts
tua1
2
user's latest post:
[RESOLVED] Form validation and...
Published (2009-10-29 11:00:00)
Quote: Originally Posted by NogDog Add a parameter to that function so that you can pass the $a_req array into the function. (Alternatively you could declare it as global within the function, but that is generally considered sub-optimal programming.) PS: If it's not clear as to why, see http://php.net/manual/en/language.variables.scope.php Thanks Problem solved
NogDog
1
user's latest post:
[RESOLVED] Form validation and...
Published (2009-10-29 09:53:00)
Add a parameter to that function so that you can pass the $a_req array into the function. (Alternatively you could declare it as global within the function, but that is generally considered sub-optimal programming.) PS: If it's not clear as to why, see http://php.net/manual/en/language.variables.scope.php

Related threads on "PHPBuilder.com":

Related threads on other sites:

Thread profile page for "[RESOLVED] Form validation and Undefined variable error" on http://www.phpbuilder.com. This report page is a snippet summary view from a single thread "[RESOLVED] Form validation and Undefined variable error", located on the Message Board at http://www.phpbuilder.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity