Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Help with yucky Perl CGI Script!
Old 04-07-2005, 11:13 AM Help with yucky Perl CGI Script!
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
We have a problem with our info request script - it ignores everything after a space. IE. if a user enters 'My Name' in a field, only 'My' will be returned.

Here's the function that grabs the data, where I think the issue is:

Code:
sub decode_vars
{
$i=0;
if ( $ENV{'REQUEST_METHOD'} eq "GET") {
	$temp=$ENV{'QUERY_STRING'};
}
else {
	read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
}
@pairs=split(/&/,$temp);
foreach $item(@pairs) {
	($key,$content)=split(/=/,$item,2);
	$content=~tr/+/ /;
	$content=~s/%(..)/pack("c",hex($1))/ge;
 
	$content =~ s/\r\n/\n/g;
	$fields{$key}=$content;
}
}
If you need more let me know!

- Mina


EDIT:
Come to think of it I don't think the problem is there. It seems to be happening only once in a while. I'll keep an eye on it...
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by Minaki; 04-07-2005 at 11:36 AM..
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
 
Register now for full access!
Old 04-10-2005, 05:22 PM
Jared's Avatar
Skilled Talker

Posts: 52
Location: St. Anthony, ID
Trades: 0
We need the variable that carries the "name" value.
Jared is offline
Reply With Quote
View Public Profile Visit Jared's homepage!
 
Reply     « Reply to Help with yucky Perl CGI Script!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17829 seconds with 12 queries