Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/mmishra/erp19-7-2019/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/mmishra/erp19-7-2019/test.php
<?php
/*
require_once("models/erp_model.php");
require_once("controllers/erp_controller.php");
require_once("views/erp_view.php");

require_once("models/aaa_model.php");
require_once("controllers/aaa_controller.php");
require_once("views/aaa_view.php");

$model = new aaaModel();
$controller = new aaaController($model);
$view = new aaaView($controller, $model);

*/
$servername = "localhost";
$username = "erp";
$password = "erpa2018";

$options = array(
	PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
	PDO::ATTR_EMULATE_PREPARES => true,
	PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true
);

try {
    $conn = new PDO("mysql:host=$servername;dbname=erp_aaa", $username, $password, $options);
    echo "Connected successfully";
} catch(PDOException $e) {
    echo "Connection failed: " . $e->getMessage();
}

try {
	$str = 'Result:<br>';
	$stmt 	= $conn->query("SELECT studentID,nameHindi FROM erp_aaa.aaa_students");
	$rows 	= $stmt->fetchAll(PDO::FETCH_ASSOC);

	foreach ($rows as $row) {
		$str .= "update aaa_students set nameHindi='" .$row['nameHindi']. "' where studentID=" .$row['studentID']. "<br>";
	}
	echo $str;
} catch(PDOException $e) {
    echo "Error: " . $e->getMessage();
}



$conn = null; 

?>

ZeroDay Forums Mini