Mahendra Posted April 16, 2015 Posted April 16, 2015 HTML webpage ki Php database ki connection ivadaniki basic code structure evari dagara ayina unte ikkada veyandi...... help avuthundhi
Raaz-NTR Posted April 16, 2015 Posted April 16, 2015 <?php$servername = "localhost";$username = "username";$password = "password";// Create connection$conn = new mysqli($servername, $username, $password);// Check connectionif ($conn->connect_error) { die("Connection failed: " . $conn->connect_error);} // Create database$sql = "CREATE DATABASE myDB";if ($conn->query($sql) === TRUE) { echo "Database created successfully";} else { echo "Error creating database: " . $conn->error;}$conn->close();
Mahendra Posted April 16, 2015 Author Posted April 16, 2015 PHP database endi emo annai manaki PHP ante endho kuda thelvad....... Friend ki kavalante post esaaaaaa
Mahendra Posted April 16, 2015 Author Posted April 16, 2015 <?php $servername = "localhost"; $username = "username"; $password = "password"; // Create connection $conn = new mysqli($servername, $username, $password); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // Create database $sql = "CREATE DATABASE myDB"; if ($conn->query($sql) === TRUE) { echo "Database created successfully"; } else { echo "Error creating database: " . $conn->error; } $conn->close(); Thnx annai......... Code friend ki kavali....... Repu soosi....... doubts emayina unte ping sestha......... meeku idea undhi gaaaa code gurinchi
Raaz-NTR Posted April 16, 2015 Posted April 16, 2015 Thnx annai......... Code friend ki kavali....... Repu soosi....... doubts emayina unte ping sestha......... meeku idea undhi gaaaa code gurinchi ayyo adi explain cheyagalam kaani idi google ninche teccha..
subash.c Posted April 17, 2015 Posted April 17, 2015 ayyo adi explain cheyagalam kaani idi google ninche teccha..
repallenbk Posted April 17, 2015 Posted April 17, 2015 first nuv html file ni .php file ga change cheyali a thravatha ee code try che <?php$servername = "localhost";$username = "username";$password = "password";// Create connection$conn = new mysqli($servername, $username, $password);// Check connectionif ($conn->connect_error) { die("Connection failed: " . $conn->connect_error);} // Create database$sql = "CREATE DATABASE myDB";if ($conn->query($sql) === TRUE) { echo "Database created successfully";} else { echo "Error creating database: " . $conn->error;}$conn->close(); source from:-Raaz-NTR, on 17 Apr 2015 - 04:01 AM, said:
Mahendra Posted April 17, 2015 Author Posted April 17, 2015 first nuv html file ni .php file ga change cheyali a thravatha ee code try che <?php $servername = "localhost"; $username = "username"; $password = "password"; // Create connection $conn = new mysqli($servername, $username, $password); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // Create database $sql = "CREATE DATABASE myDB"; if ($conn->query($sql) === TRUE) { echo "Database created successfully"; } else { echo "Error creating database: " . $conn->error; } $conn->close(); source from:-Raaz-NTR, on 17 Apr 2015 - 04:01 AM, said: annai.... Green color mark chesina lace lo naa servername, Username and password place chesanu and red colour mark chesina place lo kuda same details ivvala like naa servername, username and password or avi alage uncheyala? and moreover.... .PHP extension tho save chesanu....... kunchum details chebuthara next ela open cheyalo
Yaswanth.M Posted April 17, 2015 Posted April 17, 2015 .php file should be moved to server like xampp.. Open in browser with localhost/filename.php. mysql, apache run cheyyali mundhu...htdocs lo ee php file ni petti open cheyyali
Yaswanth.M Posted April 17, 2015 Posted April 17, 2015 Red color place lo mee database username, password ivvali.. Green color place lo chnage avasaram ledu. Oka vela green place lo change chesthe red line vi asalu avasaram ledy
Yaswanth.M Posted April 17, 2015 Posted April 17, 2015 So simple bro.. U can ask me if you have doubt regarding connection to db using php
Raaz-NTR Posted April 17, 2015 Posted April 17, 2015 @mahendra greencolor avsaramlaa adi reading the values from redcolor(which u hav provided) rest follow yashwanth bro
Recommended Posts
Archived
This topic is now archived and is closed to further replies.