|
Posted by Jerry Stuckle on 11/13/06 02:02
Skijor wrote:
> To call a php script from inside an HTML page I use the href tag with a
> link like http://www.mydomain.com/script.php. This works but is it the
> best way / only way?
>
You're problem is PHP is server-side. To access a PHP script, you must
submit a page to the server. This script can then output information,
redirect the user back to the original page or onto a completely new
page. See the header() function.
An alternative is AJAX, which uses Javascript to help you call scripts
on the server.
But basically your webserver environment requires a different way of
thinking - each page is separate from others. Any requests to the
server will load a new page (or frame), erasing what was previously
there. So if you want to show the data again, you need to display the
page again.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|