Re: Checking for existance for data in a column

2002-12-03 Thread Jason Purdy
You can most likely preclude empty/invalid data with SQL. Let's say your field/column name is 'name'. Then with your DBI prepare() call, you can preclude records where name is blank, null, or whatever you'd like. $sth = $dbh->prepare( 'SELECT * FROM table WHERE name IS NOT NULL' ); $sth->execute

Re: arrays & lists

2002-11-23 Thread Jason Purdy
> I know I am missing a lot in my knowledge, but I'm trying to figure > something out & seemingly am in a hole... MySQL can do a lot of this for you, I believe... You want a random record from the database and retrieve a particular field from that record: # Untested, but you would call this subr

Re: multiple selection

2002-11-23 Thread Jason Purdy
Two things: 1) Your action parameter of the form tag was pointing to a separate program. If you leave it blank (or leave it out altogether), then this same script will process it. 2) You don't need to split param('list') - CGI.pm will automatically make an array for you, if it contains multiple ent

Re: console window

2002-11-21 Thread Jason Purdy
At the end of your perl program, add the line: system( "PAUSE" ); http://www.computing.net/programming/wwwboard/forum/3270.html HTH, Jason "Gary Rocco" <[EMAIL PROTECTED]> wrote in message 001301c290f9$02bad3d0$93b500c7@hppavilion">news:001301c290f9$02bad3d0$93b500c7@hppavilion... when i ran pe

Re: listing perl modues on system

2002-11-21 Thread Jason Purdy
One easy way is to run the command: perldoc perllocal Jason "Jerry M . Howell II" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello there, > >I was wondering if there is an easy way to list the perl modules that are > installed on a system? > > -- > Jer

Re: Perl Editors

2001-08-08 Thread Jason Purdy
I like ActiveState's Komodo product. It's free for non-commercial use (tinkering at home, etc) and has a lot of great features, including a built-in debugger. Have fun! Jason "Dale Pellerin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Anyone have any sug

Re: How to profile CGI scripts?

2001-08-07 Thread Jason Purdy
> I just tested a command line script by putting -d:Dprof in the shebang line and didn't have any > problem. Of course, I'm using ActiveState here and that might make a difference. Perhaps you > could tell us what's in your error log? Yea ... that's another problem - I don't have access to

How to profile CGI scripts?

2001-08-07 Thread Jason Purdy
Disclaimer: I've read the docs, talked to several folks, and played around with the scripts, but I must be missing something. I'd like to get the "tmon.out" file output from the -d:DProf flag when my CGI scripts execute remotely on the web server that I'm developing on, but whenever I add the '-d

Re: Still having problems sending mail...

2001-07-26 Thread Jason Purdy
You can also create/install modules without having telnet access, but it's like working on a black box. If something goes wrong, it's kludgey to get it to work. I hacked together this quick little script - after copying the module package folder over to the server via FTP, then I just call this

Re: e-mailing HTML form results

2001-07-26 Thread Jason Purdy
pt your mail unless you're either coming through their network or you're sending it to someone in their domain. The '64...' IP # is me. It's telling the server you're connecting to who you are. You can also put a full domainname in there, too. Jason - Original M

Re: e-mailing HTML form results

2001-07-25 Thread Jason Purdy
I had this earlier this morning - this means the Net::SMTP object wasn't created. In my code, I redirected STDERR and created the object using Debug=1 to get more information. open (STDERR, ">>/logs/mail_log"); $msHandle = Net::SMTP->new ('localhost', H

cookie/state challenge

2001-07-17 Thread Jason Purdy
In processing an HTML form, I need to get a userID field from a cookie from the client's browser. The cookie is created at the front-door of the site where the user can login. But the user could come directly to this HTML form, bypassing the login. So I see situations where the cookie doesn'

Re: Needing a script to...

2001-07-17 Thread Jason Purdy
I'm working with Excel (just for the reading aspect, though) & fortunately, someone has written ParseExcel (& WriteExcel). Looking on CPAN, I don't see a similiar offering for Word. The ParseExcel module does rely on the OLE::Storage_Lite module - you may want to check that out and see if that c

Re: test script

2001-07-11 Thread Jason Purdy
Gotta know a few things ahead of time: what kind of server (Windows or UNIX) and the location of the perl interpreter. Making some gross assumptions, try: #!/usr/local/bin/perl -w print "Content-type: text/html\n\n"; print "Hello World!\n"; --- Next, see if the server has CGI installed: #!/u

Re: Errors

2001-07-10 Thread Jason Purdy
I upload, privs, shebang, etc). But there's no way to actually get the error_log output redirected for the life of a script to a local file that I can access, is there? Jason - Original Message - From: "Gabor Szabo" <[EMAIL PROTECTED]> To: "Jason Purdy" <[EMAI

