Program: Contacts
Use either ssh console commands or phpMyAdmin to create a database named:
yourUserName_contacts
Create a table named contacts within the DB that holds three fields as follows:
id (int, not null, primary key, auto increment)
first_name (varchar)
last_name (varchar)
email (varchar)
addContact page:
Now create a page that allows the user to create a new record in the database by entering a new first, last name and an email address. (remember security)
have this page go to the showContacts page when the record has been created.
showContacts page:
Create another page that displays all the records in a table format.
Add a link at the top of this page called 'add new record' to go to the addContact page.
Here is one structure to make this work (this is not php code, but an English pseudo code:
showContacts.php page:
========
html: link to addContact.php
php:
if submit from addContacts page then
add new record
end if
query all records and build a table to show results
========
addContact.html
========
html:
form with three text input fields
action is showContacts.php
========
When you have your pages working, then submit a link to the showContacts page here so I can grade you.
Please email me if anything above is unclear.
yourUserName_contacts
Create a table named contacts within the DB that holds three fields as follows:
id (int, not null, primary key, auto increment)
first_name (varchar)
last_name (varchar)
email (varchar)
addContact page:
Now create a page that allows the user to create a new record in the database by entering a new first, last name and an email address. (remember security)
have this page go to the showContacts page when the record has been created.
showContacts page:
Create another page that displays all the records in a table format.
Add a link at the top of this page called 'add new record' to go to the addContact page.
Here is one structure to make this work (this is not php code, but an English pseudo code:
showContacts.php page:
========
html: link to addContact.php
php:
if submit from addContacts page then
add new record
end if
query all records and build a table to show results
========
addContact.html
========
html:
form with three text input fields
action is showContacts.php
========
When you have your pages working, then submit a link to the showContacts page here so I can grade you.
Please email me if anything above is unclear.