Hi,
Just a short note.. Do not think about it as passing a variable to a script..
All you are doing it producing an html page for the browser to interpret. So wether this code is html, java, css or whatever.. It doesn't matter!
You have to make sure the $variable gets fillid in the while loop. Then in the next part you print / echo / .. the value of the var to the page, in the right location.
If you kee having trouble, I'd suggest to just write a very simple page, say
$result=("select * from database limit 1");
while( $row = mysql_fetch_array($result))
{
$myvar = $row['columname'];
}
$script = "
<script language=\"javascript1.2\">
function checker()
{
return confirm(\"Are you sure you want to delete the ";
$script .= $myvar;
$script .= "
record?\")
}
</script>
";
echo $script;
Once you get this to work, go one sep further, and include the rest of the page.
J.