can anyone help me with php
#9

Quote:
Originally Posted by Macronix
Посмотреть сообщение
"mysqli_select_db" asks for a database name (string) and you gave that function an integer ($connect).
The first parameter should be "$connect" and the second parameter "$database":

PHP код:
<?php
////\\\\\\\\\\\\\\\\\\\\\\EDIT The Below Variables\\\\\\\\\\\\\\\\\
////\\\\\\\\\\\\\\\\\\\ONLY EDIT WITHIN THE QUOTATION MARKS ("")\\\
//
$servername "n10.ultra-h.com"//Server name (usually "localhost")
$database "port_5930";    //Database name (often username_databasename)
$username "port_5930";        //User name for MySQL Database
$password "*******";          //Password for MySQL User name
//
//// \\\\\\\\\\\\\\\\\\\\\\\DO NOT EDIT BELOW\\\\\\\\\\\\\\\\\\\\\\\
//
$connect mysqli_connect($servername,$username,$password);
    
mysqli_select_db($connect$database) or die(mysqli_error($connect));
?>
You could also combine it directly with "mysqli_connect":

PHP код:
<?php
////\\\\\\\\\\\\\\\\\\\\\\EDIT The Below Variables\\\\\\\\\\\\\\\\\
////\\\\\\\\\\\\\\\\\\\ONLY EDIT WITHIN THE QUOTATION MARKS ("")\\\
//
$servername "n10.ultra-h.com"//Server name (usually "localhost")
$database "port_5930";    //Database name (often username_databasename)
$username "port_5930";        //User name for MySQL Database
$password "*******";          //Password for MySQL User name
//
//// \\\\\\\\\\\\\\\\\\\\\\\DO NOT EDIT BELOW\\\\\\\\\\\\\\\\\\\\\\\
//
$connect mysqli_connect($servername,$username,$password,$database);
// Check connection
if (mysqli_connect_errno())
{
    echo 
"Failed to connect to MySQL: " mysqli_connect_error();
}
?>
i tried that before
Reply


Messages In This Thread
can anyone help me with php - by iKevin - 13.02.2017, 19:52
Re: can anyone help me with php - by Meller - 13.02.2017, 19:58
Re: can anyone help me with php - by iKevin - 13.02.2017, 20:00
Re: can anyone help me with php - by iKevin - 14.02.2017, 13:57
Re: can anyone help me with php - by Luis- - 14.02.2017, 14:15
Re: can anyone help me with php - by iKevin - 17.02.2017, 14:02
Respuesta: can anyone help me with php - by Eloy - 17.02.2017, 14:13
Re: can anyone help me with php - by Macronix - 17.02.2017, 14:14
Re: can anyone help me with php - by iKevin - 17.02.2017, 14:38
Re: can anyone help me with php - by BroZeus - 17.02.2017, 15:45

Forum Jump:


Users browsing this thread: 1 Guest(s)