Re: Hello world1
| From: | Ashley Sheridan | Date: | Sat, 31 Dec 2022 08:07:09 +0000 |
| Subject: | Re: Hello world1 | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-328109@lists.php.net to get a copy of this message | ||
On 31 December 2022 06:33:01 GMT, JEFFRY KILLEN <jekillen@prodigy.net> wrote:
>Hello;
>The most effective and direct way to do form input screening is with javascript. It can also
>play a sound an/ or just thow up some
>disturbing text style sheet styles to inform the user of unacceptible input.
>
>As far as PHP is concerned, it can do all the screening. But the user input does have to get to
>the server unscreened if you do not use javascript
>or html5 regex imbedded in the text input element to prescreen it. The downside of javascript
>has been that the user can turn it off in the browser
>or use a client that does not have javascript. Php also cannot play sounds in the browser (if
>you want to use sounds). It can serve sounds but javascript
>is needed to play them for the user.
>
>I have been doing web design and development for some time and have seen that well known
>browsers have all made it fairly difficult to turn javascript
>off if you do not have development sophistication and many sights use it extensively.
>Particularly commercial sights use it to fetch, load and display ad
>content.
>
>It also means that you have another programming language to get to know and be confortable with.
>The best and most comprehensive text I know of
>is OReilly publications Javascript: The Definitive Guide. The latest version is the 7th edition.
>But I would also get access to the 6th edition becuase
>there are significant differences in the language in the 7th edition and the 6th edition will
>give a better perspective on what the differences are.
>
>Something to be aware of: Javascript is NOT java. It is a scripted language that needs a
>javscript interpreter to run it. It has been developed from the
>start to be used in web browsers. But it can also be used in PDF (not well known, and Adobe
>implementation has its own quirks). Google has also
>developed a server side version of javascript: node.js. I have rudimentary experience with it
>and understand it to be fairly widely accepted and used.
>
>One thing to come to terms with regarding web development: NOTHING is really simple. So
>expecting simplicity will compromise effectiveness and
>efficiency.
>
>Best;
>Jeff K.
>
>> On Dec 30, 2022, at 9:39 PM, Deliberatus Freeman <deliberatus@hotmail.com> wrote:
>>
>> Hi. I'm a recent adopter of php, and I am coming to love it.
>>
>> I am building a website. I need to accept a form, and it is to accept ONLY letters and
>> numbers; just 1 char of anything else and it must bark like a rabid duck and abort the process.
>> whats the simple reliable way to do this?
>>
>> PS: I rent a slice off the end of the box, and cannot play around with configuring things.
>>
>>
>>
>> Salute!
>> -Kirk Bailey
>> It is an ill wind that blows no minds.
Instead of looking at JavaScript, you can do basic checking with HTML form validation: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern
However, you will 100% need server side validation in PHP. It doesn't matter if it's
difficult to circumvent what exists in the browser, you must always validate server side.