php - How to hide "Deprecated: mysql_connect()" warning? -


i have problem.. well.. code using working dream message makes page awful

deprecated: mysql_connect(): mysql extension deprecated , 

i want hide message page. possible , if so.. how?

it shows message in page:

    <?php session_start(); include_once 'dbconnect.php';  if(isset($_session['user'])!="") {  header("location: panel.php"); } if(isset($_post['btn-login'])) {  $email = mysql_real_escape_string($_post['email']);  $upass = mysql_real_escape_string($_post['pass']);  $res=mysql_query("select * users email='$email'");  $row=mysql_fetch_array($res);  if($row['password']==md5($upass))  {   $_session['user'] = $row['user_id'];   header("location: panel.php");  }  else  {   ?>         <script>alert('nimimerkki/salasana väärin, yritä uudelleen');</script>         <?php  }  } ?> <!doctype html> <html> <head>     <meta charset="utf-8"> <title>kirjaudu adminpaneeliin</title> <style> /*css file sign-in webpage*/ #body-color{ background-image: url("/admin/kuvat/adminbg.gif"); } #sign-in{ border:3px solid #a1a1a1; padding:9px 35px;  background:#58fa58; width:250px; border-radius:20px; box-shadow: 7px 7px 6px; } #button{ border-radius:10px; width:100px; height:40px; background:#01df01; font-weight:bold; font-size:20px } </style> <!-- koodi --> </head> <body id="body-color">     <center><img src="/admin/kuvat/adminpaneeli.gif"> <div id="sign-in"> <fieldset style="width:30%"><legend>kirjaudu</legend> <form method="post"> sähköposti <br><input type="text" name="email" size="40"> <br> salasana <br><input type="password" name="pass" size="40"> <br> <input id="button" type="submit" name="btn-login" value="kirjaudu!"> </form> </fieldset> <br><font color="red"><i>ongelmia kirjautumisessa?<br>ota yhteyttä sulivixiin!</i></font> </div> <br><br> <a href="http://kamakellari.eu"><img src="/admin/kuvat/etusivulle.gif"></a> </center> </body> </html> 

for own safety: don't use mysql_connect!

switch mysqli or pdo.


anyway hide/suppress deprecated warnings may do:

error_reporting(e_all ^ e_deprecated);

or suppress errors/warnings:

error_reporting(0);


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -