MY NODE: Sri Lanka District and City List Sql File

MY NODE: Sri Lanka District and City List Sql File: For a recent project I had to find all the Sri Lankan District and related Cities to populate in two drop downs. The list is not fully compl… //pagead2.googlesyndication.com/pagead/show_ads.js Advertisements

STORE & RETRIEVE ARRAY ELEMENTS IN MYSQL USING PHP

<?php$link = mysqli_connect(“localhost”, “my_user”, “my_password”, “test”); /* check connection */if (!$link) {    printf(“Connect failed: %s\n”, mysqli_connect_error());    exit();} /* set autocommit to off */mysqli_autocommit($link, FALSE); mysqli_query($link, “CREATE TABLE Language LIKE CountryLanguage”); /* Insert some values */mysqli_query($link, “INSERT INTO Language VALUES (‘DEU’, ‘Bavarian’, ‘F’, 11.2)”);mysqli_query($link, “INSERT INTO Language VALUES (‘DEU’, ‘Swabian’, ‘F’, 9.4)”); /* commit…

INSERT `BLOB` IMAGES ON YOUR MYSQL DATABASE USING PHP

Code Samples : 1. Create the database and tables 2. index.php <?php if(isset($_POST[‘submit’])) { mysql_connect(“127.0.0.1″,”root”,””); mysql_select_db(“image_db”); $imageName = mysql_real_escape_string($_FILES[“image”][“name”]); $imageData = mysql_real_escape_string(file_get_contents($_FILES[“image”][“tmp_name”])); $imageType = mysql_real_escape_string($_FILES[“image”][“type”]); if(substr($imageType,0,5) == “image”) { mysql_query(“INSERT INTO `image` VALUES(”,’$imageName’,’$imageData’)”); echo “Image Uploaded!”; } else { echo “Only images are allowed”; } }?> 3. showImage.php <?php mysql_connect(“127.0.0.1″,”root”,””); mysql_select_db(“image_db”); if(isset($_GET[‘id’])) { $id =…

RED DROPS’ – THE BLOOD BANK

Red Drop is a great on going project of University of Jaffna Team. It pitch on the E-Ground and get lots of fans.  An on time solution for need of blood in an emergency time for Sri Lanka. Carry the blood donors by LBS(Location Based System) mobile technology and find them through USSD application. Volunteers…