Re: By popular request: the source of the invisible webscript.

2001-07-10 Thread Jason Purdy
Well, the slashes (\\) are the wrong way ... try this: print "\n\nTest Script\n\n\nTest.\n\n"; Netscape is more strict than IE w/ HTML, so if you were using Netscape, this could be your problem. Jason - Original Message - From: "Samuel Brown" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>

Re: Errors

2001-07-10 Thread Jason Purdy
I'm using ActiveState Komodo & sometime's Lemmy (VI) ... if I know where you're going, I also used a tool that ValueWeb provides to strip out ^M characters. Jason - Original Message - From: "Bradley M. Handy" <[EMAIL PROTECTED]> To: "Jason Purdy

Re: Errors

2001-07-10 Thread Jason Purdy
error_log redirected to a file of your choice? Jason - Original Message - From: "Curtis Poe" <[EMAIL PROTECTED]> To: "CGI Beginners" <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 1:13 PM Subject: Re: Errors > --- Jason Purdy <[EMAIL PROTECTED]> wro

Errors

2001-07-10 Thread Jason Purdy
I'm working on a web site that's hosted by ValueWeb (not important, but they give you CGI access but they don't give you access to the error log). So I feel like I'm flying (coding) blind sometimes. Especially when I get the Internal Server Error. The scripts in question are inherited code a

Re: Moving a row from one table to another.

2001-07-10 Thread Jason Purdy
I've never seen a MOVE command, but I wouldn't put it past someone like Micro$oft or Oracle to put in a proprietary SQL command that would allow you to do that. Just a word of warning: if you do find a MOVE command (or any such proprietary command), you're binding yourself to that particular SQL

Re: Sources

2001-07-10 Thread Jason Purdy
My guess would be permissions and how you have your mysql server setup. When you're running the script on the terminal, it's using your ID to connect to the database server. When the webserver's running the script, it's using the server process' ID. I'm not sure if that's the right answer, thoug

Re: Use CGI.pm or Parse it in the script?

2001-07-09 Thread Jason Purdy
Just wanted to say two things: 1) These are my sentiments exactly - I've only been on this list for a few days and I've seen a lot of religous responses. However, as a newbie, I don't mind extra flack as long as I can get to the meat of the matter (ie: sometimes when you guru's respond, you make

Re: how to upload a file through an html form, again.

2001-07-09 Thread Jason Purdy
Check out the CGI documentation - it's very thorough and has a lot of excellent examples. Looking at the synopsis example, it looks like you're missing an if ($q->param()) { ... } around the file uploading part of your code. Give that a shot... Jason > here it is: > #!/usr/bin/perl > use CGI;

Re: Checking Form input.

2001-07-09 Thread Jason Purdy
Well, I posted my method recently (see Re: Required Fields Module), BUT fliptop's methodology is better if your form has a group of checkboxes with the same name or a multiple selection box (one example I didn't think of that you pointed out, flipdog :)) or some other form design where your query

Re: how to upload a file through an html form?

2001-07-09 Thread Jason Purdy
One thing that snagged me with printing to a filehandle is the binmode. I was uploading an Excel spreadsheet and writing it, but it would become corrupted (b/c it's a binary file). So if you're dealing with binary files (and according to the docs, if your system knows the difference [which for m

Re: Required Fields Module

2001-07-09 Thread Jason Purdy
I posted the original message, but my code is not an alternative to CGI - it's a supplement to validate a form-fed CGI script and that certain elements were filled out by the user. It requires CGI, actually. Found a link that described how to do this on the JavaScript side: http://www.webdevelop

Re: newbie question

2001-07-09 Thread Jason Purdy
I'm not familiar with WinCGI, but your code is missing the important shebang line. I have Apache running on my Windoze box and my shebang is: #!\Perl\bin\perl Everything's off my C drive and the DOS path to Perl is: C:\Perl\bin\perl. Jason - Original Message - From: "nila devaraj" <[E

Re: Required Fields Module

2001-07-08 Thread Jason Purdy
Oops - found another little tweak - it should be $formHandle->param instead of $formHandle->keywords (unless your form is using an search). Sorry 'bout that... Jason - Original Message ----- From: "Jason Purdy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]

Re: Required Fields Module

2001-07-08 Thread Jason Purdy
amp; try again\n"; exit; # I couldn't just use the die, b/c it wouldn't format the $msg like I wanted } } - Original Message - From: "fliptop" <[EMAIL PROTECTED]> To: "Jason Purdy" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> S

Required Fields Module

2001-07-07 Thread Jason Purdy
I wrote this simple lil' diddy as a reusable module to check required fields and wanted to share it. You can put this in a central .pl file to be required by any CGI script that needs to verify that certain fields have been filled out. Probably makes more sense to do this type of verification