Jump to content

Tpick

New Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Tpick

  1. Hi, sorry for noob question, first time poster. Hopefully I"m in the correct section of the forum. I'm running php version 5.6.40 and have mysqli enabled on my website. I'm trying to to change over from the old mysql_connect to mysqli_connect (and so on) so that I can eventually upgrade to php 7. I'm wondering if there is anything I'm missing or supposed to do, every resource I can find online says that for something this simple I simply need to add the "i" to the end, but for some reason it won't connect once I add the "i". I'll include the code in question. If I simply delete the "i" it works just fine. $host = "localhost:3036"; $serverusername = "my_username"; $serverpassword = "my_password"; $db_name = "my_db_name"; $connection = mysqli_connect("$host", "$serverusername", "$serverpassword")or die("cannot connect"); $db = mysqli_select_db("$db_name", $connection)or die("cannot select DB");
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.