MsSQL

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDatabasesMsSQL

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old January 7th, 2018, 08:26 PM
douglittlefield douglittlefield is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jan 2018
Posts: 0 douglittlefield User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 3 sec
Reputation Power: 0
Exclamation Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed

Quote:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home2/dlittlefield/public_html/login/login.php on line 23
Couldn't select the database.


I have a very old login php, sql code that im trying to get active again. I'm stuck because i keep getting the error above.
I have tried already to change the //connect to database information as it suggest but then it just errors even more...

Please help

PHP Code:
<?PHP 
$username 
= ($_POST['username']);
$password = ($_POST['password']);
//check that form fields are set 
//and redirect back to the login form if necessary 
if (!isset($username) || !isset($password)) { 
header"Location: login.html" ); 

//check that the form fields are not empty, and redirect back to the login page if they are 
elseif (empty($username) || empty($password)) { 
header"Location: login.html" ); 

else{ 

//set the database connection variables 
$dbHost "localhost";                          ////set your server
$dbUser "login";                          //// server username
$dbPass "login";                         //// server password
$dbDatabase "login";                     //// which database to connect to


//connect to the database  << Line with Issue >> 
$db mysql_connect("$dbHost""$dbUser""$dbPass") or die ("Error connecting to database."); 
mysql_select_db("$dbDatabase"$db) or die ("Couldn't select the database."); 

$user mysql_real_escape_string($username);       //// Sanitize user input
$pass md5($password);                           ////MD5 Password (or you can use sha or whatever)
$result=mysql_query("select * from users where username='$user' AND password='$pass'"$db);

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesMsSQL > Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap