0 Replies Latest reply on Dec 1, 2015 4:08 AM by candraherk

    Connect Database with FLash and Still Error

    candraherk

      Here is my PHP code

       

      <?php

      $servername = "localhost";

      $username = "root";

      $password = "";

      $dbname = "adaptasi";

       

       

      // Create connection

      $conn = new mysqli($servername, $username, $password, $dbname);

       

       

      if (mysqli_connect_errno())

        {

        echo "Failed to connect to MySQL: " . mysqli_connect_error();

        }

       

       

      // Perform queries

      mysqli_query($conn,"SELECT isi FROM materi");

       

       

       

       

      mysqli_close($conn);

      ?>

       

      And its my Action Script 2

      var filepath:String;

       

       

      if (_url.indexOf("http") != 0) filepath = "http://localhost/adaptasi/";

      else filepath = "../scripts/";

       

       

      var send_lv:LoadVars = new LoadVars();

      var result_lv:LoadVars = new LoadVars();

       

       

      send_lv.onLoad = function(success:Boolean):Void {

         TextIsi1.text = send_lv;

      }

       

       

      send_lv.sendAndLoad(filepath + "morfologi.php", send_lv, "GET");

       

      Its return error onLoad=%5Btype%20Function%5D