You are here: Re: php inside html « PHP Programming Language « IT news, forums, messages
Re: php inside html

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация