Jump to content

to add sign ' in variable


ravMon07

Recommended Posts

i have a problem

 

exmple of code:

 

include 'dbconnect.php';

$query = "INSERT INTO profil (nama,noMatrik,kumpulan,jantina,surg,perubatan,dermatologi,bec,ong,ortopedik,pediatrik,psy,radiologi,bilgagal) VALUES ('$name','$matrik','$kumpulan','$jantina','$surg','$perubatan','$derma','$krk','$ong','$orto','$pedia','$psy','$radio','$bilgagal')";

$result = odbc_exec($odbc,$query);

 

how can i add the data entry that have sign (')?for example : o'neil

 

the code can't read the name since the variable use is '$name'.

please help me asap

Link to comment
https://forums.phpfreaks.com/topic/56134-to-add-sign-in-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.