Step 1:
SETTING UP THE DATABASE IN MAMP: Start MAMP and click the phpMyAdmin link at the top.
Step 2:
Create a new database by clicking on the Home Icon and filling in the Create New Database field.
Step 3:
Make sure your on the Structure tab.
Step 4:
Give it a name (Ex. users).
Step 5:
Put in the number of fields +1 for userID (Ex. 10 fields, fill in 11 fields).
Step 6:
Fill in the tables that you would like to use for your database. Start with userID for the first field and make this auto_increment and select the Primary Key radio button. Also set its Length to 8 and Type = MediumInt.
Step 7:
Fill in your remaining fields (Ex. username, password, firstname, lastname, phone, email, address, city, state, zipPostal). Set all these to Type = VarChar and Length = 255. The length can be as long or short as you like.
Step 8:
Press Save.
Step 9:
The next screen will verify your results with the SQL query.
Step 10:
CREATING RECORDS IN YOUR DATABASE:
Step 11:
Click the Insert tab and fill out all values except the userID value field. Press Go when finished. (By not filling out userID value, it will automatically number them).
Step 12:
CREATE YOUR .PHP USER QUERY PAGE WITH CSS.
Step 13:
Create a new .php file and save it. You might title it User Table Queries.
Step 14:
Format a div that contains all the field titles. The div can be given a class of .userprofile.
Step 15:
User CSS to style your output in that div.This is the way you'll be receiving the records. (Examples look at L07_users.php and the other L07.php files).
---->
Make a mySQL connection by double clicking on the Databases tab, then fill in the conn_lessons, localhost:8888, root, root, lessons.
Step 16:
CREATING NEW RECORD SET.
Step 17:
With your .php User Table Queries document open in Dreamweaver, double click the Bindings tab at the right.
Step 18:
Click on the plus sign to create new recordset query.
Step 19:
For name type in rs_users.
Step 20:
For Table select users, and conn = conn_lessons.
Step 21:
You can fill out more such as filtering or sorting by lastname descending.
Step 22:
Drag and drop bindings into appropriate text areas. (Ex. double click lastname to select it in .php, then drag lastname binding and drop on what you selected.
Step 23:
LOOP THE REST OF THE ENTRIES BY REPEAT REGION.
Step 24:
Select the whole div, and double click to open the Server Behaviour Tab.
Step 25:
Click the plus sign and select Repeat Region.
Step 26:
Select the recordset you created previously. Then check All Records and hit OK. (View in browser and it will show all the records you have).
Step 26:
For the email field, double click to select it and drag the email binding onto it. Also set it up as a link. # in link field in Dreamweaver. You must manually add the mailto: in the href=" " area of the tag. Review the photo for exactness.
Step 27:
In the Tron Example, you select the Tr in the table because thats what you want to loop. Then double click on Server Behaviours and select Repeat Region.