Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mysqli problems

Featured Replies

Hello,

 

I am using Uniform Server 5-6-13. I am trying to use mysqli, but when I use the mysqli_connect command, my php web page does not render (blank page). It renders fine with mysql_connect. I looked in php.ini and my extension appears to be good:

 

extension=php_mysqli.dll with no semi-colon before it.

 

I ran my connect page (using mysql_connect) and this code:

 

$text = var_dump(function_exists('mysqli_connect'));

echo $text;

 

it printed to the page "bool(true)", which I understand means that mysqli does exist. I must be missing a setting somewhere. I hope you know where...

 

Thanks!

 

-Steve

  • Author

Hello,

 

I found my problem. When using mysqli, you must reverse the order of your parameters on mysqli_select_db (which is now only used when you want to change the database as the database is now declared in the connect function), and in the mysqli_query function. The proper orders are:

 

$con = mysqli_connect($host, $user, $pass, $database);

//mysqli_select_db($con, $database); use only if you want to change the default database

mysqli_query($con, $recordset);

 

-Steve

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.