Jump to content

pfkdesign

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by pfkdesign

  1. hi, i dont know how to do that! this is the problem, i have never made such this requirement
  2. Hi, $date = date("d-M-Y h:i:s", $array['date']); Regards
  3. Hi everybody. I have some data in database, i need to create/update file when i update the database by submitting the form 1) the file must contain all the content in database 2) each time i generate or update the record, it must update(or rewrite on the file all the record + new record) any idea?
  4. hi everybody, I'm developing a web site and i used htacces to generate url friendly, the web site is multilingual and i have problem to changing the language; ex. url : http://www.example.com/en/news/ or http://www.example.com/en/contents/21/some-contents/ now i want to change the language to deand the url must looks like: url : http://www.example.com/de/news/ or http://www.example.com/de/contents/21/some-contents/ .... on the page i have a menu with flags to change the language but i'm redirecting to root, i want to stay on that page and only change the language of that page, (not redirecting to root) any idea? thank you in advanced.
  5. hi, tnx for reply, i want to be login as his/her account in the system , i dont want the information ( detail about users) but instead of log out and log in with users account, i like to do it by one click in admin area, ( then i will log out as admin and log in as the users account which i desire ). any idea?
  6. hi everybody. i wound how can i switch users in admin area to test the users account(log in into the users account by click on link and log in you as his/hes account) using session? SESSION name= user_login_id any idea? ???
  7. hi everybody: i made a search in ajax( php ,mysql, js, xml). it is works perfect on english site but in german site, as soon as i enter the special charter it encoded so i think i need to decode the url witch is called by js. request, so here is the js code function getScriptPage(div_id,content_id) { glossary_id = div_id; content = document.getElementById(content_id).value; theurl =escape(content); enurl= TestDecoding(theurl); http.open("GET", "/search_results.php?content=" + enurl, true);//i need to decode the url calling here http.onreadystatechange = handleHttpResponse; http.send(null); } any idea how can be done? ??? ??? ??? :'( :-\
  8. thank you for your reply. unfortunately the number of entry is not much but many table are related to this one and if i change this table, i have to change many things. :-\ so i checked the structure and it has 4 level deep. :-X , so from here i dont know what to do , ??? :-\
  9. unfortunately, it is too late to split data and there is no way to do something with that ( this table has already 300 entry) beside it is like menu and if parrent id is NULL , it is the first level and if the parent id is equal to the main id it is the child so , :-\ now what should i do, any idea ???
  10. hi everybody. i wounder if you can help me to show my flowing code in tree or shows items with its parents in different level like: ex. item 1 --item1.1 -----item1.1.1 item2 --item2.1 --item2.2 .. description: the database id_mnu idmnu_mnu <- parent id label_mnu . ... <?php echo "<ul>"; do { echo $row_rsmenu['label_mnu']; } while ($row_rsmenu = mysql_fetch_assoc($rsmenu)); echo "</ul>"; ?> any idea ?
  11. hi everybody. i have problem with rounding and i wounder if you can help me. i want to round numbers which rounded down if it is less than *5, and round up if greater than *5 ex. if there are between 10-14 shows 10, 15-19 shows 20 14 -> 15 12 -> 10 9 -> 10... $current= date('Y'); $yeasexperience= $row_rsexperience['years_ex']; $total= $current - $yeasexperience; echo round($total); echo " years of experience"; any idea?
  12. hi everyone. I would like to know whether you know how i can show the result of many to many relation in trees? here is the description: there are 3 table 1) users: id_usr, nanme , family ... 2) menu: id_mnu, idmnu_mnu (it is Parent ID), lable_mnu, url_mnu... 3) qualification_join_usr : qualification_id, users_id here are the codes. SELECT menu.translation_id, menu.label_mnu, qualification_join_usr.users_id FROM menu LEFT JOIN qualification_join_usr ON (qualification_join_usr.qualification_id=menu.translation_id AND qualification_join_usr.users_id=0123456789) ... echo "<ul>"; $cnt2 = 0; if ($totalRows_rsuser_usr>0) { $nested_query_rsmenu = str_replace("123456789", $row_rsuser_usr['id_usr'], $query_rsmenu); mysql_select_db($database_rsheattreat); $rsmenu = mysql_query($nested_query_rsmenu, $rsheattreat) or die(mysql_error()); $row_rsmenu = mysql_fetch_assoc($rsmenu); $totalRows_rsmenu = mysql_num_rows($rsmenu); $nested_sw = false; if (isset($row_rsmenu) && is_array($row_rsmenu)) { do { //Nested repeat echo "<li>"; echo $row_rsmenu['label_mnu']; echo "</li>"; } while ($row_rsmenu = mysql_fetch_assoc($rsmenu)); } } echo "</ul>"; ?> so in this way it list all of the records in 1 level , i have 4 level deep in this list so i need to list all like : level 1 --level1-1 --level1-2 level2 . . ... any idea? ??? ???
  13. hi i dont know what's wrong with this code, $return .= '<input id="mtm_'. $myItem['itemURL'] .'" name="mtm_'. $myItem['itemURL'] .'" type="checkbox" value="1" '. if ($row_rsmenu['id'] != "") { echo "checked"; }' />'; as soon as i put "if"statement, i will get the "Syntax error, unexpected T_IF" i dont know where is the problem, any idea? ???
  14. hi , unfortunately it is not working,i used ajax ( customized code js and php code ) , and i can not understand why it is not working ?! ??? i'm adding dynamically a row by pressing (+) or removing by pressing (-) (a dropdown menu and a text field) and inserting into the database, it is working when i use static label. so it should be a problem to use php with js , the javascript executed first and pass blank label (it is not let to execute php) !! thats why it is return blank label for dropdown menu! any idea?
  15. any idea ? !!!!!! nobody knows ?!!! ??? ??? ???
  16. hi, i just wondering how can i use php in js. i have the flowing javascript code to add dynamic row, but i have an array in this js (HeatSelectOption[]) to get the label from php . here is the step.js . function addRowToTable() { var tbl = document.getElementById('tblheat'); var lastRow = tbl.rows.length; // if there's no header row in the table, then iteration = lastRow + 1 var iteration = lastRow-4; var row = tbl.insertRow(lastRow); // left cell var cellLeft = row.insertCell(0); var textNode = document.createTextNode(iteration); cellLeft.appendChild(textNode); // select cell var cellRightSel = row.insertCell(1); var sel = document.createElement('select'); sel.name = 'steptype_'+ iteration; sel.id = 'steptype_'+ iteration; sel.options[0] = new Option(HeatSelectOption[0], '1'); sel.options[1] = new Option(HeatSelectOption[1], '2'); cellRightSel.appendChild(sel); // right cell var cellRight = row.insertCell(2); var el = document.createElement('input'); el.type = 'text'; el.name = 'textfield1_'+ iteration; el.id = 'textfield1_'+ iteration; el.size = 10; } and the array on the page is: <script> HeatSelectOption = new Array(); HeatSelectOption[0] = "<?php echo $selectOption['first_label'];?>"; HeatSelectOption[1] = "<?php echo $selectOption['second_label']; ?>"; </script> any idea ? ??? ???
  17. is it possible to show the value on-demand ? ???
  18. wooow thank you so much, it works perfectly. exactly what i want.
  19. hi guys, i have a problem and perhaps you can help me ! ??? ??? i have a textfiled1 "Menu Name" and i have another textfield2 "URL" of the menu,by default the value of the url is /controller/ID/ (it is come from database) what i want is: when i'm writing in to text field ="label_mnu_1", text field = "url_link_mnu_1" get the value and change the url in to /controller/ID/value texfield1/ <label for="label_mnu_1"> Menu Name</label> <input type="text" name="label_mnu_1" value="" id="label_mnu_1"/> <label for="url_link_mnu_1">URL: </label> <input name="url_link_mnu_1" type="text" id="url_link_mnu_1" value="/controller/ID/$/" size="30"/> put value of label_mnu_1 here ^ any idea? thank you in advance
  20. than you paul2463 for you reply , the first warning is solved but still i have this warning : Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource... in local server (localhost) is not show up , but in main server is shewing this warning! any idea?
×
×
  • 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.