Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $host = "myinstance.c8rse3unpyyi.ap-northeast-2.rds.amazonaws.com";
- $user = "myUsername";
- $pass = "myPW";
- $dbname = "testDB";
- $conn = mysqli_connect($host, $user, $pass, $dbname, 3306);
- if ($conn) {
- echo "connect_success";
- } else {
- echo "connect_fail";
- }
- # select
- $sql = "INSERT INTO test (NAME, NUM)
- VALUES ('john', '3')";
- if (mysql_query($sql)) {
- echo "query_sended!";
- } else {
- echo "query_failed..";
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement