Form Validation: Using JavaScript
Not enough permissions to view this content.
Read MoreBuilding a Database: Other Attributes
When you are creating a table in MySQL, not only do you specify the field type and length but other elements as well. Let’s review a few of the important ones: AUTO_INCREMENT This one is huge and you will use it a lot…like pretty much every time you create a database table! You use this…
Read MoreHomework: Data Normalization
The Problem Normalization Solves Let’s say we want to have a simple student directory that includes this data: Student First Name Student Last Name Current Class Class Date Class Time Date Class Begines Date Class Ends MaxNumberStudents Past Classes Home Phone Number Mobile Phone Number Email Address Let’s assume a few things: Students can be…
Read MoreBuilding a Database: Field Types
MySQL supports three basic types of data: String, Numbers and Date/Time. Let’s learn about each one and the various options. String Data Types These are used to store characters that are treated as words or strings. You can store any letter, any number and other characters like dashes and asterisks and more. CHAR Expand CHAR…
Read MoreDoing Something With The Form
In the last topic, we learned how to link a form in an HTML document to a PHP script and how to use that script to access the data that the user had typed into the form. However, once we had the data – all we did was echo the results of the form fields…
Read MoreHomework: More Strings
Create a new file called strings.php – then… Create the basic HTML structure. In the <body> section, create a <h1> tag with a header that says “Strings!!!”. Store these three strings in variables called $string1, $string2, and $string3. String 1: “Hey it’s October which means Halloween is about to be upon us. What is your…
Read MoreMore Tricks on Inserting Data
Inserting or Updating https://stackoverflow.com/questions/23771500/insert-or-update-on-duplicate-with-two-keys Inserting a Date Using Average and Sum again
Read MoreThe Echo Statement
Basics The echo statement is used to echo or print out text to the screen. It’s one of the main ways that you will communication with your user. echo is used to print text to the screen. echo can display HTML Markup. <?php echo “<h1>PHP is as useful as toothpaste!</h1>”; echo “That was said by<br>”;…
Read MoreU: Updating Data
Updating a record – or changing the the information that is stored – is very similar to creating a new record. The only twist is that you have to populate the form with the data first. Let’s look at how to do this with editing a member’s information in the Members database structure shown below.…
Read MoreD: Deleting Data
What if we want to get rid of some information? Luckily this is the easiest to do…but the most dangerous!! If you choose to delete a record – make sure you delete any records that depend on the record. For example, if you deleted a member from the Members table – then you would need…
Read More