Manish Singh

Social, writer

     

Function to Convert HTML to PDF in PHP CodeIgniter using Dompdf lirary

In this tutorial we are cover how to convert HTML to PDF in PHP CodeIgniter using Dompdf, Now we are going to do how to… Read More


How to Create custom helper in CodeIgniter PHP

In this Tutorial, we will create a custom helper in your CodeIgniter application. What Is the Helper Function:- Helper functions… Read More


 
Manish Singh | 02-Jul-2019 06:35

If any Query for this article please let me know...  thanks

LAAL RANG Randeep Hooda, SINGER - VIKAS KUMAR, It's my best song

Awsm song...and Randeep...you are GOD...you can pull off any damn role..but this one is a killer. Read More


Prevent sql injection on login page in php codeigniter

In the web application for security, SQL injections play an important role to avoid Hacking and more in PHP or… Read More


Visual Studio Code keyboard shortcuts Ubuntu & Linux

Visual Studio Code keyboard shortcuts help programmers to maximize their software products and it allows them to work faster… Read More


Quotes for Girls to Empower

Read More


 
Manish Singh | 08-Jun-2019 11:08

Nice Quote thanks for this.

Splitting integer variable value in limit or put in PHP Array

If Working kind of task to create a PHP array to splitting integer value so you can use this code. Let's start with… Read More


Drupal 7 join Query with Limit and orderBy

Use the below code for fetching field values from activity_log table or users table. You can Use Limit in Drupal 7 queries… Read More


Lagdi Lahore Di | Killer Bold Love Story(Latest)

Master Series Present's Lagdi Lahore Di ReMixed By Dj Lucky , a Very powerful voice sung by guru_randhawa , Best singer… Read More


create login API in PHP CodeIgniter for android application

We show you how to use PHP CodeIgniter to create a RESTful API for user login with authentication and get user login… Read More


 
michael Thanh | 09-May-2019 06:49

login API by get method?

 
Manish Singh | 09-Aug-2019 13:12

Yes Use PHP get Method to requert API  

$this->input->get('email');
$this->input->get() is reference to php core $_GET['email'] ;

 

 
Ahmad Aldi | 06-Dec-2019 09:33

where is coding in android studio sir ?

Forgot password using Codeigniter, Ajax, Jquery, and send a password recovery email

Most of the Codeigniter developers will look for forgot password functionality by sending a recovery email to register email… Read More


I do it because I can

'मैं ऐसा कर सकता हूं क्योंकि मैं कर सकता हूं,   क्योंकि मैं चाहता हूं, मैं चाहता हूं क्योंकि आपने कहा था कि… Read More


How to create forgot password API in PHP, MySQL and send password on mail

 In this tutorial, we'll show you How to create forgot password API in PHP, MySQL and password recovery email… Read More


how can call any REST API with PHP cURL Extension

There are two methods to call REST API one is "GET" or "POST", you can call any type of API urls. Use… Read More


Codeigniter projects on GitLab | Manage repository | Codeigniter code version control

In this article I am going to tell you how to manage a Codeigniter project on GitLab version control system. Now we’re… Read More


Add multiple Cron Job in Ubuntu 14.04

You can create cron job in your Ubuntu system using following steps here we go. Step 1. Open your terminal using shortcut… Read More


शेर सिंह राणा अफगानिस्तान का खतरनाक मिशन

अफगानिस्तान  के खतरनाक  मिशन  को कैमरे  में कैद  किया शेर सिंह राणा  ने और भारत ले आये थ्वीराज… Read More


शेर सिंह राणा की हैरत अंगेज़ कहानी जो जुडी है पृथ्वीराज चौहान से

ये कहानी है भारत के एक राजपूत के अदम्य साहस की जिसे डकैत से बानी सांसद फूलन देवी का हत्यारा माना गाय और आजीवन कारावास दिया… Read More


how to upload image using rest API in PHP codeigniter

For uploading image from android application using REST API most preferable method is to pass base64 encoded image… Read More


 
swetha karimsetti | 27-May-2019 17:01

