MySQL Forums
Forum List  »  PHP

Re: Connecting myPHPadmin to web page
Posted by: Peter Brawley
Date: October 01, 2017 11:17AM

> mysql_connect("localhost", "root", "root") or die ("not connected");

The mysql API is deprecated and will go away, Use the mysqli API.

And when calling DB funcs, always code for errors eb ...

$conn = mysqli_connect(...) or exit( mysqli_connect_error() );

$res = mysqli_query( ... ) or exit( mysqli_error($conn) );

Options: ReplyQuote

Written By
October 01, 2017 03:08AM
Re: Connecting myPHPadmin to web page
October 01, 2017 11:17AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.