Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
hivalidation on submit

Posted by San (San), 11 August 2004
hi,
i am new to php, need some help from experts. i am using a form tag in php file1.php. On click of submit button i need to do some validations only then go to another page. if the conditions not satisfied i have to display the same file1.php file again.
an early reply will be appreciatd very much.
thans
San

Posted by admin (Graham Ellis), 11 August 2004
If you have a look at  http://www.wellho.net/resources/ex.php4?item=h115/sc6.php you'll see a complete example of a PHP script that goes through a series of forms, validates data entered on each, then carries on to the next form or reprompts as necessary.

There are quite a number of PHP subject that you need to know about to learn / write something like this ... and reading your initial question it looks like you're asking me to explain them all here.  I would love to, but it would be very long - like writing a complete training course here.

Please have a look through the example that I've linked to, and ask any specific questions you like.  If you write some of your own code and are having trouble with some particular point - again, you've very welcome to ask.   If you want to have me teach you everything you need to know about PHP I can do that too - see http://www.wellho.net/course/phfull.html.

Posted by San (San), 11 August 2004
hi,
thans for such a quick reply. but the link u sent me does not work.
i know i am very new to php but right now can not afford to spend time in learning the whole thing though wud love to do so.
so kindly consider.
San

Posted by admin (Graham Ellis), 11 August 2004
on 08/11/04 at 20:58:42, San wrote:
hi,
thans for such a quick reply. but the link u sent me does not work.
i know i am very new to php but right now can not afford to spend time in learning the whole thing though wud love to do so.
so kindly consider.
San


My error ... I used the local name for our server.  Link corrected.

Beware - there are some things that you have to learn how to do before you use them in reallity.   Flying an aeroplane is one of them and programming is another. Please take some time to learn at least a little, and if you don't have time to learn, get someone else to write the program  

Posted by San (San), 11 August 2004
hi,
thanks again ... but the link u sent u too complicated to understand for a beginner   .You said it right , i need to learn a lot.
But i think maybe my problem is much smaller than i made it sound. i have written a php prog file1.php , in which i have a few check boxes and a submit button. i need to chk that some 'x' no of chk boxes are checked then proceed to another page. If not ask the user to do so than click button.
can i call a  php function on 'OnClick' of a button which will validate or use javascript functions ?
Thanks again
San


Posted by admin (Graham Ellis), 11 August 2004
I fear I see a plane being driven out to the end of the runway for takeoff ... and the guy in the cockpit hasn't flown before ... doesn't quite know what the controls do.   Sorry if I'm being a bit blunt, but I'm trying to save both of us from a long and frustrating exchange.  And I do respect you for trying.

The example I linked to is the structure you need; it's a framework into which you can bolt your own forms easily.  I feel that the depth / type of question that you are asking needs far more explaining than I can do in a post here, where I'm limited in time and post size.  I need a whiteboard / examples / to show you some fundamental things before you start writing code.  I do understand that you're probably a long way away and that's not possible, so get hold of a good book or a local trainer.

Would you like links to some books that might be suitable?

Posted by San (San), 11 August 2004
thanks shall try....
sure let me know the books which can help me out here...

Posted by admin (Graham Ellis), 12 August 2004
Here are three I might suggest for a complete newcomer to PHP looking to put together forms with "sticky boxes". I don't think any of the examples in these three books will go as far as your complete application, but they'll point you in the right direction and help get you to the stage you can understand the other books and / or our examples.

http://www.wellho.net/book/0-321-24565-2.html
http://www.wellho.net/book/0-7645-3561-7.html
http://www.wellho.net/book/1-931841-87-X.html

Further PHP books ... I have the following on the shelves here:

http://www.wellho.net/resources/phpbooks.html



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2023: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho