Is this a "secure" or "safe" method of connecting via a PHP page to a MySql database.
Can it easily be hacked or cracked.
Are there better methods? All tips welcome.
<?php
$usr = 'prefix_user';
$pwd = 'password';
$db = 'prefix_database';
$host = 'mysql.jodoshared.com';
$id = mysql_connect($host,$usr,$pwd);
if(!$id)
{
echo "Couldn't connect to database_result";
}
mysql_select_db($db) or die('Database not found_result');
$query_stub = "select firstname, surname, agetext, address, parish, "
."county, person.id "
."from household, person where "
."household.id = person.hsehold and ";
Can it easily be hacked or cracked.
Are there better methods? All tips welcome.
<?php
$usr = 'prefix_user';
$pwd = 'password';
$db = 'prefix_database';
$host = 'mysql.jodoshared.com';
$id = mysql_connect($host,$usr,$pwd);
if(!$id)
{
echo "Couldn't connect to database_result";
}
mysql_select_db($db) or die('Database not found_result');
$query_stub = "select firstname, surname, agetext, address, parish, "
."county, person.id "
."from household, person where "
."household.id = person.hsehold and ";