Grabbing info based on id# (php mysql)

I’m very new to AS3, PHP, and MYSQL, so forgive me for asking a stupid question…

Anyway, I’m trying to create a website that will grab content from a MYSQL database, and display it inside of a dynamic text field in Flash. There are several buttons on the page, and I want each button to grab different information depending on id #. So far, I’ve done a few tutorials both here and elsewhere, and I’ve finally figured out how to get the Flash to connect to the database, but I’m not sure how to get info based on the id.

My current database only has two columns: id & home_body with one row. I want to add more rows to this soon so I’ll have something like this:

id | home_body
1 | info <-button 1 grabs this
2 | info <-button 2 grabs this

Here’s my code thus far:

AS3:

// this code gets the home page data from the database for display
var homePageText:String;
// Assign a variable name for our URLVariables object
var home_variables:URLVariables = new URLVariables();
// Build the varSend URL variable
var home_varSend:URLRequest = new URLRequest(“cms_control_file.php”);
home_varSend.method = URLRequestMethod.POST;
home_varSend.data = home_variables;
// Build the varLoader variable
var home_varLoader:URLLoader = new URLLoader;
home_varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
home_varLoader.addEventListener(Event.COMPLETE, home_var_comp);

       home_variables.sendRequest = "get_home_text";    
    // Send the data to the php file
       home_varLoader.load(home_varSend);

function home_var_comp(event:Event):void {
// Put the about text from mysql database into the about text field
homePageText = event.target.data.home_text;
home_txt.htmlText = “” + homePageText;

}

PHP:

<?php
// connect to your MySQL database here
include_once “connect_to_mysql.php”;

//////////////////////////////////////////////// Gather Home Page Text ///////////////////////////////////////////////////////////////////
if ($_POST[‘sendRequest’] == “get_home_text”) {

$sql = mysql_query("SELECT home_body FROM cms_content");

while($row = mysql_fetch_array($sql)) { 
      $home_body = $row["home_body"];
      print "home_text=$home_body";
}

}

?>