Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHP and function


PelleonUK

Recommended Posts

Posted

I'm trying to run a function from a hyperlink on my site. The function is "function1" and is stored in:

 

Catalog/subscribe.php

 

it has two variables that have to be passed "function1(1,2)"

 

How do I go about writing the link to achieve this??

 

Hope someone can help, my php is a bit rusty

 

Cheers

Posted
I'm trying to run a function from a hyperlink on my site. The function is "function1" and is stored in:

 

Catalog/subscribe.php

 

it has two variables that have to be passed "function1(1,2)"

 

How do I go about writing the link to achieve this??

 

Hope someone can help, my php is a bit rusty

 

Cheers

 

http://www.yourwebsite.com/yourpage.php?1=x&2=y

 

Maybe is like this, if not ask google

Bye

Posted

Let me 'now if I understood well.

You want to pass to that function the user_id.

But the user_id is different for each user, so it's not possible to pass that variable to the function via static link.

But maybe I have a solution.

 

You have to create a FORM on the referent page of the function that take the user id and pass it to the function when the user click the send button.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...