//check the entries
$dummy = "religion";
$a = explode('&', $QUERY_STRING);
$i = 0;
while ($i < count($a)) {
$b = split('=', $a[$i]);
$key = htmlspecialchars(urldecode($b[0]));
$valuestr = htmlspecialchars(urldecode($b[1]));
if (!strcasecmp($key,$dummy))
$religionname = $valuestr;
$i++;
}
if ($religionname)
{
$hostname = "localhost";
$usernamedb = "createl";
$passworddb = "sputilate";
$dbName = "createl";
$link = mysql_connect($hostname, $usernamedb, $passworddb)
or die("Could not connect");
// print "Connected successfully";
mysql_select_db("$dbName")
or die("Could not select database");
// Performing SQL query
$query = "SELECT * FROM caedesreligion where indexfield = '$religionname'";
$result = mysql_query($query)
or die("Query failed");
$line = mysql_fetch_array($result, MYSQL_ASSOC);
print "Culture : Religion : ";
print next($line);
print " | ";
}
else
{
print "Culture : Religion";
print "";
}
?>
Back to Religion
| |