Redirection back to a page from form submit

11-24-03, 07:35 PM
|
 |
Code Master
|
|
Join Date: Jun 2003
Location: North East England/UK
Posts: 874
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Redirection back to a page from form submit
I cant understand how to get a re-direct working. I searched for this on the boards and got php fix but I dont wanna get into php. Ill just screw that up!
print $query->redirect('boards_General.pl')
doesnt work! I get the error ;
Software error:
Can't call method "redirect" on an undefined value at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 281.
Considering I placed a value there I dont understand.
I recon redirect is just a key word so how you would put a value in a keyword I dont know. Then again Ive probably miss read it!
Can anyone suggest a redirection solution as the form on my boards_general.pl calls the GENAddBoard.pl script which just sits there, all white and splender. I could put a link on there back to the boards_general.pl but that would still be sloppy!
Thanks
DAL
__________________
"once upon a midnight dreary, while i pron surfed, weak and weary, over many a strange and spurious site of 'hot xxx galore'. While i clicked my fav'rite bookmark, suddenly there came a warning, and my heart was filled with mourning, mourning for my dear amour," 'Tis not possible!", i muttered, "give me back my free hardcore!" quoth the server, 404."
|

11-24-03, 09:10 PM
|
 |
Newbie Coder
|
|
Join Date: Sep 2003
Location: Antarctica
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Looks like your script does not have the CGI.pm module
|

11-25-03, 01:35 AM
|
 |
Code Master
|
|
Join Date: Jun 2003
Location: North East England/UK
Posts: 874
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
YUPAPA I have added the extra code and got the following;
Software error:
Global symbol "$Userid" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 13.
Global symbol "$buffer" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 18.
Global symbol "@pairs" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 19.
Global symbol "$buffer" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 19.
Global symbol "$pair" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 20.
Global symbol "@pairs" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 20.
Global symbol "$name" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 22.
Global symbol "$value" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 22.
Global symbol "$pair" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 22.
Global symbol "$value" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 23.
Global symbol "$value" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 24.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 24.
Global symbol "$name" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 24.
Global symbol "$value" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 24.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 28.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 30.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 31.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 32.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 33.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 34.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 35.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 36.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 37.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 38.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 39.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 40.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 41.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 42.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 43.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 44.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 45.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 46.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 47.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 48.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 49.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 50.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 51.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 52.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 53.
Global symbol "$indexnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 62.
Global symbol "$indexnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 63.
Global symbol "$indexnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 66.
Global symbol "$indexnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 71.
Global symbol "$MTime" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 72.
Global symbol "$Message2print" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 77.
Global symbol "$Userid" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 77.
Global symbol "$indexnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 77.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 77.
Global symbol "$MTime" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 77.
Global symbol "$Message2print" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 87.
Global symbol "$Userid" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 100.
Global symbol "$mypicture" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 102.
Global symbol "$mypostnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 103.
Global symbol "$myquote" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 104.
Global symbol "$mypostnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 113.
Global symbol "$Userid" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 117.
Global symbol "$mypicture" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 119.
Global symbol "$mypostnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 120.
Global symbol "$myquote" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 121.
Global symbol "$myquote" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 125.
Global symbol "$mypicture" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 126.
Global symbol "$line1" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 134.
Global symbol "$line2" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 136.
Global symbol "$line3" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 138.
Global symbol "$line4" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 140.
Global symbol "$line5" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 142.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "$Userid" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "$Userid" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "$mypicture" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "$mypostnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "$Userid" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "%FORM" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "$myquote" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "$MTime" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 146.
Global symbol "$indexnumber" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 270.
Global symbol "$line1" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 272.
Global symbol "$line2" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 273.
Global symbol "$line3" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 274.
Global symbol "$line4" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 275.
Global symbol "$line5" requires explicit package name at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 276.
Execution of /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl aborted due to compilation errors.
So I took out use strict;
Now it reports
Status: 302 Moved location: boards_General.pl
which shows it works.......except it doesnt ..it remains on the GENAddBoard.pl page. 302 Moved Location??? It hasnt ...?
Whats missing?
Ive tried it with a '/' incase it did work and couldnt find the file but got the same: 302 Moved location: /boards_General.pl
__________________
"once upon a midnight dreary, while i pron surfed, weak and weary, over many a strange and spurious site of 'hot xxx galore'. While i clicked my fav'rite bookmark, suddenly there came a warning, and my heart was filled with mourning, mourning for my dear amour," 'Tis not possible!", i muttered, "give me back my free hardcore!" quoth the server, 404."
|

