Hey all,
So I have an asp/sql issue. I'm building a staff search function and am having a strange issue arise when passing letters via the querystring to a page that searches lastname based on the value in the query string. I am passing the letter, grabing it from the query string and creating...
Hi all,
Another quick question. I'm trying to populate 2 arrays from my SQL query and I keep getting the "Subscript out of range" error. Can someone explain what I'm doing wrong?
dim counter, prevComments(), R_to()
RS.movefirst
counter = 0
do until RS.EOF
R_to(counter) = RS("R_postby")...
Hi everyone,
I have a bit of a problem with an application I'm working on. I am submitting information to an access database and keep recieving this error "2147217900" which, from googling it, seems to be a permissions error on the access database. I have gone in and reset the permissions for...
Hi all,
I have a question for you. I am writing user submitted information to a tab delimited text file and reading it back into a web page via ajax. I am reading the text file from the bottom up (newest posts first) and displaying 5 results per page. My problem is in displaying my Previous...
WOW, now it's getting narrowed down. audiopro, your second test worked and created the file!
#define and create textfile for replies
$id='test';
my $checkid = $id.".txt";
So something is wrong with my $id variable. I am chomping it, the length is correct, I don't get it... Is it possible...
HA HA HA, thanks audiopro! I needed that! You may be right. I totally forgot to chomp the $id variable. I'll test it and let you know. Thanks for the help, I'm fairly new to perl so this is helping me learn!
Cheers
when I print out $checkid to see the value is does print as 1234.txt or what ever $id is passed in. Do I need to print it in the file handle as open(FH,">>.scalar($checkid))or die "Cannot create file"; or something? I wish I could use the /fatalstobrower/ to see the error code, but I don't...
Hey audiopro,
thanks for the tip. It worked like a charm. If I replace the variable in the file handle with a generic name like test.txt, the file gets created. But if I replace the test.txt with the variable it doesn't work.
WORKS
open(FH,">>test.txt") or die "Cannot create file"...
The $checkid is what I was hoping for. The $id is a random generated number from javascript that I am setting as the value of ID through a substring call. By calling $checkid = $id . ".txt"; I get the value I want to name my text file as it just won't create the file. Was that last post to be...
Thanks for the help. This still doesn't seem to create the text file... What am I doing wrong?
#define and create textfile for replies
my $checkid = $id.".txt";
open(FH,">$checkid") or die "$!";
close(FH);
you mean something like this?
if (param())
{
my $id = param('id');
#define filehandle name
my $fname = $id . ".txt";
#print filehandle
print <$fname>;
}
Hi all,
Quick question for you, how do I go about creating a new text file on the fly? I am trying to have a new text file created when a user submits a comment form. This file will contain the info submitted but I cannot seem to create a blank text file on the fly. Any help would be...
Sorry, KevinADC,
I am using CGI not PERL. I have a form which contains 2 text areas, I am moving content from one to the other and them writing them back to text files. The temp file gets overwritten completely with NO values and the post file gets appended with the value of my post variable.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.