Log in

View Full Version : A Hook in a Hook?


Morsolo
10-15-2009, 08:07 AM
Hey Everyone,

My apologies if the title isn't correct, this is my first time properly utilising the Plugin system to write some code for a product I made for myself...

Anyway, I have a code like this in the Plugin PHP Code:

echo "<form method=\"POST\" action=\"$addcodehere\">\n";

I have my required information for the form in the (in this example) $addcodehere template/hook, but obviously, it doesn't work when it is like that in the PHP Code.

How do I write it so it accepts it? Or do forms ALWAYS need to go to an external file?
- Morsolo

Lynne
10-15-2009, 02:47 PM
You shouldn't use echo, you should output to a variable and then use the variable in the template:

$myvar = "<form method=\"POST\" action=\"$addcodehere\">\n";