I need solution to isset() function problem

Hello friends,
I am a PHP beginner. I study the ebook, PHP 6, A Beginners Guide. In it the author wrote some examples where he made use of isset() to ensure nothing happens when the submit button is clicked for an empty text box.
Now, my problem is what page do i place this function? is it in the form page or the "action" page? The author said it ought to have been in two pages but for the sake of the lessons, he has put them in one page.
Pls friends, help me out here.
 

chrishirst

Well-Known Member
Staff member
The author said it ought to have been in two pages but for the sake of the lessons, he has put them in one page.
He's wrong it doesn't have to be two seperate scripts, one will do.


PHP:
if (isset($value)) {
//         process submitted details and show success or failure
} else {
//      show form 
}
 
Top