The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving Languages to Database
#6
This is how I would do it...

For each page, let's say index.php, I would make an index_lang.php

I would select * for the index table in the db (with all the language for that page).

Then I would generate the entire form and all form processing as a foreach loop. Make the column name your label and then echo in the existing text from the db.

It would probably be 15 lines of code to create and update the form for each of the pages and even then, the only thing you'd need to change on each of your lang pages is the table in the select * and update queries.
  Reply


Messages In This Thread
Moving Languages to Database - by Brandin - 11-26-2016, 08:22 PM
Moving Languages to Database - by mudmin - 11-26-2016, 08:46 PM
Moving Languages to Database - by Brandin - 11-26-2016, 10:23 PM
Moving Languages to Database - by winterswolf - 11-29-2016, 06:25 AM
Moving Languages to Database - by Brandin - 11-29-2016, 01:09 PM
Moving Languages to Database - by mudmin - 11-29-2016, 02:02 PM
Moving Languages to Database - by Brandin - 11-29-2016, 02:03 PM
Moving Languages to Database - by mudmin - 11-29-2016, 02:09 PM
Moving Languages to Database - by mudmin - 11-29-2016, 02:12 PM
Moving Languages to Database - by Brandin - 11-29-2016, 02:14 PM
Moving Languages to Database - by mudmin - 11-29-2016, 02:24 PM
Moving Languages to Database - by Brandin - 11-29-2016, 03:17 PM
Moving Languages to Database - by mudmin - 11-29-2016, 03:19 PM
Moving Languages to Database - by Brandin - 02-05-2017, 02:59 PM
Moving Languages to Database - by Brandin - 02-11-2017, 05:09 PM
Moving Languages to Database - by mudmin - 02-11-2017, 10:30 PM
Moving Languages to Database - by Brandin - 02-12-2017, 08:33 PM
Moving Languages to Database - by Brandin - 02-13-2017, 03:02 AM
Moving Languages to Database - by Brandin - 02-13-2017, 03:17 AM
Moving Languages to Database - by Brandin - 07-18-2017, 12:41 AM
Moving Languages to Database - by firestorm - 07-19-2017, 07:17 AM
Moving Languages to Database - by Brandin - 07-19-2017, 12:07 PM
Moving Languages to Database - by karsen - 07-21-2017, 06:39 PM
Moving Languages to Database - by firestorm - 07-21-2017, 07:08 PM
Moving Languages to Database - by Brandin - 07-22-2017, 10:08 PM
Moving Languages to Database - by karsen - 07-22-2017, 11:41 PM
Moving Languages to Database - by Brandin - 07-23-2017, 05:46 PM
Moving Languages to Database - by firestorm - 07-23-2017, 09:26 PM
Moving Languages to Database - by Brandin - 07-24-2017, 12:17 AM

Forum Jump:


Users browsing this thread: 7 Guest(s)