Redirect to an application page Not on the same server after login

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 974
Joined: Mon Oct 01, 2012 12:32 pm

Thu Oct 22, 2015 9:21 pm

There are a few problems you should fix first.
1) Don't use mysql_ extension. It's outdated, slow, insecure, and not portable if you outgrow your mysql database and switch up to anything else the bright red box on http://php.net/mysql_connect for suggestions
2) You are handling login and passwords wrong. See http://php.net/manual/en/faq.passwords.php for some help there.

There are plenty here, myself included, who will be happy to help with those 2 things first if necessary, but those should be addressed before answering your actual question

element121
php-forum Fan User
php-forum Fan User
Posts: 628
Joined: Sat Jun 06, 2015 11:46 am
Contact:

Mon Oct 26, 2015 6:32 am

If you are using a framework, like CodeIgniter for example, you can easily switch from mysql to mysqli to pdo as the database layer is abstracted by the framework:

Code: Select all

$db['default']['dbdriver'] = 'mysql';
// or
$db['default']['dbdriver'] = 'mysqli';
// or 
$db['default']['dbdriver'] = 'PDO';
The old version of CI I'm using allows me to switch between the 3 above already mentioned and cubrid, mysql, oci8, obdc, postgre, sqlite, sqlsrv.

Just one advantage of using a PHP framework.

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 974
Joined: Mon Oct 01, 2012 12:32 pm

Mon Oct 26, 2015 6:46 am

I always encourage people to consider PDO for a number of reasons, security, speed, and portability are the big ones, but ease of implementation whether you're going procedural or object oriented is a big factor too. Here's a 10 minute or so video by Jesse Boyer of jream.com that shows how easy it can be. https://www.youtube.com/watch?v=dF8hoPj-1bc

Post Reply