Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by PravinS

  1. Missing semi colon( ; ) at below mentioned line $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)
  2. does database table "tbl_paramhead" have data in it? have you checked the view source to check whether the drop down is generated properly...if yes, then if should work
  3. print_r() the $_POST array at top and check what you are getting in post data, also check the view source of the page to check the drop down values
  4. You haven't set value in dropdown options, check below line echo '<option value>' .$row['paramhead']. '</option>'; use it as echo '<option value="'.SOME_VALUE.'">' .$row['paramhead']. '</option>';
  5. You haven't passed link identifier returned by mysqli_connect() to mysqli_query() function Check Manual for more details: http://php.net/manual/en/mysqli.query.php
  6. You can replace below line for($i=1; $i<=8; $i++){ by $numrows = count($row); for($i=1; $i<=$numrows; $i++) {
  7. Check this: http://php.net/manual/en/function.end.php
  8. Set headers, 4th parameter of mail() function $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'To: TO_NAME <TO_MAIL>' . "\r\n"; $headers .= 'From: FROM_NAME <FROM_MAIL>' . "\r\n"; $headers .= 'Cc: CC_MAIL' . "\r\n"; $headers .= 'Bcc: BCC_MAIL' . "\r\n";
  9. You can use UPDATE query like this UPDATE table_name SET phone = CONCAT('353',TRIM(LEADING '0' FROM phone)) WHERE SUBSTRING(phone,1,1) = '0'; before that use the SELECT query to check if its correct or not SELECT phone, CONCAT('353',TRIM(LEADING '0' FROM phone)) FROM table_name WHERE SUBSTRING(phone,1,1) = '0'; hope this will find you helpful
  10. It will be better if you use ORDER BY DESC and LIMIT 10 in SELECT query, which will give you last 10 records in descending order. Or you can use pagination, by which you can devide records(10 records) per page.
  11. You can use OR, your WHERE condition will be like this WHERE MATCH(items.item_title) AGAINST('$search_query' IN BOOLEAN MODE) OR MATCH(type_1.type_1_name) AGAINST('$search_query' IN BOOLEAN MODE) hope this will work for you.
  12. file_get_contents() function will return just a page content (view source), it will not execute any javascript or AJAX code, and "Show All" button is providing AJAX based data
  13. Full Text search may work for you Refer: http://dev.mysql.com/doc/refman/5.7/en/fulltext-search.html
  14. Instead of VARCHAR data type for text use TINYTEXT, TEXT, MEDIUMTEXT, or LONGTEXT according to your requirement
  15. Try this <html> <head> <style type="text/css"> .colleft{ float:left; width:50%; text-align:left } .colright{ float:right; width:50%; text-align:right; } </style> </head> <body> <div> <div class="colleft">Left</div> <div class="colright">Right</div> </div> </body> </html>
  16. Try using SimpleXMLElement::xpath http://php.net/manual/en/simplexmlelement.xpath.php
  17. Also avoid adding <html>, <head>, <title>, <body> tags, just add <body> tag content in mail body
  18. where ever you communicate with database, connection code should be added
  19. you have not included "dbconfig.php" database connection file in "registration.php" file also use error_reporting(E_ALL & ~E_NOTICE); at the top, to check PHP errors
  20. also you have not given name to submit button
  21. In index.php file you have form tag without method, so by default form method is GET just replace below line <form action="mysuperscript.php" autocomplete="on"> with <form action="mysuperscript.php" autocomplete="on" method="post"> i hope this will work for you
  22. I think you have used Form GET method instead of POST
  23. Try using this function function sort_array($array, $sortkey, $order) { if ($order == "DESC") $or = "arsort"; else $or = "asort"; foreach ($array as $key => $array_row) { $sort_values[$key] = $array_row[$sortkey]; } $or($sort_values); reset($sort_values); while (list ($arr_key, $arr_val) = each($sort_values)) { $sorted_arr[] = $array[$arr_key]; } return $sorted_arr; } hope this will work for you
  • 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.