public function upload(){
    $image = base64_decode($this->input->post("p_image"));
    $image_name = md5(uniqid(rand(), true));
    $filename = $image_name . '.' . 'png';
    //rename file name with random number
    $path = "./uploads/images/".$filename;
    //image uploading folder path
    file_put_contents($path . $filename, $image);
    // image is bind and upload to respective folder

    $data_insert = array('p_image'=>$filename);
    if(!empty($data_insert )){
    $success=$this->db->insert('projects', $data_insert);
    
    }else{ } 
    if($success){
        $b = "User Registered Successfully..";
    }
    else
    {
        $b = "Some Error Occured. Please Try Again..";
    }
    echo json_encode($b);
     
}

In the above code i can't understand why it is uploading 2 times in the db with 2 different paths and also in the upload folder the path of the image is taking 2 times ,iam not getting what's wrong with this code...

 
swetha karimsetti | 27-May-2019 17:05

iam new to this ,plz help me to get out of this.

 
Manish Singh | 09-Aug-2019 13:02

Use this core php code  to move image into folder..

    $image = base64_decode($this->input->post("p_image"));
    $image_name = md5(uniqid(rand(), true));
    $filename = $image_name . '.' . 'png';
    //rename file name with random number
    $path = "./uploads/images/".$filename;
    //image uploading folder path
    file_put_contents($path . $filename, $image);
    // image is bind and upload to respective folder

 
rakesh sapariya | 19-Sep-2019 12:10

in this above code in the folder image file format not supported.
i mean file upload in the folder but not display view

 
Mayu More | 25-Jan-2020 14:00

$data_image = $_POST['data_image'];

list($type, $data_image) = explode(';', $data_image);

list(, $data_image) = explode(',', $data_image);

$data_image = base64_decode($data_image);

//rename file name with random number text

$image_name = time().'_mad_x_'.rand(1,100);

$filename = $image_name.'.'.'png';

(making folder just in case(not present))

$upload_path = './assets/img/upload/';

if(!is_dir($upload_path)) mkdir($upload_path, 0777, TRUE);

$path = "./assets/img/upload/".$filename;

// image is bind and upload to respective folder

file_put_contents($path, $data_image);

//final value to store in database

$image_upload_full_path = 'assets/img/upload/'.$filename;

Working Code

स्टीफन हॉकिंग के विचार

स्टीफन हॉकिंगजिंदगी में कोई भी काम छोटा नहीं होता है| बल्कि काम ही आपको जीने का मकसद देता है |अगर किसी आदमी के जिंदगी में… Read More


Sunil Grover as professor and Dr. Gulati honeymoon night, New tv serial

सुनील ग्रोवर उर्फ ​​प्रो एलबीडब्ल्यू की पत्नी के रूप में शिल्पा शिंदे आजकल ये दोनों दोनो निकल गये है अपना हनीमून मनाने ।… Read More


The pregnant elephant accident by indian train 2018

इंडियन ट्रैन आज तक ऐसे ही करते आए है ट्रैन को कार और बाइक पे सवार लोगो पे चढ़ा देते है तो कभी जंगल के जानवरों पे ।आप इस वीडियो… Read More


 
Bablu Tiwari | 18-Jun-2018 15:33

????????????????????

 

हिन्दू नव वर्ष 18 मार्च 2018 पर स्लोगन, मैसेज और क्वोट्स

हिन्दू नव वर्ष का आरम्भ हो गया है 18 मार्च 2018 भारतीय नव वर्ष - ये दिन गुडी पडवा के नाम से भी लोग जानते है, इस प्रकार इसे… Read More


How to submit a form or image using codeigniter, ajax with load button

We can pass all form data using jquery on submit and get all value in codeigniter controller Step:1 Create an HTML form… Read More


View all data on Google Map with image, using PHP,SQL, and XML

In this tutorial shows you how to put database table data on Google Map using the PHP SQL and XML. is very simple 1st you… Read More


How to load View in helper using PHP, Codeigniter?

Yes, you can load any view TPL file into your custom Helper, now create a Helper file into application/helper folder… Read More


PHP CSV file export function with custom headers

In this tutorial, we are going to create a custom PHP function to export MySQL records in the CSV file. Many developers… Read More


How to Create own helper function in CodeIgniter

You can Create Helper function in application helpers folder, it is a PHP file with multiple functions. It is not a class… Read More


Who to follow View all

 
Ahmad Social, writer
 
Mithlesh Social, writer
 
James Social, writer
 
Sunrise Business Developer
 

Newsletter

Subscribe to our newsletter. Get the latest updates!