5 Replies Latest reply on Jul 22, 2009 10:36 AM by Production Monkey

    mySQL help

    Xposure Interactive Level 1

      I have the following lingo:

      ------------------------------------------------------------------------------------------ -------------------------------------------------------

      global gforename, gsurname, gdob, gcompany, gfirstDate, guserLevel, gdatePassed, gNetID1

      on beginSprite me
        gforename = "Duncan"
        gsurname = "Bradbury"
        gdob = "17-11-1977"
        gcompany = "Cognition"
        gfirstDate = the short Date
        guserLevel = "0000100010"
        gdatePassed = the short date
        set gNetID1 = getNetText("http//www.cognitionmedia.co.uk/getOfficeRecord.php?forename="&gforename"&surn ame="&gsurname&"&dob="&gdob)
      end beginSprite me


      on exitFrame me
        if netDone(gNetID1) then
          theResult = netTextResult(gNetID1)
          alert "" & theResult
          go to the frame + 1
        else
          go to the frame
        end if
      end exitFrame me

      ------------------------------------------------------------------------------------------ -------------------------------------------------------

       

      ...and the following PHP:

      ------------------------------------------------------------------------------------------ -------------------------------------------------------

      <?php
      $forename=$_GET['forename'];
      $surname=$_GET['surname'];
      $dob=$_GET['dob'];

      $con = mysql_connect("79.99.43.20", "xxxxxxx", "********");
      mysql_select_db("cognitionm1", $con);
      $query = "SELECT ID, forename, surname, dob, firstDate, userLevel, datePassed FROM officePassport WHERE forename = '$forename' AND surname = '$surname' AND dob = '$dob'";

      $result = mysql_query($query) or die(mysql_error());

      mysql_close($con);
      ?>

      ------------------------------------------------------------------------------------------ -------------------------------------------------------

      The dcr runs but the alert message comes back blank. My host assures me that the connection details are correct. I'm a little new to the whole php mySQL and netLingo thing so wondered if I am missing a trick somewhere.

       

      Thanks