Jump to content

ipwnzphp

Members
  • Posts

    129
  • Joined

  • Last visited

    Never

Everything posted by ipwnzphp

  1. I got it fixed now i think and here was what i came up with to use. <? $Desc = "$_POST[desc]"; // Joomla function find_joomla($Desc) { $keyword = "joomla"; $find = strpos($Desc, $keyword); if ($find == true) { echo $keyword . "Found"; } } echo find_joomla($Desc); // ASP function find_asp($Desc) { $keyword = "asp"; $find = strstr($Desc, $keyword); if ($find == true) { echo $keyword . "Found"; } } echo find_asp($Desc); ?>
  2. the code below is showing fount asp even though asp is not in the $description var. How do i fix this? function textsearch($desriptionStr, $searchAry) { $matchAry = array(); foreach ($searchAry as $searchStr) { $matchAry[] = $searchStr; } return $matchAry; } $search_strings = array('joomla', 'web design', 'asp'); $description = "i need some joomla and web design work done"; $matches = textsearch($description, $search_strings); echo "There are " . count($matches) . " matches"; if (in_array('joomla', $matches)) { echo "<br><br>Fount Joomla<br><br>"; } if (in_array('web design', $matches)) { echo "Fount Web Design<br><br>"; } if (in_array('asp', $matches)) { echo "Fount ASP"; }
  3. There are 0 matches Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/gurumani/public_html/quotesl/system/index.php on line 106 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/gurumani/public_html/quotesl/system/index.php on line 110
  4. Next question what if i wanted to add if statements to it like if ($searchStr == "joomla") { $site = f_open("http://www.google.com"); }
  5. I need a function in php where i can search the text then do if statements based off the keywords. The code below states that if it finds joomla then its correct. but lets say i need to find web design also. if both are there it needs to say we fount both if only 1 is there it needs to say we fount only 1 $search_for = "joomla"; $the_items_description = "i need some joomla and web design work done"; function textsearch($the_items_description) { global $search_for; $pos = strpos($the_items_description, $search_for); if ($pos === false) { return false; } else { return true; } } if (textsearch($the_items_description) == true) { echo "correct"; } else { echo "incorrect"; }
  6. Firefox error console said this Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 834" data: no]
  7. On the t7 text box it shows document.invoice.price_1.value * document.invoice.qty_1.value where price_1 and qty_1 is dynamic so it could show 2 or 3 or 4 and etc. You will see this in the code. Below is my code. Please take a look been messing with this for 5 hours now! Everything else works prefect just this part is a little freaky! What i am trying to do is this when we make a new dynamic row we can enter the cost pre item and qty of the item and then it spits back a total price after we enter the qty of them item in. <script type="text/javascript"> function addrows(cid) { var tbody = document.getElementById(cid).getElementsByTagName("TBODY")[0]; var row = document.createElement("TR"); var numi = document.getElementById('theValue'); var num = (document.getElementById('theValue').value -1)+ 2; numi.value = num; var t1 = document.createElement("TD"); t1.innerHTML = '<a href="javascript:;" onClick="addrows(\'myTable\')">Add</a> - <a href="javascript:;" onClick="removerows(this)">Remove</a>'; var t2 = document.createElement("TD"); t2.innerHTML = '<select name="item_'+num+'"><option value="0">-------</option><option value="1">Service</option><option value="2">Product</option></select>'; var t3 = document.createElement("TD"); t3.innerHTML = '<textarea name="desc_'+num+'" cols="35" rows="4" disabled></textarea>'; var t4 = document.createElement("TD"); t4.innerHTML = '<input name="price_'+num+'" type="text" size="12" />'; var t5 = document.createElement("TD"); t5.innerHTML = '<input name="qty_'+num+'" type="text" size="6" onChange="addits()"/>'; var t6 = document.createElement("TD"); t6.innerHTML = '<select name="tax_'+num+'"><option value="0">0%</option><option value="1">10%</option></select>'; var t7 = document.createElement("TD"); t7.innerHTML = '<input type="text" name="g" size="5" maxlength="5">'; row.appendChild(t1); row.appendChild(t2); row.appendChild(t3); row.appendChild(t4); row.appendChild(t5); row.appendChild(t6); row.appendChild(t7); tbody.appendChild(row); } function removerows(node) { var tr = node.parentNode; while (tr.tagName.toLowerCase() != "tr") tr = tr.parentNode; tr.parentNode.removeChild(tr); var numi = document.getElementById('theValue'); var num = (document.getElementById('theValue'). value -1); numi.value = num; } // This is not working right function addits() { var prd = (document.getElementById('theValue') . value); document.invoice.g.value = 'document.invoice.price_'+prd+'.value * document.invoice.qty_'+prd+'.value'; } // end of not working right function addit() { document.invoice.s.value = document.invoice.price_0.value * document.invoice.qty_0.value } </script>
  8. nope look. http://www.isledo.com/site/index.php?p=1&sp=7
  9. personally i think this could be sorted via SQL statement! It should like this http://www.trixielugosi.com/code/hmm.jpg
  10. Nope that aint the issue. The levels should be seamless with the country's. it should only show the country once! not 2 times.
  11. It repeats the country like Anguilla shows up 2 times the levels are spoused to be the frist then under the countrys. The dobules are still there look now.
  12. Here i will just link u to it. there is a lot of results http://www.isledo.com/site/index.php?p=1&sp=7
  13. Sweet it worked! Now 1 last issue. http://www.isledo.com/site/index.php?p=1&sp=7 go there u see how it repeats the country's. How can i fix that?
  14. When i did a print_r() it outputted Array ( [0] => [1] => [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => [23] => [24] => [25] => [26] => [27] => [28] => [29] => [30] => [31] => [32] => [33] => [34] => [35] => [36] => [37] => [38] => [39] => [40] => [41] => [42] => [43] => [44] => [45] => [46] => [47] => [48] => [49] => [50] => [51] => [52] => [53] => [54] => [55] => [56] => [57] => [58] => [59] => [60] => [61] => [62] => [63] => [64] => [65] => [66] => [67] => [68] => [69] => [70] => [71] => [72] => [73] => [74] => [75] => [76] => [77] => [78] => [79] => [80] => [81] => [82] => [83] => [84] => [85] => [86] => [87] => [88] => [89] => [90] => [91] => [92] => [93] => [94] => [95] => [96] => [97] => [98] => [99] => [100] => [101] => [102] => [103] => [104] => [105] => [106] => [107] => [108] => [109] => [110] => [111] => [112] => [113] => [114] => [115] => [116] => [117] => [118] => [119] => [120] => [121] => [122] => [123] => [124] => [125] => [126] => [127] => [128] => [129] => [130] => [131] => [132] => [133] => [134] => [135] => [136] => [137] => [138] => [139] => [140] => [141] => [142] => [143] => [144] => [145] => [146] => [147] => [148] => [149] => [150] => [151] => [152] => [153] => [154] => [155] => [156] => [157] => [158] => [159] => [160] => [161] => [162] => [163] => [164] => [165] => [166] => [167] => [168] => [169] => [170] => [171] => [172] => [173] => [174] => [175] => [176] => [177] => [178] => [179] => [180] => [181] => [182] => [183] => [184] => [185] => [186] => [187] => [188] => [189] => [190] => [191] => [192] => [193] => [194] => [195] => [196] => [197] => [198] => [199] => [200] => [201] => [202] => [203] => [204] => [205] => [206] => [207] => [208] => [209] => [210] => [211] => [212] => [213] => [214] => [215] => [216] => [217] => [218] => [219] => [220] => [221] => [222] => [223] => [224] => ) Now what would i put in the if statement to make this work.
  15. Ok, I tried to print_r the array and it returned this Array ( )
  16. http://www.isledo.com/site/index.php?p=1&sp=7 It just don't list them back right.
  17. Yes i did replace the x for all of them. MadTechie had me do a var_dump and it returned 1 so i don't think its going to work.
×
×
  • 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.