Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working Remotely

Puneet Pandey puneetpandey

🏠
Working Remotely
View GitHub Profile
View success.txt
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-mysql-include=C:\mysql-connector-c-noinstall-6.0.2\include --with-mysql-lib=C:\mysql-connector-c-noinstall-6.0.2\lib --
with-mysql-dir=C:\mysql-connector-c-noinstall-6.0.2'
This could take a while...
Successfully installed mysql2-0.3.13
Parsing documentation for mysql2-0.3.13
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/mysql2/mysql2.so, skipping
Installing ri documentation for mysql2-0.3.13
1 gem installed
View geminstall.txt
gem install mysql2 --platform=ruby -- '--with-mysql-include=C:\mysql-connector-c-noinstall-6.0.2\include --with-mysql-lib=C:\mysql-connector-c-noinstall-6.0.2\lib --with-mysql-dir=C:\mysql-connector-c-noinstall-6.0.2'
View file1.php
<?php$con = mysql_connect("localhost", "USERNAME", "PASSWORD");
if (!$con) {
die('Could Not Connect: ' . mysql_error());
}
mysql_select_db("DB_NAME", $con);
$result = mysql_query("SELECT firstname, lastname, email, phone, mobile, address_1, address_2, city, zipcode, country, state FROM TABLE_NAME");
echo "
<table border='1'>
<tr>
View gist:6995045
<?PHP
session_start();
if (!isset($_SESSION['username'])) {
header("Location: login.php");
}
?>