Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda