g00fy
02-09-2003, 06:34 AM
hi all,
the subject explains it all :)
i have written a subscribe me form (after many hours of coffee and a very steep learning curve):)
what i want to do now is add a button that looks to another script and reads the contents of the file line by line into a textarea.
** is this the right approach to open another script or should i do it all from the one ?
** if it is not the right way, how do i call a part of the script when i click the button ?
here is the form code i have:
<form action="show_sub.pl" method="post" name="email_butt" id="email_butt">
<input type="submit" name="Submit" value="Show Subscribers">
</form>
<textarea name="address" cols="50" rows="10" wrap="OFF" id="address"></textarea>
and the code so far in show_sub.pl:
$memberinfo = "/a dir";
open (DAT,"<$memberinfo/address.txt");
@database_array = <DAT>;
close(DAT);
print "<textarea rows=10 cols=50>";
foreach $line (@database_array)
{
print "$line";
}
print "</textarea>";
this is where i get a server error, when i click the button to read the contents into the textarea :(
would love some direction here and i will have finished my first script with a lot of learning :D
thanx to all
g00fy
the subject explains it all :)
i have written a subscribe me form (after many hours of coffee and a very steep learning curve):)
what i want to do now is add a button that looks to another script and reads the contents of the file line by line into a textarea.
** is this the right approach to open another script or should i do it all from the one ?
** if it is not the right way, how do i call a part of the script when i click the button ?
here is the form code i have:
<form action="show_sub.pl" method="post" name="email_butt" id="email_butt">
<input type="submit" name="Submit" value="Show Subscribers">
</form>
<textarea name="address" cols="50" rows="10" wrap="OFF" id="address"></textarea>
and the code so far in show_sub.pl:
$memberinfo = "/a dir";
open (DAT,"<$memberinfo/address.txt");
@database_array = <DAT>;
close(DAT);
print "<textarea rows=10 cols=50>";
foreach $line (@database_array)
{
print "$line";
}
print "</textarea>";
this is where i get a server error, when i click the button to read the contents into the textarea :(
would love some direction here and i will have finished my first script with a lot of learning :D
thanx to all
g00fy