The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

2 Pages V < 1 2  
Reply to this topicStart new topic
> HTML and Perl CGI, HTML and Perl CGI
citabriabob
post Nov 2 2020, 02:01 PM
Post #21


Newbie
*

Group: Members
Posts: 11
Joined: 27-July 20
Member No.: 27,457



The time-consuming part should be to understand where in the script to add it, otherwise it's trivial. I think it's around line 400.

An simpler alternative might be to use an INPUT TYPE=RANGE or (more compact) INPUT TYPE=NUMBER form field instead of an ordinary text field in the HTML code. That way you can limit the max value submitted by normal users. However it does not prevent bots, malware or malicious users from submitting bogus form data. See also
https://www.w3schools.com/tags/att_input_type_range.asp and
https://www.w3schools.com/tags/att_input_type_number.asp I'll try that.


But I'm not sure what you meant with this reply from July 29th:

[quote]Those items were NOT ordered; they appeared totally out of the blue.[/quote]
Did you mean that:

1. The customer did place an order, but extra items in the order appeared out of the blue? Yes, this is the case. All known members. Since we handle the orders manually, Spam is easy to delete.

2. Or did the entire order including the CC number appears out of the blue?
[/quote]
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 2 2020, 05:16 PM
Post #22


.
********

Group: WDG Moderators
Posts: 9,628
Joined: 10-August 06
Member No.: 7



QUOTE(citabriabob @ Nov 2 2020, 08:01 PM) *

The time-consuming part should be to understand where in the script to add it, otherwise it's trivial. I think it's around line 400.

I was thinking more like, sometimes scripts refer to other parts elsewhere in the script. It still think it should be a minor job for a Perl programmer though.

QUOTE
An simpler alternative might be to use an INPUT TYPE=RANGE or (more compact) INPUT TYPE=NUMBER form field instead of an ordinary text field in the HTML code. That way you can limit the max value submitted by normal users. However it does not prevent bots, malware or malicious users from submitting bogus form data. See also
https://www.w3schools.com/tags/att_input_type_range.asp and
https://www.w3schools.com/tags/att_input_type_number.asp I'll try that.

Can't say if it works with your Perl script, since I don't know how it fetches the form field data.

QUOTE
1. The customer did place an order, but extra items in the order appeared out of the blue? Yes, this is the case. All known members. Since we handle the orders manually, Spam is easy to delete.

Ah yes, now I found it in an earlier post.

Maybe the user's browser fills in form fields with Autocomplete after all? You do use the AUTOCOMPLETE attribute in your form fields, but older browsers may not support it. Then again, shouldn't the users spot the extra items (and the price!) on the Confirmation page? If it doesn't show up on the confirmation page, I'd suspect either an error in the Perl script or very inattentive customers. unsure.gif

(Correction: when I saw the validator error I first thought AUTOCOMPLETE was old and no longer supported, but that's not the case. The reason it's flagged as an error is because it's HTML5, and the page uses an HTML4 Doctype. Browsers shouldn't care about the Doctype version in this case, though. I've edited my incorrect post.)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
citabriabob
post Feb 17 2021, 03:51 PM
Post #23


Newbie
*

Group: Members
Posts: 11
Joined: 27-July 20
Member No.: 27,457



Found the culprit! After reviewing the data and finding an uninvited line item of quantity 03, seems as though the Chrome Autofill inserts two-digits at a time. Since we seldom get orders for > 9, we eliminated all entries over qty Length of 1. in the script. Done.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

2 Pages V < 1 2
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th March 2024 - 11:51 PM