Current Path : /home/c247essa/public_html/

Linux c22487.sgvps.net 3.12.18-clouder0 #1 SMP Tue Oct 9 18:14:47 EEST 2018 x86_64

Upload File :
Current File : /home/c247essa/public_html/rupesh.php
<?php

/**
 * Connect to database
 */
$webhost        = 'localhost';
$webusername    = 'c247essa_247bk';
$webpassword    = 'q?%G-kS.#ssy';
$webdbname      = 'c247essa_247bkend';
$webcon         = mysqli_connect($webhost, $webusername, $webpassword, $webdbname);
if (mysqli_connect_errno())
{
    echo 'Failed to connect to MySQL: ' . mysqli_connect_error();
}

/**
 * Queries for reading
 */
$uploads = mysqli_query($webcon, 'SELECT * FROM `upload`');


/**
 * Connect to database
 */
$mobhost        = ' 173.194.109.26';
$mobusername    = 'c247essa_247bk';
$mobpassword    = 'q?%G-kS.#ssy';
$mobdbname      = 'c247essa_247bk';
$mobcon         = mysqli_connect($mobhost, $mobusername, $mobpassword, $mobdbname);
if (mysqli_connect_errno())
{
    echo 'Failed to connect to MySQL: ' . mysqli_connect_error();
}

/**
 * Insert data from old database
 */

// questions
while ($row = mysqli_fetch_array($questions))
{
    // escape your strings
    foreach($row as $key => $val)
    {
        $row[$key] = mysqli_real_escape_string($mobcon, $row[$key]);
    }
    mysqli_query($mobcon, "INSERT INTO `upload`(`user_id`, `Uploader`, `username`, `upload_date`, `id`, `file_name`, `type`, `size`, `content`, `order_no`) VALUES ('" . $row['user_id'] . "', '" . $row['Uploader'] . "', '" . $row['username'] . "', '" . $row['upload_date'] . "', '" . $row['id'] . "', '" . $row['file_name'] . "', '" . $row['type'] . "', '" . $row['size'] . "', '" . $row['content'] . "', '" . $row['order_no'] . "');");

println $row['id'];
}



/*
  Close Connections
 */
mysqli_close($mobcon);
mysqli_close($webbcon);