Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
PHP module H110
HTML Web Page Data Handling
Exercises, examples and other material relating to training module H110. This topic is presented on public courses Learning to program in PHP, PHP Programming, Beginning PHP - weekend course / hobby / club / leisure users

There's a great deal of information available to you in your PHP program, ranging from the contents of forms completed by the user through the URL from which your page was called and his IP address. In this module, we look at using these variables and we highlight some of the more useful ones.

Related technical and longer articles
Example - PHP form, Image upload. Store in MySQL database. Retrieve.

Articles and tips on this subjectupdated
789Hot answers in PHP
We've got a lot - a LOT of demonstrations and source code on our site. Here are a few of the most popular ones all brought together in a single listing. Enjoy ... Searching - how similar are two words? - try about source Does a particular URL exist? - try source Uploading an image to a database ...
2013-01-02
 
3926Filtering PHP form inputs - three ways, but which should you use?
There's a vital need to validate user inputs in PHP - to make sure that users have put something sensible into the boxes on your forms. And there are multiple ways of doing this: a) You can check the incoming strings against regular expressions. In the old days you may have used the ereg functions, ...
2012-11-24
 
3036Sending out an email containing HTML from within a PHP page
The mail function in PHP allows you to send a plain text email in a single function call from within your script but please read the cautions at the end of this post before you do so!. How do you send out something in HTML format, though? The mail function takes an additional (fourth) parameter of extra ...
2010-11-07
 
2107How to tweet automatically from a blog
How to Tweet from a Blog I'm using the MoveableType Blog software for "The Horses's Mouth" ... and I want to tweet my subject line for each new post. But I'm lazy, so I have set it up to happen automatically. 1. I post my blog entry in the usual way 2. I have added the following script at /home/wellho/tweeter/blogtweet ...
2010-06-26
 
2046Finding variations on a surname
Here's a little demonstration of how you can use PHP to look for a 'similar word' - in this case, from a file of surnames. Have I done all the hard work? No - I crawled for some surnames to add to my demonstration file, and I used PHP's built in functions to do the hard work! Run Demonstration ...
2009-08-31
 
1136Buffering output - why it is done and issues raised in Tcl, Perl, Python and PHP
When you go to board a plane at Heathrow, do the ground staff admit the passengers one at a time, ensuring that each is seated before the next boards, and sealing and re-opening the main doors between each? What a stupid and inefficient system that would be!! The same thing applies when you're programming ...
2009-08-31
 
2135What features does this visitors browser support? (PHP)
Does this visitor's web site support CSS? Is this visitor a robot? Should I send out frames? There are the sorts of questions that you may want to ask in a PHP page .... and PHP supports the get_browser function which can tell you ... or which can tell, most of the time, once you have it configured. The ...
2009-04-28
 
2025Injection Attack if register_globals in on - PHP
You may have heard me talk about "injection attacks" and that having register_globals set to on in PHP makes you liable to be caught by them. Well - that's a little bit dramatic as you can write perfectly safe PHP scripts with the setting on if you're careful. Here's an example of a script which is ...
2009-02-04
 
1001.pdf files - upload via PHP, store in MySQL, retrieve
There's a common requirement to manage binary data - upload from a user, store, bring back in a web page. And where you have a substantial number of pieces of data - a lot of .pdf documents, .jpg or .gif images, or even Word documents, you'll wish to store them in a database with the potential for keyword ...
2008-12-21
 
1831Text formating for HTML, with PHP
Do you want "normal" text that's formatted in a fixed width font, with white spaces and tabs and new line characters to have a similar appearance on a browser? The default answer of you generate a page of HTML is "tough luck", as text defaults to a variable width font, lines are squished together with ...
2008-10-12
 
1169Emailing as HTML (Web Page) - PHP example
If you want to send an email as HTML, you can do so by adding a content-type header. <?php   $content = <<< EMC <h1>Hello World</h1>an HTML email Shwoing how the content can be sent as a web page. EMC;   $extras = "From: Graham Ellis \n"; $extras .= "Reply-to: Graham Ellis ...
2007-04-30
 
1053Sorting people by name in PHP
Our petition for a reasonable train service is going great guns - over 1000 signed up in just over a week, amongst them significant players such as MPs, MEPs .... but, my goodness, the list as presented by the web site is hard to look through. So I've grabbed a copy of the list and sorted it - see here. Sorting ...
2007-01-26
 
896PHP - good coding practise and sticky radio buttons
With PHP, it's very easy to knock together a page with a couple of radio buttons and a small application just be taking the "bull at a gate" approach - but if you develop code like this, and without planning, you end up with a very long application that's hard to follow and maintain and - unless you've ...
2006-10-19
 
589Robust PHP user inputs
If you write a script in PHP, it's one thing handing benign user inputs, and quite another "bullet proofing" your script against awkward characters (of the "less than" and "double quote" type) entered into form fields where they can lead to problems of the SQL error, echo display corruption and injection ...
2006-06-11
 
50Current cost in your local currency
If you're selling internationally on line, it's a nice gesture to your customers to tell them roughly what things cost in their local currency, before you charge their credit card in pounds, dollars, euros, or whatever currency you use yourself. Tables of current exchange rates are easy enough to find, ...
2006-06-05
 
Examples from our training material
agnew.php   How to do it - sending header first
agone.php   How NOT to do it - sending header too late
alang.php   What langauge does the visitor prefer?
apull.php   Selection of database records via a pulldown menu
feedlet.php   Bare Bones demo of password protection
getpost.php   Using a PHP script to POST to another server
mcheck.php   generate and select from radio boxes
meldrew.inc   Helper function - set up an enquiry box
melksham.php   Images at random - pictures of Melksham
myenv.php   The PHP environment - use of variables available to you
one_pizza.php   Validating a Pizza order in one page.
pdfget.php   download a .pdf file from a MySQL database
pdfstore.php   store a .pdf that's uploaded into a MySQL database
pdfup.php   form to upload a .pdf to a PHP script
selfinfo.php   Information available from PHP
sticker.php   Sticky form demo ...
urlex.html   Does a URL exist?
veryniceform.php   Form completion with sticky fields and generalised code
victor.php   Putting our conditional example on the web
Pictures
PHP page inputs - form, cookies, request, environment
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
Inputs available from your page and environment.
phpinfo().
Other form elements.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.


You can Add a comment or ranking to this page

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

PAGE: http://www.wellho.net/resources/H110.html • PAGE BUILT: Wed Mar 6 10:39:20 2013 • BUILD SYSTEM: wizard