Skip to content
Advertisement

Tag: mysqli

Adding multiple entries to a table

I am trying to register customers for a continuing education web site I am creating and need to add multiple entries to the phpMyAdmin table “users” for registration purposes. I am trying to add multiple entries, 25 total. As you will see, I have tried the mysqli_multi_query() function to add them all but I cannot create a new record of

How safe is to use mysqli_insert_id() and if not what should I use?

I have a very simple question I want to know the id of the last query that I inserted in my MySql DB. It’s safe and efficient to use mysqli_insert_id() and if not what should I use? Answer Yes, it’s the recommended way to retrieve an ID value generated by an insert when using auto-increment. But it has limitations, which

How to redirect PHP page on MySQL database connection failure

Using MySQLi connection method I am trying to redirect page instead of printing out the error message trying to test this out I change the localhost to localhostszzz but I am getting error message of Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /../../page.php on line 8 Instead of re-directing to http://www.example.com/, how can I fix this?

Setting up a web application using MySQL

I’m new to setting up a web based application. I have a server with MySQL setup with a database. The site is running my login web page. Currently I have users setup using MyPhpAdmin which will quickly prove burdensome. More importantly, once I run the command “$connection = mysqli_connect(‘1.2.3.4’, $username, $password, ‘databasename’);”, the variable $connection does not continue to exist

How to fetch indices and names from the MySQL database?

I’m working on a website and it has a category dropdown. So my database has tabled called “category”, and it has four items in there: And I’m trying to get all this info into an array, so I can use it in my HTML. But I’m getting a conversion error when I try this: The error I’m getting is: Line

PHP mysqli and SSL

I am trying to configure Galera Cluster over a WAN (VPN is not an option). For obvious reasons I am setting up the connections to require SSL keys, and am having difficulties getting the application …

Advertisement