I need to convert some modules previously made by me for MkPortal. Our old portal before XS.
I studied some php pages in root like forum.php, kb.php, etc. but I didn't undersand very well the procedure to use on XS.
I've seen that the db connections is stored in the variable and class $db, so I need to write
In this modules I need to look into user tables if user filled some field, so, if filled the user will be able to see and ordering form.
Some fields are pre-filled reading the content of user table, and some field are left to be filled by the user.
After some JS field validation the user will be able to send the form to another page that adds a record with some fields (the post data previously filled by the user) in a custom table.
It's very simple but I don't know what I have to implement to have my script to work into XS framework sharing its informations and how to draw the final output, to show the MAIN LINK column.
To send queries to the db I found this methods of class $db:
- $query = $db->sql_query("SELECT * FROM table;");
- while ($row = $db->sql_fetchrow($query)) {
- //my script
- }
It will be very useful a small guide to make our own modules.
Thanks!