Re: read textfield from using PERL
prashan kukde menulis pada tgl 06 December 2001 Thursday 04:27 am sbb: :: Hi, :: I am trying to read data from the form's text field :: using PERL script. Following is the perl code I am :: using, :: #!/usr/local/bin/perl :: :: use CGI; :: :: $cgiobject = new CGI; :: $userphone=$cgiobject-param(textfield); hi prashan, don't add double quote at the textfield $userphone=$cgiobject-param(textfield); Regards, Djoko Priyono www.dnet.net.id :: :: print qq# :: welcome me ! :: $userphone :: #; :: :: textfield is a multiline text box in the form. :: But, when I read it in the script, the textfield :: looses the extra spaces or paragraph spaces from the :: textfield. Will it be possible to get the data as it :: is filled in the text field ?? :: Thanks, :: Prashant :: :: :: __ :: Do You Yahoo!? :: Send your FREE holiday greetings online! :: http://greetings.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
encrypt Pass
Hi how must I go to encrypt my passwd on my adduser I wrote? Thanx Christo PS! is it make salt or something like that ?
Re: read textfield from using PERL
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: prashan kukde menulis pada tgl 06 December 2001 Thursday 04:27 am sbb: :: Hi, :: I am trying to read data from the form's text field :: using PERL script. Following is the perl code I am :: using, :: $cgiobject = new CGI; :: $userphone=$cgiobject-param(textfield); don't add double quote at the textfield $userphone=$cgiobject-param(textfield); of course, that is incorrect. now perl will look for a textfield function, which is not what you want. :: textfield. Will it be possible to get the data as it :: is filled in the text field ?? it depends on what the user-agent decides to send. -- brian d foy [EMAIL PROTECTED] - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Next 10 Results Help Needed
I am working on a program that will read the password file and display a list of users that match the gid's 670 671 on an html page. I have that part worked out, however now I want to have the results display in groups of ten allowing the user to click on next results to see the next results. I've tried to look at some examples but they are for database search results which is causing me alittle confusion with syntax. Does anyone have any sample code I can look at that reads from a file displays the results as stated above. Thanks, Darryl #!/usr/local/bin/perl open(PASSWD,/etc/passwd) or die Unable to open passwd:$!\n; print Content-type: text/html \n\n; display_html; open_list; display_tail; close PASSWD; sub open_list { while (PASSWD) { ($login, $passwd, $uid, $gid, $gcos, $home, $shell) = split(/:/); ($comment, $dash) = split(/-/, $gcos); if (($gid eq '670') or ($gid eq '671')) { print td align=center bgcolor=#74ccba$login/td\n; print td align=left bgcolor=#74ccbanbsp;$comment/td/tr\n; } } } sub display_html { print HTMLHEADTITLEUser Listing/TITLE/HEAD; print BODY BGCOLOR=#ff TEXT=#00; print CENTER; print table border=0 cellpadding=2 cellspacing=2\n; print trtd bgcolor=#ddd7d7centerUser Name/center/td\n; print td bgcolor=#ddd7d7centerComments/center/td/tr\n; }; sub display_tail { print /table\n; print /CENTER\n; print /BODY; print /HTML; }; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help with Debug Please.
At 23:14 06/12/01, you wrote: Hey I got an error on a script and went to run it from the command line to figure out what i forgot but to my surprise I got this: (offline mode: enter name=value pairs on standard input) What the he$$ is it and how can I get by it to run my script from the command line? If you have a CGI script that normally receives data from a form, when you run it from the command line you have to have some way of getting into it the data that the user would normally supply via the form's controls. You're seeing something like this: [mo@server1 dmg]$ perl yourscript.pl (offline mode: enter name=value pairs on standard input) then you just enter into it data like this: [mo@server1 dmg]$ perl bugreport.pl (offline mode: enter name=value pairs on standard input) name1=value1 name2=value2 where value1, value2 are the values to which you would have set controls name1, name2. Then hit ctrl-D when you've entered all the pairs you need. There's more on this in the documentation for the CGI module. best, Mo Mo Holkar Undying King Games [EMAIL PROTECTED] http://www.ukg.co.uk -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: variables using blank spaces
Brett == Brett W McCoy [EMAIL PROTECTED] writes: Brett Duh... escaping isn't what you need, since you're probably Brett doing this as a post. You should put your variable in quotes Brett (which is what you should be doing anyway): Brett INPUT TYPE=hidden NAME=var VALUE=$var But that'll fail if $var contains quotes or ampersands. Escaping *is* what you need, but not URI-escaping. You want HTML-entitizing. Or simpler yet: use CGI qw(hidden); print hidden(var, $var); Done. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]