Tech Support Guy banner
Status
Not open for further replies.

PHP: Changing mysqli connection to use SSL

774 views 1 reply 2 participants last post by  colinsp 
#1 ·
Hi,

While it may not be best practice, I've got a few variants of the code below several times through an internal web-application we use in the office. However I want to change it to use SSL, the database side is ready to accept the SSL, I just need to find a way (hopefully) to do a find and replace to add the SSL component.

is there any way of easily modifying the below?

PHP:
$connection = mysqli_connect("$host", "$username", "$password")or die("cannot connect");
mysqli_select_db($connection, "$db_name")or die("cannot select DB");
$sql="SELECT * FROM `$tbl_name` WHERE field = '$criteria'";
$result=mysqli_query($connection, $sql);
Thanks in advance.
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top