Jump to content

mdsimmons

Members
  • Posts

    15
  • Joined

  • Last visited

About mdsimmons

  • Birthday 08/18/1937

Contact Methods

  • Website URL
    http://www.cei.net/~simmonsd
  • ICQ
    0

Profile Information

  • Location
    Arkansas
  • Interests
    HTML, PHP, Javascript, CSS, Ultralight aircraft

mdsimmons's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Here's a copy of my tourRegistration.txt... I made no changes of any kind to this text, before or after it stopped working. Also, my client has not moved to Mac, but does have a mix of Win XP and Win 7 machines. Doug tourRegistration.txt
  2. A form installed on our web site has been working for three weeks or so, but suddenly stopped workingunder the circumstance described below. The form has several <input> fields, and only one <textarea>.The problem lies with the <textarea> field: <form action-="http://.../cgi-bin/cgiemail/registration.txt" method="post" /><input name="success" type="hidden" value="http://.../thanks.htm"><textarea name="passengers" cols="20 rows="10" />...</textarea> When data is entered in the passenger field as: Alpha <enter>Beta <enter>Charlie <enter>Delta <enter> <submit> the form fails and this error message appears - [i][b][font=times new roman,times,serif]"No email was sent due to an error.[/font][/b][/i][i][b]Invalid character detected in headers.[/b][/i][i][b]Possible spam exploit attempt."[/b][/i] When data is entered on one line as: Alpha Beta Charlie Delta <submit> the form works and an email is sent via cgiemail script. All other fields are <input type="text" name="[various]" size="[various]"/>and all work as defined. When I modify the form action to ".../cgi-bin/[b]cgiecho[/b]/registration.txt..." andenter data in both formats, I get a success response page (thanks.htm) but since nothingwas transmitted, I have no way of knowing if the <textarea> field behaved as intended. My host tech support said he could not see any mis-written code, but his tests indicatedthere was indeed some sort of "invalid character in the headers," and suggested I use their$65/hr HTML division to research the problem. He doesn't think the "Possible spam exploitattempt" suggestion is a valid one. I explained that the form was working properly until lastweek and I had not made any changes... specifically the <textarea> field that would affectthe cgi scripting - I don't have access to the scripts on their servers. Can anyone help with this problem? Doug
  3. mdsimmons

    PHP Syntax

    There's some sort of glitch in the php code here... when I loaded this page, this code appears on the page after the checkboxes - ' ; } ?> and the form doesn't work. The "Total: " statement appears, but nothing after it. Have I copied something wrong? I noticed that there was no closing </form> tag and I added that after the <div> tags, but it didn't make any difference.Doug
  4. mdsimmons

    PHP Syntax

    [chuckle] Well, I've gotta say that's an elegant solution! I would never have thought of a .getElementByID to get my $tot field included in the form.I've also gotta say I've never seen such prompt and courteous responses to problems posted on a forum board. You guys have all been very kind with my newbie fumblings, and I appreciate the help.I'll adapt this script to my form, and when I get it working properly, I'll be back to show the finished result.Doug
  5. mdsimmons

    PHP Syntax

    That's what I thought, and I've been trying various code but I can't seem to get it working... I'm afraid confusion is getting the upper hand while I'm learning this new script. Doug
  6. mdsimmons

    PHP Syntax

    These are all viable options, and I'll munch through them and see if I can figure out which way to go... I had not planned to utilize a database, though. This is a dynamic form, where customers can submit a schedule for one or more participants in a one-time series of events... annual reunions, for instance (the form will be modified for successive reunion events), and this suggests that the simple email route might be the easiest, with a vertical list of names and checked events. I've already accomplished that - it's in place on my client's site now - but I could not figure out how to accumulate the "$total1" on the html form page and combine it with the email. The alternative is to simply add up the events manually. Although I like the php structure, maybe Javascript would present an easier solution?Doug
  7. mdsimmons

    PHP Syntax

    If you'd like to see this page in its present form, go to my page at http://home.centurytel.net/mdsimmons/phpscripts/22_form.phpDoug
  8. mdsimmons

    PHP Syntax

    You've raised an interesting decision point...I've created simple email forms which present a vertical list of data in the body of the message, and these have served well in the past, but now I'm interested in presenting this form in HTML format so that my client can print the form as completed by his customer. I realize I'll have to include "Contact Email:" ($sender), "To:" (&recipient), "Subject:" ($subject), and perhaps other fields as well before I finish the form.This is not a shopping cart page, only a schedule of events in which a potential customer wants to participate, with a $total1 of all fees charged for each event at the bottom of the table (fees are hard-coded into the headers, and included in the script). There are 18 checkboxes in the 4x6 table - the first column is a textbox for the name of each of 6 participants which may select one or more of three events (checkboxes), all on one row, with a single total at the bottom. Scott100 suggested an excellent way to combine the php/html form, which I have expanded to include all my fields, and it works perfectly. Now, if I can just upload that to my client's web site in a form that can be emailed back to him by his customers. As written, it first presents the html form for checking the boxes, then on 'Submit' it simply displays $total1 on a new screen with no further action, which is basically all I asked for in the beginning.It may well be that I can't see the forest for the trees! Doug
  9. mdsimmons

    PHP Syntax

    Not so much a logic question, as a how-to:I need to email this completed form, including $total1, to a recipient in the same format as the form() function. Is there an easy way to do this without reproducing the whole thing? My finished form will have 18 checkboxes in 4 columns (including a name textbox) of 6 rows. I'm not far enough into PHP to deal with arrays, yet. Doug
  10. mdsimmons

    PHP Syntax

    OK... I got it working with your code I've missed some of the logic, I guess, so I'll read it through, again. Thanks for your responses... and patience.Doug
  11. mdsimmons

    PHP Syntax

    I agree with the logic, but I'm trying to display a 'running total,' i.e., if only the first box is checked, $total1 should display 35.00; if box1 and box2 are checked, $total1 would be 75.00; if all three boxes are checked, $total1 should show 110.00... or, any combination of checked boxes should show the proper cumulative total. At the moment, It prints 0 in any case.My finished form will have more selections, but I'm keeping it simple here to illustrate my problem.Doug> 1. set $total1 = 0> 2. calculate the prices> 3. check to see if $total1 is equal to 0> 4. if it is, do this: $total1 = '0'> That way, the zero will actually print, so if no purchases are made it will still> say 'Your total is: 0' instead of nothing
  12. mdsimmons

    PHP Syntax

    I tried your suggestion... still no result: Here's my code - <?php$box1a = $_POST['box1a'];$box1b = $_POST['box1b'];$box1c = $_POST['box1c'];$total1 = 0;if($box1a=="y"){$total1+=35.00;}if($box1b=="y"){$total1+=40.00;}if($box1c=="y"){$total1 +=35.00;}echo "Your total is: $total1";?> Doug
  13. mdsimmons

    PHP Syntax

    I rewrote my code as you suggested, and it seems to work, but now I can't get the $total1 value to display after manipulation.I tried:$total1 = $_POST['total1']; . . .. . .echo "Your total is: " . "$total1";and a couple of variations of that, but nothing displays.I also included <input type="text" name="total1" value="0.00">in the html form.Doug
  14. mdsimmons

    PHP Syntax

    Well, I was close, but no cigar! I had the beginning code right, but missed the if statements; used the wrong quotes; and the wrong accumulator (+=)I assume that if any box is not checked, that particular element { } won't fire, but will fall through to the next?I appreciate the quick response to my problem. Doug
  15. mdsimmons

    PHP Syntax

    I'm a newbie with PHP code, but I've successfully built simple email forms... however, I can't seem to get the syntax right for capturing boolean results -I have a form with three checkboxes and a submit button. Depending upon which boxes are checked, I want to accumulate total values for each... for example:if $box1 is checked (true), add 35.00 to $total1,if $box2 is checked (true), add 40.00 to $total1,if $box3 is checked (true), add 45.00 to $total1,Display $total1.It should be simple, but I've missed something.Doug
×
×
  • Create New...