Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. I agree, it seems easier to write own code than use it there.
  2. Exceeded the max memory limit. Can try to increase it or lower the memory usage for your script. php.ini memory_limit = 128M; htaccess php_value memory_limit 128M; top of php script ini_set('memory_limit','128M');
  3. You can use the header() function to do any error handling or redirection.
  4. When it comes to sending mail can be many things to make it not work. using sendmail? own smtp host? your domain being refused? Try phpmailer
  5. I would remove any multiple breaks and place it back $string = "<p>example<br /><br /><br /></p><br />"; $string = preg_replace("~<br />+~",'',$string); $string .= "<br />";
  6. Dragging the icon is still opening as were. Try http://localhost/your_script_name.php
  7. If are just learning may want to check out the php tutorial
  8. Is a few ways actually, you have to echo html in quotes if within php or break in and out of php using <?php ?> tags <?php for ($i = 1; $i <= 64; $i++) { ?> <div class="col-xs-3 team_box top-team-border"><?php echo $results->get_team('64', '<?php echo $i; ?>', 'A', 'main'); ?> <span class="badge"><?php echo $results->get_score('64', '<?php echo $i; ?>', 'A', 'main'); ?></span></div> <?php } ?> or <?php for ($i = 1; $i <= 64; $i++) { echo "<div class='col-xs-3 team_box top-team-border'>".$results->get_team('64', '".$i."', 'A', 'main')."<span class='badge'>".$results->get_score('64', '".$i."', 'A', 'main')."</span></div>"; } ?>
  9. Is the script saved with a .php extension? If you save as htm or html the server needs to be configured to parse php.
  10. If you want to delete the demo items from opencart.... Go into something like phpmyadmin. prefix_ being whatever you selected upon install Only do this a fresh install or would delete something may not want to. Run this sql command. DELETE FROM prefix_address; DELETE FROM prefix_category; DELETE FROM prefix_category_description; DELETE FROM prefix_category_to_store; DELETE FROM prefix_coupon; DELETE FROM prefix_customer; DELETE FROM prefix_download; DELETE FROM prefix_download_description; DELETE FROM prefix_manufacturer; DELETE FROM prefix_manufacturer_to_store; DELETE FROM prefix_product; DELETE FROM prefix_product_description; DELETE FROM prefix_product_discount; DELETE FROM prefix_product_featured; DELETE FROM prefix_product_image; DELETE FROM prefix_product_option; DELETE FROM prefix_product_option_description; DELETE FROM prefix_product_option_value; DELETE FROM prefix_product_option_value_description; DELETE FROM prefix_product_related; DELETE FROM prefix_product_special; DELETE FROM prefix_product_to_download; DELETE FROM prefix_product_to_store; DELETE FROM prefix_review; DELETE FROM prefix_store; DELETE FROM prefix_store_description; DELETE FROM prefix_product_tags; DELETE FROM prefix_order; Unless you are willing to make your own commerce site I have only ever seen 3 decent ones out there. opencart, prestashop and magneto Each have their quirks.
  11. php variables do not parse surrounded by single quotes escape the directory/file paths with quotes
  12. What operating system and server packages are you using now? phpinfo(); is to see about server configuration, do you see a mysqli section? if so it's installed. Look at Loaded Configuration File and visit that php.ini file location, ensure is no ; in front of extension=php_mysqli.dll If you made a change and saved the file then restart apache service. The correct way to connect is host,user,password,database $db = mysqli_connect("localhost","user_name","user_password","database_name") or die("Error " . mysqli_error($db));
  13. It's not incorrect, all matters what you need to do with the data. For instance you may want to do a single query, then display users and each count, in the loop could show or calculate it different. But if all you need is a simple count then the less you need to do with code the better.
  14. I agree with cronix as to having mysql do it for you. For the record your original way would be something as this. Adding post counts to the original total. $total = 0; while($prepare->fetch()) { $total = $total + $post_counts; } print($total);
  15. One way is to define a blank array and then add to it, then use count() on the array. $total = array(); while($prepare->fetch()) { $total[] = $post_counts; } echo count($total); if you want to calculate all the values together can use array_sum() echo array_sum($total);
  16. Typo? $this->_repsonse->append_body($body); $this->_response->append_body($body);
  17. See if this does the trick for you SELECT DISTINCT username, vehicles.veh_id, year, veh_make.make_title, veh_model.model_title, veh_registration.policy_num, cylinder_count, eng_hp, trans, int_color, ext_color, fuel_tank, date_format(veh_services.date,'%m/%d/%Y') as servdate FROM vehicles LEFT JOIN (veh_make, veh_model) ON (vehicles.model_id = veh_model.model_id) AND (vehicles.make_id = veh_make.make_id) LEFT JOIN (veh_registration) ON (vehicles.reg_id = veh_registration.reg_id) JOIN (users) on (vehicles.user_id = users.user_id) left JOIN (veh_services) ON (veh_services.veh_id = vehicles.veh_id) WHERE users.user_id = 2 GROUP BY (veh_id )
  18. Disable all error reporting either with htaccess, php.ini or at the top per php script. htaccess php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off php_value docref_root 0 php_value docref_ext 0 php.ini error_reporting = off php scripts, last line helps remove strict errors error_reporting(E_ALL); ini_set("display_errors", 1); ini_set('error_reporting', 30711);
  19. To me saving it as it's intended output is the best way to go about it. Which is why I said the editor. If you don't want to save as html you can do the bbcode addon for ckeditor. There is even bbcode parsers made for yii2. Unless you plan on creating everything from scratch and make another yii2 parser like the others. On the topic when need to include js or css into the cms, this is why any mature cms makes plugins or modules. Only cache html that will not be live or user data.
×
×
  • 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.