• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Processing a button in a template with PHP

#1
I'm trying to figure out how to process a button in a XenForo template with custom php code out of my addon script. Please direct me in towards my solution, if at all possible
 
Last edited:

Jake Bunce

XenForo moderator
Staff member
#5
You need to create a route so you have a location to submit the form, then you need a controller for that route to take in the input and write it out to the database. Then create the HTML form that submits to your new route location.

That's the general idea.
 
#6
I still don't understand how to do this under XenForo. I need to have a simple page, with a simple button, that updates a simple row in the user table.

The idea is that the plugin generates a key and sets the key under a new column in the user table "gen_key".