Viewers: in countries Watching now:
Join author David Gassner as he describes how to add dynamic data to a PHP-enabled web site in Adobe Dreamweaver. This intermediate course shows how to plan and create a MySQL database, define a PHP-enabled site in Dreamweaver, connect the site to the database, and manage and present dynamic data. David also explores Dreamweaver features such as PHP custom class introspection and site-specific code hinting as well as the differences between the CS5 and CS6 versions of the software.
This course was updated on 6/12/2012.
After preparing your custom forms for data management, the next step is to make sure your database structure matches the requirements of your forms. I'm going to go to phpMyAdmin for this step. If you're working with WampServer, open the Administration menu from the system tray icon and choose phpMyAdmin. If you're working with MAMP on Mac OS X, go to the MAMP homepage and click phpMyAdmin from there. Then go to the explorecalifornia database and from there, to the explorers table.
Then click Structure, at the top. This screen shows you everything you need to know about the structure of your database. For variable character fields, it'll show you how wide the fields are. It'll show you what data types are being used, for instance, the dob column is a date field, and most importantly for this exercise, it will show you which columns you can leave null, or empty, and which columns require values. It's very common for there to be mismatches between the database structure and the requirements of a data entry form.
I'm going to go back to a form that I've shown already, explorerinsert.php in the explorers folder. This form contains only a certain number of controls for the various columns. There are controls for first name, last name, date of birth or dob, e-mail, address, city, and state. But there aren't controls for any of the others, and this can cause a problem in a database table that requires values. For example, these three columns, username, password, and tours, have their null property set to No, meaning that you can't leave them blank.
Similarly, the city column is set to No, and the e-mail column is set to No. If you don't apply validation in the form, you need to match up the requirements of your data entry form to the requirements of your database. So I'll show you how to make this adjustment in the three columns that can be affected by my particular data entry form. I'll go to the username column, and I'll click the Pencil icon to change it, and I'll select the Null option, meaning that that column can be set to Null, and I'll save it, and I'll repeat that process, first for the password, and then for tours.
Just to be on the safe side, you can go through and do exactly the same thing for the e-mail address and for the city. I'm going to leave the firstname and lastname set to No, meaning they can't be left null. And the one column that you must leave set to No is the explorerId. A primary key column must contain a value; there are no exceptions to this rule. So once you've set your database structure and matched it up to the requirements of your data entry form, you're ready to apply a server behavior to the data entry form to insert or update data.
Find answers to the most frequently asked questions about Dreamweaver with PHP and MySQL .
Here are the FAQs that matched your search "" :
<?php include('../ZendFramework/library/Zend/Date.php'); ?
<?php echo $_SERVER['DOCUMENT_ROOT']; ?
You can then programmatically modify the include_path variable at runtime with the set_include_path() function. For example, if your physical root folder is /home/myroot, the code might look like this:
<?phpset_include_path('.' . PATH_SEPARATOR .'/home/myroot/ZendFramework/library/Zend');include('Date.php');?
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.