質問

I using opencart, passing a product name to the contact page, to be used in the querybox.

URL passed in: http://www.webpage.com/index.php?route=information/contact&id=product_name

Within <head> tags: <?php $productid = $_GET['id']?>

$productid can be accessed within the head, but is undefined elsewhere on the page where needed.

How can I access this variable in the body?

役に立ちましたか?

解決

You shouldn't be using it like that in the first place. OpenCart has built in variables for request vars. Use $this->request->get['id'] instead

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top