"how to use mysqli persistent connection across different pages" Code Answer

3
$db = mysqli_connect("p:notlocalhost","notroot","","catalog") or die("error " . mysqli_error($link));

it is "p:" - when prepended before hostname, creates persistent connection. that is later reused on different pages. you still call same constructor on every page.

By Alan Omar on January 7 2022

Answers related to “how to use mysqli persistent connection across different pages”

Only authorized users can answer the Search term. Please sign in first, or register a free account.