The following code had worked on PHP5 and MySQL5.6. Under Kubuntu and Windows. In this particular case I'm trying to run it under Kubuntu 16.04 PHP7 and MySQL5.7. Connection to database can not be established. There is no error message, the execution ends with the row for connection to base, and as a result report_before from the code is typed, but report_after is not.
<?php
echo "<form id='login' action='' method='POST' accept-charset='UTF-8'>";
echo "<input type='password' name='password' id='password' maxlength='50'>";
echo "<input type='submit' name='OK' value='OK'>";
if (isset($_POST["password"]))
{
if($_POST["password"] == '1234')
{
echo "rep_before";
$link = mysql_connect('localhost:3306', 'acs', 'sesame');
echo "rep_after;
if ($link)
{
session_start();
header('Location: main_page.php');
}
}
}