11-25-03, 02:10 AM
|
 |
Newbie Coder
|
|
Join Date: Sep 2003
Location: Antarctica
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Remove the use strict if you do not declare vars in your script.
|

11-25-03, 02:37 AM
|
 |
Wannabe Coder
|
|
Join Date: Nov 2003
Posts: 136
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by DAL
I cant understand how to get a re-direct working. I searched for this on the boards and got php fix but I dont wanna get into php. Ill just screw that up!
print $query->redirect('boards_General.pl')
doesnt work! I get the error ;
Software error:
Can't call method "redirect" on an undefined value at /homepages/39/d87399782/htdocs/Internal/GENAddBoard.pl line 281.
Considering I placed a value there I dont understand.
I recon redirect is just a key word so how you would put a value in a keyword I dont know. Then again Ive probably miss read it!
Can anyone suggest a redirection solution as the form on my boards_general.pl calls the GENAddBoard.pl script which just sits there, all white and splender. I could put a link on there back to the boards_general.pl but that would still be sloppy!
Thanks
DAL
|
You need to slow down and actually read the documentation that comes with modules, youseem to just want solutions without any knowledge or understanding of whats going on. You don't have to know everything, but knowing how to use the CGI.pm module is one of the basics of making web based cgi scripts. That the time to read the CGI documentation:
http://www.perldoc.com/perl5.8.0/lib/CGI.html
www.perldoc.com is your best resource for online Perl information and documentation
|

11-25-03, 03:57 AM
|
 |
Code Master
|
|
Join Date: Jun 2003
Location: North East England/UK
Posts: 874
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by Millennium
You need to slow down and actually read the documentation that comes with modules, youseem to just want solutions without any knowledge or understanding of whats going on. You don't have to know everything, but knowing how to use the CGI.pm module is one of the basics of making web based cgi scripts. That the time to read the CGI documentation:
http://www.perldoc.com/perl5.8.0/lib/CGI.html
www.perldoc.com is your best resource for online Perl information and documentation
|
I have read alot of perl. The problem is I havent used it for 3 months and my memory is bad. Also I get mixed up with all the other languages I know aswel so forgive me if I seem lending.
I will refresh my knowledge b4 asking but I did read about cgi perl mod trying to get this thing working . I did ask for a recommendation on a good book and I think it was YUPAPA suggested one, I havnt had a chance to get ahold of a copy as yet. Anyway I dont see why my current books dont cover all this - Maybe the O'reilly press isnt a good resource as everytime I lookup keywords there examples are either non-existant or very very brief.
I currently own (forgive my memory Im at work at the moment and cant remember the names exactly)
All O'rielly press - (I was recommended this press by a friend who said they were brilliant for Mysql I think he said..anyway he didnt know what they were like for perl)
----------------------------------
Programming perl 3rd edition
Begginers Perl
perl CGI
Per programming advanced
Perl reference
perl in a nutshell
----------------------------------
__________________
"once upon a midnight dreary, while i pron surfed, weak and weary, over many a strange and spurious site of 'hot xxx galore'. While i clicked my fav'rite bookmark, suddenly there came a warning, and my heart was filled with mourning, mourning for my dear amour," 'Tis not possible!", i muttered, "give me back my free hardcore!" quoth the server, 404."
|

