I need solution to isset() function problem

Discussion in 'Programming' started by goldenwaters, Nov 22, 2012.

to remove all ads.
  1. goldenwaters

    goldenwaters Member

    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.
  2. chrishirst

    chrishirst Well-Known Member Staff Member

    He's wrong it doesn't have to be two seperate scripts, one will do.

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

Share This Page