This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // best practice: always have <?php at the top | |
$host="localhost"; // Host name | |
$username="root"; // Mysql username | |
$password="root"; // Mysql password | |
$db_name="account"; // Database name | |
// Connect to server and select databse. | |
$db = new mysqli($host, $username, $password, $db_name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // best practice: always have <?php at the top | |
$host="localhost"; // Host name | |
$username="root"; // Mysql username | |
$password="root"; // Mysql password | |
$db_name="account"; // Database name | |
// Connect to server and select databse. | |
$db = new mysqli($host, $username, $password, $db_name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // best practice: always have <?php at the top | |
$host="localhost"; // Host name | |
$username="root"; // Mysql username | |
$password="root"; // Mysql password | |
$db_name="account"; // Database name | |
$tbl_name="member"; // Table name | |
// Connect to server and select databse. | |
mysql_connect('localhost', 'root', 'root')or die("cannot connect"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Item extends Data { | |
public function getSelectCategory($category_name) { | |
$category_name = "%$category_name%"; | |
$SQL = "SELECT category_id, category_name | |
FROM category |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
use databasephp\DatabaseConnection as datab; | |
use logincrudphp\login as logi; | |
require_once('src/databasephp/DatabaseConnection.php'); | |
require_once('src/logincrudphp/login.php'); | |
session_start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dbhost = 'localhost'; | |
$dbname = 'mydb'; | |
$dbuser = 'root'; | |
$dbpass = ''; | |
try { | |
$db = new PDO("mysql:host={$dbhost};dbname={$dbname}",$dbuser,$dbpass); | |
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello iam trying to excecute this php file with curl. | |
its start charging my browser and no response !!! | |
whats i miss here? | |
<?php | |
$url = 'http://apps.dev/flickr_app/index.php'; | |
$data = <<<XML | |
<books> | |
<book> | |
<name>Book3</name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
include("connection.php"); | |
$temp = $_POST['productUpdateId']; | |
$arr = explode(":-",$temp); | |
$pId = $arr[0]; | |
$_SESSION['updateNeedPId'] = $pId; | |
$sqlquery_get_name_details = "SELECT pD.p_name AS x, pN.p_det AS y FROM p_details pD, p_name pN"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php include("mysql_open.php");?> | |
<?php | |
if($_POST['Submit']=="Opdater") { | |
$db = new mysqli('localhost', 'user', 'pass', 'db'); | |
$statement = $db->prepare("UPDATE `fp_text` SET `fp_header`=?,`fp_text`=? WHERE `fp_id`=?"); | |
$statement->bind_param('s', $_POST['value-2']); | |
$statement->bind_param('s', $_POST['value-3']); | |
$statement->bind_param('i', $_POST['value-1']); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This package can be used to display query results split in pages using PDO | |
* | |
* It is based on my primary classe available on | |
* http://www.phpclasses.org/browse/file/40496.html | |
* and since the most usage is been from countries outside Brazil | |
* I've ported the class methods and properties names to English | |
* |
NewerOlder