Well I am giving up for tonight on this posting to the already open page..... I made a little head way by head way I mean when I press Submit it sends back undefined I am going to place the code her for the experts to pick apart(That would include everyone but me on this site) a little FYI it is for an address book for a web based e-mail. I know it has to be this code because it actually puts the post on the main page. and I tried to load the while statement into a single varible but only one printed on the sceen. The last one I think it was because of the fact that the names weren't in an array. nuff talking here is the code
<?
session_start();
echo $userto;
?>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--
function copyForm() {
opener.document.hiddenForm.myTextField.value = document.popupForm.myTextField.value;
opener.document.hiddenForm.submit();
return false;
}
//--></SCRIPT>
</HEAD>
<BODY>
<FORM NAME="popupForm" onSubmit="return copyForm()">
<?
echo "<table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='65%'
id='AutoNumber1'>";
$color="#8a96ca";
$connection = mysql_connect("localhost", "john", "camaro") or die ("connect");
$db = mysql_select_db("authorize", $connection) or die ("can't connect db");
$sql = "select * from addy where username = '$SESSION_NAME'";
$result= mysql_query($sql, $connection) or die ("can't run");
echo "<FORM NAME='popupForm' onSubmit='return copyForm()'>";
while($row = mysql_fetch_array($result)) {
echo "<tr>";
echo "<td width='4%' bgcolor=$color><input type='checkbox' name='myTextField' value='$row[1], ' ></td>";
echo "<td width='38%' bgcolor=$color>$row[1]</td>";
echo "<td width='58%' bgcolor=$color align='center'>$row[2]</td>";
echo "</tr>";
if ($color == "#8a96ca") {
$color = "#464e8e";
} else {
$color = "#8a96ca";
}
}
stripslashes($userto);
echo "</table>";
echo "<INPUT TYPE='BUTTON' VALUE='Submit' onClick='copyForm()'>";
echo "</FORM>";
echo "</BODY>";
echo "</HTML>";
?>