Calling a PHP function from an HTML form in the same file

后端 未结 10 1435
无人共我
无人共我 2020-12-05 05:48

I\'m trying to execute a PHP function in the same page after the user enters a text and presses a submit button.

The first I think of is using forms. When the user s

10条回答
  •  [愿得一人]
    2020-12-05 06:20

    Take a look at this example:

     
    
    
    
     
    
    
    
    

    PHP Form Validation Example

    "> Name:

    E-mail:

    Website:

    Comment:

    Gender: Female Male

    Your Input:"; echo $name; echo "
    "; echo $email; echo "
    "; echo $website; echo "
    "; echo $comment; echo "
    "; echo $gender; ?>

提交回复
热议问题