Jump to content

sasa

Staff Alumni
  • Posts

    2,804
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by sasa

  1. somthing like this <?php $test = '0001234567890'; echo str_pad(ltrim($test,'0'), 12, '0', STR_PAD_LEFT); ?>
  2. try $query = "UPDATE contacts SET merchant_id$i='".$new_mid."' WHERE merchant_id$i='".$old_mid."'"; remove dots
  3. change to ORDER BY 'posts'.'post_date' DESC"; change comma to dot
  4. change to $datoformat = array(); foreach($result as $results) $datoformat[] = date("Y-m-d", strtotime($results->date_time)); $datoformat = array_map('trim', $datoformat); $values = array_count_values($datoformat); $yesterday = date('Y-m-d', strtotime("-1 days")); $total = $values[$yesterday]; echo $total;
  5. add modifer s $regex = "~<b>Address:</b>.*?</p>~s";
  6. are you shure that your Value1 isn't '2,213.54'?
  7. you insert email in 1st try block in this query $mysqli->query("INSERT INTO coming_soon_emails VALUES('email', SUBSTRING(MD5(UUID()),FLOOR(RAND()*25),5), UNIX_TIMESTAMP())"); you try to insert string 'email' not value of variable $email if you tray to insert variable $email it didn't work to because $email is inserted before in try block change your 2nd query to UPDATE or 1st to SELECT
  8. try to trim variable first $name = ucfirst(strtolower(trim($results[$i]['name'])));
  9. change if(isset($_GET['question'])) { $question = $_GET['question']; $query .= " WHEN qid is '$qid' LIMIT 0, 1"; } to if(isset($qid) { //$question = $_GET['question']; $query .= " WHERE qid = '$qid'"; }
  10. $email=$row ["email"]; remove $
  11. $name = preg_replace("/ /", "", $name); but for this i use str_replace() function
  12. remove break; commands from your code it's cause that just 1st loop execute
  13. preg_match_all('~<tr\sbgcolor="#CCCCCC">\s*<td\salign=right></td>\s*<td\salign=center\svalign=center\swidth=10><a\shref="(.*?)">~siU', $data, $link);
  14. you can do it in MYSQL with LPAD() function http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_lpad
  15. you query returns more than 1 result but you print just one
  16. you must filter results to given set and then order SELECT book_id, book, book_display FROM books WHERE book_status = 'active' AND FIND_IN_SET(book_id, '13,4,5,6,7,8,9,10,2,3' ) ORDER BY FIND_IN_SET(book_id, '13,4,5,6,7,8,9,10,2,3' )
  17. can you print_r ($_POST) and post results
  18. you can order your table with FIND_IN_SET() function SELECT ... FROM ... WHERE .... ORDER BY FIND_IN_SET(id, '1,4,5,6,7,8,9,10,2,3')
  19. try <?php $url = 'http://www.amazon.co.uk/gp/offer-listing/B002PLB2F4/?condition=new'; $html = file_get_contents($url); preg_match_all('~<ul class="sellerInformation">.*?(alt="|<b>)([^"<]+)("|<)~is', $html, $matchesarray); print_r($matchesarray[2]); ?>
  20. try <?php $test = 'slika.jpg | http://preview.filesonic.com/img/350541.jpg'; $test = explode('|', $test); $dest = trim($test[0]); $sorc = trim($test[1]); copy ($sorc, $dest); ?>
  21. $bool = ctype_alnum($text) and !ctype_alpha($text);
  22. try in this way echo "<form action='editevent.php' method='get'><input type='hidden' name='eventid' value='{$row['eventid']}'><INPUT TYPE='submit' name='submit' VALUE='Edit'></form>\n";
  23. you must fetch result $row = mysql_fetch_array($result); and after test against $row['group'] if($result["group"]==1){
  24. change method atribute to get
×
×
  • 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.