A friend and I are trying to create a dynamic system for editing news. We both believe our scripts look pretty good and cannot seem to figure out why the variables are not being loaded. We completely scrapped both our codes and worked from the ground up, but it is still not working. Code included.

The functions code:

Code:
//populating the combobox "dropDown"
function AddItems(){
	
	numItems = myData.NumItems;
	
	for (i=0; i<numItems; i++){
		
		var Name = eval("myData.Name"+i);
		var TextData = eval("myData.TextData"+i);
		var Author = eval("myData.Author"+i);
		var TheDate = eval("myData.TheDate"+i);
		
		var ListBoxData = { TextData:TextData, Author:Author, TheDate:TheDate};
		
		dropDown.addItem(Name, ListBoxData);
	}
	dropDown.setChangeHandler("SelectItem");
}
//loading variables into text boxes
function SelectItem(){
	
	_root.texttxt = dropDown.getSelectedItem().data["TextData"];
	_root.datetxt = dropDown.getSelectedItem().data["TheDate"];
	_root.authortxt = dropDown.getSelectedItem().data["Author"];
}
The loader actions:

Code:
myData = new LoadVars();

myData.onLoad = AddItems;

myData.load("newprocess.php");
The PHP script:

Code:
//Just testing

mysql_connect('localhost','**********','*****') 
	or die ('Could not connect to database, faggot');
mysql_select_db('theblizz_whitedevil') 
	or die ('Yeah, your database was found, but not the tables! Faggot.');
	
$result = mysql_query('SELECT * FROM news') or die ('no query, fag!');

if ($result) {
$i=0;
while ($tablefield = mysql_fetch_array($result, MYSQL_ASSOC)) {
        $id[$i] = $tablefield['id'];
        $title[$i] = $tablefield['title'];
        $author[$i] = $tablefield['author'];
        $thedate[$i] = $tablefield['date'];
        $text[$i] = $tablefield['story'];
  $i++;
}
 
$j=0;
     while ($j < $i) {
        $Name         = $title[$j];
        $TextData     = $text[$j];
        $Author       = $author[$j];
        $TheDate      = $thedate[$j];
        print "&";
        print "Name$i=$Name&TextData$i=$TextData&Author$i=$Author&TheDate$i=$TheDate";
        $j++;
		

    }		
print '&NumItems=' . $j . '';

}
Been stuck for days... please help!