note 126302 added to function.mysqli-connect

From: Date: Mon, 02 Aug 2021 12:13:01 +0000
Subject: note 126302 added to function.mysqli-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-216716@lists.php.net to get a copy of this message
<?php $hostname='localhost'; $username="root"; $password=""; $database="test"; //connect using api (function) $conn=mysqli_connect($hostname,$username,$password,$database); if($conn) echo 'were connected'; if(!$conn) echo "conn not established"; //connect using class $conn=new mysqli($hostname,$username,$password,$database); if( !($conn->connect_error) ){ echo 'connected'; }else{ echo $conn->connect_error; } ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 91.219.212.90) ---- Manual Page -- https://php.net/manual/en/function.mysqli-connect.php Edit -- https://main.php.net/note/edit/126302 Del: integrated -- https://main.php.net/note/delete/126302/integrated Del: useless -- https://main.php.net/note/delete/126302/useless Del: bad code -- https://main.php.net/note/delete/126302/bad+code Del: spam -- https://main.php.net/note/delete/126302/spam Del: non-english -- https://main.php.net/note/delete/126302/non-english Del: in docs -- https://main.php.net/note/delete/126302/in+docs Del: other reasons-- https://main.php.net/note/delete/126302 Reject -- https://main.php.net/note/reject/126302 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#216716) next »