You are here: Re: back to html page from php « PHP Programming Language « IT news, forums, messages
Re: back to html page from php

Posted by Marcin Dobrucki on 11/15/06 08:58

Skijor wrote:

> yes. this is what I mean. What about the converse? Calling a php
> script from within html? I have an html static page that uses links to
> a 3rd party shopping cart.
> I want to use a shopping cart I wrote myself using php/mysql but what
> do i replace the links with? I tried replacing them with a link to my
> php cart script
> (e.g., <a href="http://www.mydomain.com/myCart.php> </a>)

You need to place something to click between the <a href...> and </a>.

> This works and now I can use the header() function from within the
> myCart.php script to get back. I guess my question is do I have to use
> the <a href=> tag to invoke the script on the server side? or a better
> questions is can I just do this without problems?

You mean automatically invoke the shopping cart when you load an html
page? Well, you can mix php and html if you wish, just call your html
page <name>.php, and it will be processed as php, for instance like this:

foo.php:

<html>
<head><title>This is a sample</title></head>
<body>
<h1>Welcome</h1>
<?php
if ($_GET["foo"] = "something")
echo "Excellent, dude!";
?>
<p>This is an html-page paragraph</p>
</body>
</html>

Alternatively, use JavaScript in the page to, eg. fire up a popup window
(do a search for "javascript" and "popup"), and that can source the
cart. You can also do something with frames, etc. It will really very
much depend on what you want to achieve.

/marcin

 

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

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