Member 10749093 wrote:
for example we make application on visual basic and add 1 text box and 1 button
then put command says if text box 1 . text equals "Hello" then message box . show "Hello World"
(this is just some example. hope it help you to understand)
Now I can see what do your mean. It shows where your confusion is: you think that this is done by PHP. No. You need to finally understand what happens on the server and client parts. PHP, as any other server-side scripting technology, works the way I described. After you got some page on client side, its work is already done. Do make further change, for example, to change the
<td>
content, you need to trigger it by something. But all your page is already on the client side, so forget PHP. All you can do it to use Javascript.
In principle, you can still use PHP, but it will be the separate HTTP request with different HTTP response. You could use Ajax for this purpose, which still is initiated in Javascript. To get the idea, please see:
http://en.wikipedia.org/wiki/Ajax_%28programming%29[
^],
https://api.jquery.com/jQuery.ajax[
^] (for example).
But I don't want to continue with this advanced topic. To do such things, you will need to learn processing HTTP requests with PHP (
http://www.php.net/manual/en/reserved.variables.post.php[
^],
http://www.php.net/manual/en/reserved.variables.server.php[
^]) and find the ways to figure out initial HTTP requests through URI and post data. You really need to use just Javascript to modify some of your HTML elements on some events.
This is how you can change some element's content:
http://www.w3schools.com/jsref/prop_html_innerhtml.asp[
^].
It's more convenient to do with jQuery:
https://api.jquery.com/html[
^],
see also:
https://api.jquery.com/category/selectors[
^].
If (by some reason) you do some Web development and don't know Javascript, you cannot do much. jQuery is just one of highly recommended libraries of Javascript.
—SA