Home

   Home

   Download


Help

   FAQ

   Installation

   Message Board

   Importing Data File
   Into GoldMine
   Into Act


Other

   Testimonies

   Custom Programming

   PHP Version


Other Favorites

   Hire a clean comedian

   Bible Search Engine

   Bible in a Year

   Parallel Bible

   The Richer Life










 





[ Message Board Home ]    [ Post Reply ]    [ Log In ]    [ Sign Up ]



  Subject: Calculating fields on order form
  Posted: 07/20/2004 at 1:15:04 pm
  By: mlbailey

Hey,
I'm trying to perform a calculation where 6 fields (in a column) will total, and the total get submitted to me. The fields are named 'item1_total' 'item2_total' 'item3_total' and so on. I think I understand the variables...I'm just not sure exactly which page I need to type them into. For example, I'll be needing to add
$order_subtotal=$formdata{'item1_total'}+$formdata{'item2_total'}+$formdata{'item3_total'}+$formdata{'item4_total'}+$formdata{'item5_total'}+$formdata{'item6_total'};
Would this need to be typed into the bizmail.cgi form? Or am I way off? Will this type of function even work in an email form?

Thanks for any help! :-)
Michelle Bailey



  Subject: Re: Calculating fields on order form
  Posted: 07/20/2004 at 2:11:35 pm
  By: Seth Knorr

Yes, you can run that calculation, however you need to stick that code below:

sub main {

IN bizmail.cgi

Of course from there you would have to put that field in the other parts of the script where you want it to work, or be emailed to you.

Seth



  Subject: Re: Calculating fields on order form
  Posted: 07/20/2004 at 2:19:59 pm
  By: mlbailey

Thank you for the quick reply! What do you mean exactly about putting that field in other parts of the script where I want it to work? I'm sorry for the dumb question...it's just that I thought I only had to type it in once to make it work. Obvious newbie here, lol.

Michelle Bailey



  Subject: Re: Calculating fields on order form
  Posted: 07/20/2004 at 4:04:34 pm
  By: mlbailey

If it helps any to see what I've came up with so far...my html form is here: http://www.outwestgiftshop.com/resellers/resellerorder.html and it's a password protected area, but I'll send you an email in a second with a temp login, just in case you'd want to check it out.

Michelle



  Subject: Re: Calculating fields on order form
  Posted: 07/22/2004 at 5:28:04 am
  By: mlbailey

Seth, got your email about my bizmail.cgi not being found due to an Internal Server error. I noticed the same thing every time I tried to test the form. I don't understand that because I followed the instructions very carefully and double & triple checked every line. The path that the form sends you to for the bizmail.cgi is: http://www.outwestgiftshop.com/cgi-bin/bizmail.cgi ... which is exactly where it is located, so I have no clue why it won't come up. I'm currently awaiting a reply from my webhosting provider, to see if perhaps there's another problem I'm not aware of. I'd hate to not be able to use this form after looking forward to it so much, so I'm really trying to get it going. I'll post back with an update, in case it's a common problem that occurs, and others could benefit from the answer.

Thanks for trying to help,

Michelle Bailey



  Subject: Re: Calculating fields on order form
  Posted: 07/22/2004 at 5:49:35 am
  By: Seth Knorr

If you get an error log from your hosting provider, that should be able to pin point the problem.

Seth



  Subject: Re: Calculating fields on order form
  Posted: 07/22/2004 at 9:48:11 am
  By: mlbailey

Ok, my host just explained the error that showed up when the script was called. Here goes:

String found where operator expected at bizmail.cgi line 281, near "$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(""
(Might be a runaway multi-line "" string starting on line 264)
(Missing semicolon on previous line?)
String found where operator expected at bizmail.cgi line 287, near "## $value =~ s|\&|\&\;|g; # convert all '&' to ""
(Might be a runaway multi-line "" string starting on line 281)
(Missing semicolon on previous line?)
Bareword found where operator expected at bizmail.cgi line 296, near "$value2 =~ s/(\")+/"/g; #V1.5 Bug Fix - Converts " to"
(Might be a runaway multi-line "" string starting on line 290)
(Missing operator before to?)
Backticks found where operator expected at bizmail.cgi line 296, near "to ""
(Do you need to predeclare to?)
Bareword found where operator expected at bizmail.cgi line 296, near "" in"
(Missing operator before in?)
syntax error at bizmail.cgi line 281, near "$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(""
syntax error at bizmail.cgi line 287, near "## $value =~ s|\&|\&\;|g; # convert all '&' to ""
syntax error at bizmail.cgi line 319, near "}"
Execution of bizmail.cgi aborted due to compilation errors.
[Thu Jul 22 11:41:14 2004] [error] [client 24.14.255.43] Premature end of script headers: /home/allabout/public_html/outwestgiftshop/reseller/cgi-bin/bizmail.cgi

She (my host) verified that my filepaths are correct, and the CHMOD permissions are correct. What do I need to do next? I think I need to find my bottle of excedrin, lol.

Thanks,

Michelle Bailey



  Subject: Re: Calculating fields on order form
  Posted: 07/23/2004 at 3:39:41 am
  By: mlbailey

Ok, I'm trying to go down the list of errors one at a time and see what's wrong. Since I don't truly understand scripting however, it's more than a challenge to find code errors. Here's a copy of my lines 260-266 from bizmail.cgi. The error in the above post refers to line 264. Does this look correct to you or do I need to change something?

260 if($ENV{'REQUEST_METHOD'} eq "GET") {
261 require 'error.cgi';
262 &nopost;
263 }else{
264 e"t_form_data;
265 &main;
266 }

I just don't want to guess and mess things up even more than they already are. I'd like to be able to use this form, but it's just not looking possible.

Thanks for everything,

Michelle Bailey



  Subject: Re: Calculating fields on order form
  Posted: 07/23/2004 at 9:56:40 am
  By: Seth Knorr

Ok, try this, Try re-downloading the script and then just re-configure bizmail.cgi.

I changed some things in the script that may work better on your server.

Seth



Reply To This Topic

Subject
Message  
Username
Password
Due to unrelated post's, you must have an
account to post a message. To Sign Up click here.




Copyright 2000-2010 Seth M. Knorr,
BizMailForm.com Forms Processor, All Rights Reserved