I wanna write the form variables to the database, but it turn in to trouble if one field contains quote mark, for example " or '
PHP Code:
//$db->query_write("
// INSERT IGNORE INTO agent_register(userid, fullname, email, phone_mobile, phone_fixed, address, city, country, agent_type, ic_owner, ic_pc, sell_already, sell_cards, cards_month, pay_direct, pay_atm, pay_transfer, pay_post, pay_mb, pay_other, otherinfo, date_submit)
// VALUES
// ({$vbulletin->userinfo['userid']}, {$vbulletin->GPC['answer1']}, {$vbulletin->GPC['answer2']}, {$vbulletin->GPC['answer3']}, {$vbulletin->GPC['answer4']}, {$vbulletin->GPC['answer5']}, {$vbulletin->GPC['answer6']}, {$vbulletin->GPC['answer7']}, {$vbulletin->GPC['radioanswer3']}, {$vbulletin->GPC['radioanswer4']}, {$vbulletin->GPC['radioanswer4other']}, {$vbulletin->GPC['radioanswer5']}, {$vbulletin->GPC['radioanswer5other']}, {$vbulletin->GPC['dropdownanswer1']}, {$vbulletin->GPC['checkboxanswer1_1']}, {$vbulletin->GPC['checkboxanswer1_2']}, {$vbulletin->GPC['checkboxanswer1_3']}, {$vbulletin->GPC['checkboxanswer1_4']}, {$vbulletin->GPC['checkboxanswer1_5']}, {$vbulletin->GPC['checkboxanswer1_6']}, $vbtextanswer, ". TIMENOW . ")
//");
How can I handle this problem?