How do i pass a variable (like from a txt file) into a textarea in PHP? I’m a bit confused on how to do it…
thx in advance
How do i pass a variable (like from a txt file) into a textarea in PHP? I’m a bit confused on how to do it…
thx in advance
I think you might need some JavaScript to acheive this. Im not 100% though.
i think you have to open the file first…
ie:
#read from file
<?
$file = '???.txt' ;
$fh = fopen($file,'r') or die ("couldnt open file to read");
$file_size =filesize($file);
$file_content = fread($fh,$file_size);
fclose ($fh);
echo '<TEXTAREA NAME="" ROWS="" COLS="">'.$file_content.'</TEXTAREA>';
?>
No need for java @ all.
woot woot thanks a lot man!
:: Copyright KIRUPA 2024 //--