| Re: drop down select - php/mysql help |
| by culex on 2010/1/10 16:30:22 No problem. I can only forward the excellent advise Trabis gave me some time ago always to sanitize what you put in sql queries. More fast would be actually to give the url to the post where he very nice give me the explanation. Have a nice day and please just ask if I can help with anything :) |
| Re: drop down select - php/mysql help |
| by sarahmx on 2010/1/10 14:51:13 Thank you...culex this module i'm developing is actually for my office... any other tips to prevent sql injection ? |
| Re: drop down select - php/mysql help |
| by culex on 2010/1/10 13:05:51 You should consider in the places where you use an user input in sql query to sanitize this to avoid sql injection (old advise given to my by trabis ;) for instance where you have. le="color: #000000"><?php else { $result = mysql_query("SELECT * FROM info_unit WHERE log_id=$log_id"); to add an intval($value) like this le="color: #000000"><?php else { $result = mysql_query("SELECT * FROM ".$xoopsDB->prefix("info_unit")." WHERE log_id=".intval($oa_id).""); |
| Re: drop down select - php/mysql help |
| by sarahmx on 2010/1/10 1:21:42 i forgot to put $occupation=$occ_list; in the first code and i've solved this...TQ i just changed the if statement and MySQL query.lol |
| drop down select - php/mysql help |
| by sarahmx on 2010/1/9 14:24:01 First of all sorry for my English Im a php/xoops coding newbie..i'm currently testing doing a simple module for XOOPS cms... i'm having trouble with this can anyone help me ok i have this two table info_unit : log_id, occupation myocc : id, occ_list input the above code working properly...the drop down will display value from myocc.. and the value is submitted to info_unit table successfully the problem is this code below when i want to edit a record in the edit form the value that i selected in the input form is not display/choosen update record |