Jump to content

how to store ajax result information to database


aaront1

Recommended Posts

Hi, I want to create a new module tab to upload files under admin->product.

 

so far, I have wrote new_module.php, and it has a function hookDisplayAdminProductsExtra() ->display.tpl to display the upload form and button.

and below that form will be shown all the filenames that uploaded before and delete checkbox for each files.

 

in display.tpl I also have the ajax call to post data to function.php.

 

in function.php, I am able to save the upload files in the location I want, and display back the result to display.tpl through the ajax function.

but the part I am lost is, how I can connect to the database to store my uploaded URLs infomation? it seems that in function.php I have no way to connect to the PS database.

 

or if not doing the ajax way, how can I achieve this new tab to store the upload files URL to database

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...