Question: fetch data from HTML to PHP using Single file How to fetch data from HTML to PHP using Single file Introduction In my last article



fetch data from HTML to PHP using Single file How to fetch data from HTML to PHP using Single file Introduction In my last article I will explained how we can fetch data from html to php in separate files. In this article I am going to explain how we can fetch data from html in the same file. Let's take the same example where we have to take two numbers from the users. Create php file and add html code to create user interface. Now I want when I click on submit button then my php code will start execution. So we have to use isset function to check whether form has been submitted or not. sum.php We will add code in the following dandelin
Now execute this code and you will get following output: 1 localhost:8080/sum.php x - C n 5 localhost8080/sum.php Enter first mumber:- 23 Enter Second number:-190 Sum Figure 1 localhost:8080/sum.php?t C# localhost:8080/sum.php?t1=23&t2=90&b1=Sum The sum of 23 and 90 is 113 Enter first number Enter Second mumber:- Sum Figure 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
