Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

186
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda