Jump to content

sasa

Staff Alumni
  • Posts

    2,804
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by sasa

  1. $out .= join( "$v1 ", map ("<a href=sb.php?action=display&login=$_&session={$input['session']}>$_</a>", $favorites)); i'm not perl expert
  2. try <?php $test = 'mc_gross = 56.24 protection_eligibility = Eligible address_status = confirmed item_number1 = tax = 0.00 item_number2 = payer_id = H6RLXPBW3ZDW6 item_number3 = address_street = 1 Main St payment_date = 13:16:18 Feb 19, 2009 PST payment_status = Completed charset = windows-1252 address_zip = 95131 mc_shipping = 5.44 mc_handling = 0.00 first_name = Test mc_fee = 1.93 address_country_code = US address_name = Test User custom = 3 payer_status = verified business = sss_1233964440_biz@zoominternet.net address_country = United States num_cart_items = 3 mc_handling1 = 0.00 mc_handling2 = 0.00 mc_handling3 = 0.00 address_city = San Jose payer_email = bbb_1233964418_per@zoominternet.net mc_shipping1 = 5.44 mc_shipping2 = 0.00 mc_shipping3 = 0.00 txn_id = 9M838033K29070309 payment_type = instant last_name = User address_state = CA item_name1 = Medium Sausage Pizza receiver_email = sss_1233964440_biz@zoominternet.net item_name2 = Medium Ham and Pinnapple Pizza payment_fee = 1.93 item_name3 = Medium Ham and Cheddar Pizza quantity1 = 1 quantity2 = 2 receiver_id = THLEVDLL2GVXE quantity3 = 5 txn_type = cart mc_gross_1 = 11.79 mc_currency = USD mc_gross_2 = 12.70 mc_gross_3 = 31.75 residence_country = US transaction_subject = 3 payment_gross = 56.24'; preg_match_all('/item_name(\d+) = (.*)/', $test, $item); $item = array_combine($item[1], $item[2]); preg_match_all('/quantity(\d+) = (.*)/', $test, $quantity); $quantity = array_combine($quantity[1], $quantity[2]); foreach ($item as $key => $i){ echo $i, ' - ', $quantity[$key], "<br />\n"; } ?>
  3. can you post example of data that you want to parse
  4. try $out .= implode($v2, preg_split('/\#/', $v1, -1, PREG_SPLIT_NO_EMPTY));
  5. maybe <?php $result = mysql_query("SELECT ... ORDER BY added DDESC"); $order = range(0, mysql_num_rows($result)); foreach ($order as $i){ echo mysql_result($result, $i, 'field name'); // etc. } shuffle($order); foreach ($order as $i){ echo mysql_result($result, $i, 'field name'); // etc. } ?>
  6. reorganize your sript that 1st do all database staff (before any output) 2nd after update database use header() to reload page
  7. google for 'html special characters'
  8. echo "<td valign=\"bottom\" halign=\"right\">£$price</td>";
  9. change $newstuff = str_replace("[NEW_PASS]", $new_pass, $locale['PWG_011']); $newstuff = str_replace("[uSER_NAME]", $data['user_name'], $locale['PWG_011']); to $locale['PWG_011'] = str_replace("[NEW_PASS]", $new_pass, $locale['PWG_011']); $locale['PWG_011'] = str_replace("[uSER_NAME]", $data['user_name'], $locale['PWG_011']); ps i read just 1st guestion
  10. try preg_match("#^[a-z0-9 ']+$#i", stripslashes($value))
  11. are you try allworknoplay's code?
  12. look nl2br() function
  13. $result = mysql_query("SELECT Name FROM johnjrum WHERE Name="$name" LIMIT 1"); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } if (mysql_num_rows($result) > 0) { Say hi to $name enter $name into database so i dont say hi again }
  14. foreach (split('/%%/', $templateflat) as $part)
  15. ORDER BY date DESC, time DESC
  16. SELECT d3.* , el.loc, el.id FROM ( SELECT d.pid, d.thedate, MIN( d2.thedate ) next_date, MIN( d2.thedate ) - d.thedate AS dif FROM `lunch_data` d, lunch_data d2 WHERE d2.thedate > d.thedate AND d.pid = d2.pid GROUP BY d.thedate ORDER BY dif DESC , d.thedate DESC ) AS d3, lunch_loc` el where el.id=d3.pid GROUP BY d3.pid
  17. $sql="select * from RS2 where Food2 in ('". str_replace(',', "','", $Food1)."')"
  18. try if(ord($arx[$i][$j])%2==0) ...
  19. error mean: You try $product[$dimensions] - but variable $dimension is array!
  20. $handle = fopen("file.csv", 'r'); for($i=0; $i<2; $i++) $data = fgetcsv($handle, 100000, ";"); // read two rows while(($data = fgetcsv($handle, 100000, ";")) !== false) { list($col1, $col2, $col3, $col4) = $data; } fclose($handle);
  21. $shouts .= ''.$date.' '.$g['prefix'].$m['members_display_name'].$g['suffix'].' '.str_replace("<#EMO_DIR#>", "images", $r['s_message']).'<br />';
  22. change SELECT * FROM topics WHERE `pid` = '$id',`fid` = '$f' to SELECT * FROM topics WHERE `pid` = '$id' and`fid` = '$f'
  23. change $sql = "insert into TABLE_NAME (Id, Fecha, Referencia, Descripcion, Monto, Saldo) values ('". implode("';'", $arr) ."')"; to $sql = "insert into TABLE_NAME (Id, Fecha, Referencia, Descripcion, Monto, Saldo) values ('". implode("','", $arr) ."')"; change ; to , in implode function and $arr = explode("\;", $line); to $arr = explode(";", $line);
  24. look http://www.phpfreaks.com/forums/index.php/topic,238818.msg1113362.html#msg1113362
  25. change line $sql = "SELECT COUNT(*) FROM links"; to $sql = "SELECT COUNT(*) FROM links where kw like \"%$trimmed%\" ";
×
×
  • 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.