Check the valid price in Jquery. If the price is valid or not.It returns TRUE or FALSE. function CheckValidPrice(price=0){ var tempPrice = Math.round(price * 100)/ …
Read MoreCodeIgniter
Access database config variables from a helper in Codeigniter
By using Like this way you can access Codeigniter Files From Helper. $CI =& get_instance(); $CI->load->database();
Read MorePhp – How to Connect Database from Constant file in Codeigniter version 3.0
Here, Using this way you can connect with database from constant file. then you can access the tables. include(APPPATH.’config/database’.EXT); $conn = mysql_connect($db[‘default’][‘hostname’], $db[‘default’][‘username’], $db[‘default’][‘password’]); …
Read MoreJquery- on Form Submit Validate
On Form Submit Validate using Jquery <script type=”text/javascript”> $(document).ready(function() { $(“#shr_form”).on(‘submit’, function() { var dForm = $(this); var damount = dForm.find(“input[name=damount]”).val(); var dMsgElmnt= dForm.find(“#dmessage”); dMsgElmnt.html(”); …
Read MoreCheck if input is valid number in Jquery or Javascript
It Returns TRUE or FAlSE. If Valid Number It Returns True , Otherwise False. <script> function CheckValidPrice(price=0){ var tempPrice = Math.round(price * 100)/ …
Read MoreGet file content from a URL?
Get file content from a URL? $jsonData = json_decode(file_get_contents(‘https://chart.googleapis.com/chart?cht=p3&chs=250×100&chd=t:60,40&chl=Hello|World&chof=json’)); However, if allow_url_fopen isn’t enabled on your system, you could read the data via CURL as …
Read More.htaccess redirect http to https
use the following to redirect all pages of my domain from http to https: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Read MoreRedirect with PHP after ajax call
Redirect with PHP after ajax call $(‘#button_name’).click(function() { var save_sale = 1; $.ajax({ type: ‘GET’, url: ‘page.php’, data: {save_sale: save_sale}, success: function(data) { window.location.href = …
Read MoreGetting Php Version Error :Declaration of MX_Lang
A PHP Error was encountered Severity: Warning Message: Declaration of MX_Lang::load($langfile, $lang = ”, $return = false, $add_suffix = true, $alt_path = ”, $_module = …
Read MoreCodeIgniter HMVC error after updating PHP to PHP 7
After updating 5.6 to PHP 7. I was using HMVC implementation of Code Igniter and PHP upgrade started throwing following errors:- A PHP Error was …
Read More