patadura Posted October 5, 2011 Share Posted October 5, 2011 Hi, I have the following problem: I want to send from product.tpl a variable (or more) to an external php file. What I do is the following in product.tpl {assign var='idproducto' value=$smarty.get.id_product} <a href="http://localhost/gyc/themes/modules/tabrecetas/miphp.php?variable_idproducto={$idproducto}">Este el id del producto: {$idproducto}</a> In miphp.php external $variable_recibida_idproducto = $_GET['variable_idproducto']; echo $variable_recibida_idproducto; This does not work because I miphp.php show anything. I searched the forums and have not found anything that might help (or do not know it) if someone can give me a hand I would appreciate very much. Greetings to all Link to comment Share on other sites More sharing options...
Raphaël Malié Posted October 5, 2011 Share Posted October 5, 2011 Hello, when you check your link, has it the ID in the URL ? For example, is your link like this : miphp.php?variable_idproducto=A_NUMBER ? Link to comment Share on other sites More sharing options...
patadura Posted October 6, 2011 Author Share Posted October 6, 2011 Hello, I do not know, I put the variable directly. I must make sure that this variable contains an integer, right? sorry for my English Link to comment Share on other sites More sharing options...
Raphaël Malié Posted October 6, 2011 Share Posted October 6, 2011 Hello, yes that's it, if you want to pass your ID to an other pass, this ID must be in the URL. So if there is no number in URL, this mean that your variable in the template is empty. Link to comment Share on other sites More sharing options...
Recommended Posts