Forum Moderators: coopster
What you need, is something like this (in the same php file):
<?php
$file_arr = $file("file.txt");
$alert = $file_arr[0];
?>
//start html output here
<script language="Javascript">
function showMsg() {
alert("<?php echo $alert;?>");
}
</script>
<input type="button" value="click me" onClick="showMsg()" />
Hope this helps!