Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Tuesday, 5 February 2019

10 Basic PHP String Functions

In this tutorial, we are going to see 10 basic and important string functions in PHP. String is basically a sequence of character. In this .......

Read more

How to Setup MySQL Connection Using PDO in PHP

In previous article we have discussed that MySQL is depreciated and their alternative options are MySQLi and PDO(PHP Data Object) . In that you have learned.......

Read more

How to Create Dynamic Pie Chart in PHP with MySQL Using Google API

In this tutorial we will discuss how to create dynamic Pie Chart in PHP with MySQL. A graph which is creating....

Read more

Friday, 1 February 2019

Infinite Scroll in PHP Using Jquery AJAX and MySQL

Infinite Scroll of Webpage in PHP In this tutorial here we are going to show how to infinite scroll a Page like facebook. In.......

Read more

Live Filter With Checkbox Using Jquery

Live Filter Data With Checkbox Using Jquery With AJAX I have required filtering the product with their attributes......

Read more

Dynamically Change Form Action Based on Select Option Using jQuery

In this article we are discussing about how to change form action based on select option.....

Read more

Dynamically Change Form Action Based on Select Option Using jQuery

In this article we are discussing about how to change form action based on select option.....

Read more

Live Filter With Checkbox Using Jquery

Live Filter Data With Checkbox Using Jquery With AJAX I have required filtering the product with their attributes......

Read more

Upload multiple images with Jquery and PHP

In previous tutorial I have posted an article about how to upload a file in PHP. In this article I am going to discuss about how to upload .....

Read more

How to Resize an Image on Runtime in PHP

Resize an Image on Runtime in PHP Now a day’s everyone wants to display resized image on website with different......

Read more

Infinite Scroll in PHP Using Jquery AJAX and MySQL

Infinite Scroll of Webpage in PHP In this tutorial here we are going to show how to infinite scroll a Page like facebook. In.......

Read more

File Uploading in PHP

PHP programming language allows uploading a file on server with html form. File uploading with PHP is very easy....

Read more

Send form data and save in PHP using Jquery and AJAX

In this tutorial we are going to discuss about how to send form data and save in Jquery usingf AJAX and PHP. Before .......

Read More

Thursday, 31 January 2019

Live Search System Using Ajax in PHP with MySQL


In this Tutorial we are going to discuss about instant live search in PHP using AJAX and jQuery. Live search .......

Read more

Friday, 3 June 2016

Sharing link to Facebook does not show right thumbnail image

 1) Put this code before  </head> and pass image url in header file

 <meta property="og:image" content="<?php echo $image_urls; ?>" />

 2) Give facebook share link on Page

<a title="facebook"  href="http://www.facebook.com/sharer.php?s=100&amp;p[title]=<?php echo $alb['title']; ?>&amp;p[summary]=<?php echo $description;?>&amp;p[url]=<?php echo urlencode($share_url);?>&amp;
p[images][0]=<?php //echo $image_urls;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600'); return false;"><i class="fa fa-facebook" aria-hidden="true"></i></a>

3) Finally go to Facebook Debug tool to check sharing URL

https://developers.facebook.com/tools/debug/sharing/


Paste sharing URL and click on Debug button. That's it.

Sunday, 24 April 2016

Two foreach but want to get Single times value in PHP

foreach($this->getCollection() as $res){



foreach($orderItem as $item)
{

$item= $item;

}



echo $item->product_id;    //print one time

echo $res->entity_id;



}

Tuesday, 15 March 2016

find current url is with http or https in php

<?php if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
   $protocol= "https://";
} else {
    $protocol= "http://";
} echo $protocol.$_SERVER['SERVER_NAME']; ?>

Thursday, 28 January 2016

if getting these error on checkout page in payment option

Problem: 

Fatal error: Allowed memory size of 402653184 bytes exhausted (tried to allocate 130968 bytes) in /public_html/catalog/model/payment/ccavenuepay.php on line 1

Solution:

careate a scopbin name folder in root directory of your project

and upload a file 911006.php in it

Tuesday, 19 January 2016

Get id or numeric value from URL in PHP

$uri = $_SERVER['REQUEST_URI'];

   function map ($n) {
        $n = preg_replace("%[^\d]+%mi", '', $n);
        return $n;
    }

    $vals = array_map(map, array($uri));
 

foreach($vals as $id)
{
 $id;
}

Thursday, 7 January 2016

function for query the database in PHP

//function of query

function runqueries($query) {
$result = mysql_query($query);

while($rowss = mysql_fetch_array($result))

{
   $listingdata[] = $rowss;

 
}
if(!empty($listingdata))
return $listingdata;
}


//Where need to display Data

$sqls= runqueries("SELECT * from Products");

foreach($sqls as $rows)

{


}