Mahendra Posted April 16, 2015 Share Posted April 16, 2015 HTML webpage ki Php database ki connection ivadaniki basic code structure evari dagara ayina unte ikkada veyandi...... help avuthundhi Link to comment Share on other sites More sharing options...
dusukochadu Posted April 16, 2015 Share Posted April 16, 2015 PHP database endi Link to comment Share on other sites More sharing options...
Raaz-NTR Posted April 16, 2015 Share Posted April 16, 2015 php use chesi database ki connection Link to comment Share on other sites More sharing options...
Raaz-NTR Posted April 16, 2015 Share 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(); Link to comment Share on other sites More sharing options...
Mahendra Posted April 16, 2015 Author Share Posted April 16, 2015 PHP database endi  emo annai manaki PHP ante endho kuda thelvad....... Friend ki kavalante post esaaaaaa Link to comment Share on other sites More sharing options...
Mahendra Posted April 16, 2015 Author Share 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 Link to comment Share on other sites More sharing options...
Raaz-NTR Posted April 16, 2015 Share 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.. Link to comment Share on other sites More sharing options...
subash.c Posted April 17, 2015 Share Posted April 17, 2015 ayyo adi explain cheyagalam kaani idi google ninche teccha.. Link to comment Share on other sites More sharing options...
repallenbk Posted April 17, 2015 Share 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: Link to comment Share on other sites More sharing options...
Mahendra Posted April 17, 2015 Author Share 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 Link to comment Share on other sites More sharing options...
Yaswanth.M Posted April 17, 2015 Share Posted April 17, 2015 No need to change green colored code Link to comment Share on other sites More sharing options...
Yaswanth.M Posted April 17, 2015 Share 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 Link to comment Share on other sites More sharing options...
Yaswanth.M Posted April 17, 2015 Share 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 Link to comment Share on other sites More sharing options...
Yaswanth.M Posted April 17, 2015 Share Posted April 17, 2015 So simple bro.. U can ask me if you have doubt regarding connection to db using php Link to comment Share on other sites More sharing options...
Raaz-NTR Posted April 17, 2015 Share Posted April 17, 2015 @mahendra greencolor avsaramlaa adi reading the values from redcolor(which u hav provided) rest follow yashwanth bro Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.