if you mean executing a php script, and then redirecting, then its
something like this:
>
** php script*
if (TRUE == $jump) {
// yes yes, lets be complient
header("Locatio n: http://www.somewhere.c om/page.html");
}
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.co m/myCart.php</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?
>
** html page **
<html>
<head><title>.. .</title>/head>
<body>
<h1>Hello world</h1>
<p>you were redirected from php</p>
</body>
</html>
>
/Marcin
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.co m/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>Th is 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.
>
You need to place something to click between the <a href...and </a>.
yes. i know.
>
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?
no. I just wanted to know if using the <atag is the only way to
provide a link to the the cart (myCart.php). It's a silly question now
that I think about it.
>>
> You need to place something to click between the <a href...and </a>.
>
yes. i know.
>
>>>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?
>
>
no. I just wanted to know if using the <atag is the only way to
provide a link to the the cart (myCart.php). It's a silly question now
that I think about it.
>
Well, since <ais not PHP code, might I recommend you try asking in
alt.html?
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attgl obal.net
=============== ===
no. I just wanted to know if using the <atag is the only way to
provide a link to the the cart (myCart.php). It's a silly question now
that I think about it.
Well, no ;-) But that's well outside the scope of php.
>>(e.g., <a href="http://www.mydomain.co m/myCart.php</a>)
>
You need to place something to click between the <a href...and </a>.
yes. i know.
>>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?
no. I just wanted to know if using the <atag is the only way to
provide a link to the the cart (myCart.php). It's a silly question now
that I think about it.
>
Well, since <ais not PHP code, might I recommend you try asking in
alt.html?
>
you might. but I think this is a pretentious comment.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attgl obal.net
=============== ===
>>>>>(e.g., <a href="http://www.mydomain.co m/myCart.php</a>)
>>>>
>>> You need to place something to click between the <a href...and </a>.
>>>
>>>yes. i know.
>>>
>>>
>>>>>This works and now I can use the header() function from within the
>>>>>myCart.p hp 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
>>>>>question s is can I just do this without problems?
>>>>
>>> You mean automatically invoke the shopping cart when you load an html
>>>>page?
>>>
>>>
>>>no. I just wanted to know if using the <atag is the only way to
>>>provide a link to the the cart (myCart.php). It's a silly question now
>>>that I think about it.
>>>
>>
>>Well, since <ais not PHP code, might I recommend you try asking in
>>alt.html?
>>
>
>
you might. but I think this is a pretentious comment.
>
>
And since when is this an appropriate group for HTML? It's not. This
is a PHP group - hence the "php" in it's name.
Just trying to direct you to the appropriate place.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attgl obal.net
=============== ===
>Skijor wrote:
>
>>>>(e.g., <a href="http://www.mydomain.co m/myCart.php</a>)
>>>
>> You need to place something to click between the <a href...and </a>.
>>
>>yes. i know.
>>
>>
>>>>This works and now I can use the header() function from within the
>>>>myCart.ph p 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?
>>
>>
>>no. I just wanted to know if using the <atag is the only way to
>>provide a link to the the cart (myCart.php). It's a silly question now
>>that I think about it.
>>
>
>Well, since <ais not PHP code, might I recommend you try asking in
>alt.html?
>
you might. but I think this is a pretentious comment.
And since when is this an appropriate group for HTML? It's not. This
is a PHP group - hence the "php" in it's name.
>
Just trying to direct you to the appropriate place.
>
Sorry. My bad.
>
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attgl obal.net
=============== ===
Comment