11-25-03, 05:33 AM
|
 |
Wannabe Coder
|
|
Join Date: Nov 2003
Posts: 136
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by DAL
I have read alot of perl. The problem is I havent used it for 3 months and my memory is bad. Also I get mixed up with all the other languages I know aswel so forgive me if I seem lending.
I will refresh my knowledge b4 asking but I did read about cgi perl mod trying to get this thing working . I did ask for a recommendation on a good book and I think it was YUPAPA suggested one, I havnt had a chance to get ahold of a copy as yet. Anyway I dont see why my current books dont cover all this - Maybe the O'reilly press isnt a good resource as everytime I lookup keywords there examples are either non-existant or very very brief.
I currently own (forgive my memory Im at work at the moment and cant remember the names exactly)
All O'rielly press - (I was recommended this press by a friend who said they were brilliant for Mysql I think he said..anyway he didnt know what they were like for perl)
----------------------------------
Programming perl 3rd edition
Begginers Perl
perl CGI
Per programming advanced
Perl reference
perl in a nutshell
----------------------------------
|
Please forgive me if I sounded critical. My comments were in no way meant to make you feel like you can't or shouldn't ask any question or questions you wish to. They were offered in good spirit if not well stated.
The documentation of the CGI.pm file explains the two methods typically used with the module at the beginning of the doc.
http://www.perldoc.com/perl5.8.0/lib...GRAMMING-STYLE
Your books may not cover something as basic as that. Although I would think a beginner style book or the perl CGI book (which I have never read so I am just guessing) would cover the basics.
|

11-25-03, 06:19 AM
|
 |
Code Master
|
|
Join Date: Jun 2003
Location: North East England/UK
Posts: 874
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I wasnt getting back at you Millennium! 
I was just giving you the reason why I wasn't intelligent enough to work the use cgi; mod
Anyway It still hasnt worked and Ive tried it with a http: address as that link to perldoc.com told me that this was what I needed to do when directing to the same loaction instead of a remote location from the server.
now I got the message 302 Moved location: http://www.24sos.co.uk/Internal/boards_General.pl
Someone's told me that its possible to redirect through meta tags so Im off to check this out- Ill come back to the board to display hopefully the answer to the solution (if I find it) for furture ref for any one having this same problem.
Thanks
DAL
__________________
"once upon a midnight dreary, while i pron surfed, weak and weary, over many a strange and spurious site of 'hot xxx galore'. While i clicked my fav'rite bookmark, suddenly there came a warning, and my heart was filled with mourning, mourning for my dear amour," 'Tis not possible!", i muttered, "give me back my free hardcore!" quoth the server, 404."
|

11-25-03, 06:26 AM
|
 |
Code Master
|
|
Join Date: Jun 2003
Location: North East England/UK
Posts: 874
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
print <<"EOF";
<META http-equiv="refresh" content="0;URL=http://www.24sos.co.uk/Internal/boards_General.pl">;
EOF
There it is ! the solution to the problem! Meta Refresh
Change 0 to anything else for further delay of seconds ie;
print <<"EOF";
<META http-equiv="refresh" content="4;URL=http://www.24sos.co.uk/Internal/boards_General.pl">;
EOF
Would delay the redirection for 4 seconds.
Cool 
__________________
"once upon a midnight dreary, while i pron surfed, weak and weary, over many a strange and spurious site of 'hot xxx galore'. While i clicked my fav'rite bookmark, suddenly there came a warning, and my heart was filled with mourning, mourning for my dear amour," 'Tis not possible!", i muttered, "give me back my free hardcore!" quoth the server, 404."
|

11-29-03, 01:04 PM
|
|
New Member
|
|
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
print "Location: $whatever_url_you_want\r\n\r\n";
redirect is used by CGI.pm so you cannot call your own redirect
subroutine if you are using it. Just print to location as above...
Barry
http://www.veinotte.com
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|