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

后端 未结 10 1436
无人共我
无人共我 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:21

    Use SAJAX or switch to JavaScript

    Sajax is an open source tool to make programming websites using the Ajax framework — also known as XMLHTTPRequest or remote scripting — as easy as possible. Sajax makes it easy to call PHP, Perl or Python functions from your webpages via JavaScript without performing a browser refresh.

提交回复
热议问题