Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
How do I type and insert chemistry formulas in mysql database and display them in rendered format

I am working on an online medical exam project, which has the Admin panel/webpage where the Admin can add/set questions and answers to them, and the User panel where the user logs in to the application for him/her to take the test. For the Chemistry questions, a few of them have complex formulas which involve subscripts and superscripts in them and also a few special characters. I have to develop an interface where the Admin can enter these questions consisting formulas into the text field and it gets stored in the mysql database and the same would be rendered and displayed to the User when taking the test.

How can I make the text field accept special characters or in other words how can the Admin enter the formulas and then store them in the DB and display the formulas in the test. Please help, I have looked on the net but was unable to find a solution for it. Also, I am using the codeigniter framework for this application.

Below is the code am using in my controller :
$inputdata['question']      = str_replace("&","&",htmlentities($this-
>input->post('question')));

The main problem is to have the Admin enter special characters in text field and save that to the Database and then display it and also how can I make Admin to add images to the question? Am sorry if the question was too long. (Below Image shows the way it needs to b displayed] Please help me with this, Thanks.

enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can use the images of that formula instead of text. For storing image,you can create a field where you'll store the path to the image.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!