Expand|Select|Wrap|Line Numbers
- <?php
- /* You should never post secure details like IP address,
- username and password on a public forum
- Removed for security
- Banfa
- Admin */
- $con = mysql_connect("<IPAddress>","<user>","<password>");//line 10
- if (!$con)
- {
- die('Could not connect: mes' . mysql_error());
- }
- mysql_select_db("finance", $con);
- $result = mysql_query("SELECT * FROM city_master");
- echo "<table border='1'>
- <tr>
- <th>Firstname</th>
- <th>Lastname</th>
- </tr>";
- while($row = mysql_fetch_array($result))
- {
- echo "<tr>";
- echo "<td>" . $row['city_code'] . "</td>";
- echo "<td>" . $row['city_name'] . "</td>";
- echo "</tr>";
- }
- echo "</table>";
- mysql_close($con);
- ?>
----------------------
host: <snipped>
user name: <snipped>
password: <snipped>
database name: <snipped>
table: <snipped>
fields: <snipped>, <snipped>
error occured:
----------------------
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/bcns/public_html/bala/testPHP/New Folder/welcome.php on line 10
Could not connect: mesClient does not support authentication protocol requested by server; consider upgrading MySQL client
i am newbie to php help me