5 Replies Latest reply on Oct 28, 2008 3:28 AM by atta707

    Export flex project!

    lerkan69
      I have follow a tutorial on how to create a basic forum with flex 3, using comunication with php (phpmyadmin).

      Now, i want to export my project, and put it up on my webhost. I know how to do this (export project, then use FTP client to copy the files to the webhost), but I dont know how to intergrate the webhost database!
      The webhost have phpmyadmin, and I can create databases there, but how do I connect that online database to my flex project.

      Thanks in advance!
        • 1. Re: Export flex project!
          lerkan69 Level 1
          No one?
          Maybe its a stupid question...if so, let me know :)
          • 2. Re: Export flex project!
            lerkan69 Level 1
            No one?
            Maybe its a stupid question...if so, let me know :)
            • 3. Re: Export flex project!
              atta707 Level 2
              Okay, to start with I don't anything about php or phpmyadmin!

              Having said that, I hope you realize the Flex doesn't -- actually can't -- directly to any database. It always goes thru on intermediate (web) server to and it's this server side that knows how to connect to what database, gets the data and returns it for Flex to display it.

              So, I've just turned you flex problem into a php problem!

              Now imagine, you have a database and in your php scripts you know how to connect to this database. You'll probably need some URL of the DB server, name of the schema and username and password. All this information would be in some php file or some properties file that php script can read to connect to db. Your php code would connect to the DB, read the table(s), convert them to XML or JSON or whatever format and write them to response.

              This data would come to Flex, let's say thru the result event of the HttpService class. And you'll do whatever you want to do with this data.

              Once your project is ready for the world, you'll move it from development environment to your host and change the URL/username/password of the DB running on your host's site.

              That would just work! I hope it makes sense!

              ATTA
              • 4. Re: Export flex project!
                lerkan69 Level 1
                Makes sense! Now I know where to look, and try different settings.

                thank you! :)
                • 5. Re: Export flex project!
                  atta707 Level 2
                  You're welcome!

                  HttpService and it's related example should give you good start.

                  ATTA