The project task for Week 11 was to begin working on a task to incorporate AJAX with PHP and MySQL. I am working on an Admin Logon screen. From the home page, the user can click on the Admin Logon link at the bottom of the page and is navigated to a log on screen. Users were already entered into a new table called ‘User_Admin’. If the password is incorrect, a PASSWORD INCORRECT message appears. If the user signs in successfully, their admin user information appears (name, address, etc) from using a PHP file. I also added some admin function links here as well, such as viewing the customer table as well as the ability to create or delete the customer table – only functions that an Admin should have. The direct link is below:
http://webdev.ramapo.edu/~cdaleo/FinalProject/TEB_Master/Admin_Logon/display.html
You can try this out by enter test for the Username and test for the password.
Sunday, April 11, 2010
Saturday, April 10, 2010
Week 11 Labs
Week 11
Task 1
The example below shows my web page retrieving information from my existing ‘Art’ table database using AJAX. An artist’s name is selected from the drop down, and his information is then populated into the appropriate cells of the table.
http://webdev.ramapo.edu/~cdaleo/Week11/Week11_PHP_Database.html
Task 2
The example for Task 2 is similar to task 1, except that the selected information from my existing ‘Art’ database will be converted to a XML document. The DOM will then be used to extract the artist’s information and display it on the HTML page.
http://webdev.ramapo.edu/~cdaleo/Week11/Task2_Week11/Week11_XML_Database.html
Everything is working.
Task 1
The example below shows my web page retrieving information from my existing ‘Art’ table database using AJAX. An artist’s name is selected from the drop down, and his information is then populated into the appropriate cells of the table.
http://webdev.ramapo.edu/~cdaleo/Week11/Week11_PHP_Database.html
Task 2
The example for Task 2 is similar to task 1, except that the selected information from my existing ‘Art’ database will be converted to a XML document. The DOM will then be used to extract the artist’s information and display it on the HTML page.
http://webdev.ramapo.edu/~cdaleo/Week11/Task2_Week11/Week11_XML_Database.html
Everything is working.
Saturday, April 3, 2010
Week 10 - Project Task
For Week 10’s Project Task, I used the database functions to update my Order Page and try to begin building a Shopping Cart.
ORDER PAGE
The user clicks order and goes to the Order page. Here they enter in all their customer information including name, address, zip, as well as credit card information. After filling out the fields the user clicks Submit and the information is inserted as a new record via a PHP file which uses the INSERT function. (Please note I first created a “Customer” database in order for this to work). A message tells the user “Your order has been submitted”. Currently, the website has links to Create, Delete, and View Records for the “Customer” database. Clicking View Records (using the SELECT function) will allow the user to see all customer information in a table. The links are only there right now to prove that my database functions are working. However, realistically those links should not be there as the user (customer) should never have access to this information. This would be something that should be accessible by an Admin of the site, which I may build at a later date. The link for the Order page is below:
http://webdev.ramapo.edu/~cdaleo/FinalProject/TEB_Master/Order/Order.html
SHOPPING CART
I have been trying to build some sort of shopping cart for a couple weeks now without much luck. However, I used what we learned this week to make some version of a cart – not very realistic though. First, the user clicks on the Shopping Cart link on the site. The product and price are displayed on the screen. ( I had to use Text Boxes because labels didn’t work with the PHP file). The user clicks Add to Cart, where I used the INSERT function here to add the information to a “Cart” table that I had previously created. A message appears saying that “Product has been added to cart”. Then I put a link at the bottom of the page which says “View Cart”. When the user clicks this, it takes them to another PHP page where I used the SELECT function which shows the records, or the customer’s “cart”.
I’m sure there is a better more realistic way to build a Shopping Cart, but this demonstrates the database functions we learned this week. Everything works.
http://webdev.ramapo.edu/~cdaleo/FinalProject/TEB_Master/ShoppingCt/Cart.html
ORDER PAGE
The user clicks order and goes to the Order page. Here they enter in all their customer information including name, address, zip, as well as credit card information. After filling out the fields the user clicks Submit and the information is inserted as a new record via a PHP file which uses the INSERT function. (Please note I first created a “Customer” database in order for this to work). A message tells the user “Your order has been submitted”. Currently, the website has links to Create, Delete, and View Records for the “Customer” database. Clicking View Records (using the SELECT function) will allow the user to see all customer information in a table. The links are only there right now to prove that my database functions are working. However, realistically those links should not be there as the user (customer) should never have access to this information. This would be something that should be accessible by an Admin of the site, which I may build at a later date. The link for the Order page is below:
http://webdev.ramapo.edu/~cdaleo/FinalProject/TEB_Master/Order/Order.html
SHOPPING CART
I have been trying to build some sort of shopping cart for a couple weeks now without much luck. However, I used what we learned this week to make some version of a cart – not very realistic though. First, the user clicks on the Shopping Cart link on the site. The product and price are displayed on the screen. ( I had to use Text Boxes because labels didn’t work with the PHP file). The user clicks Add to Cart, where I used the INSERT function here to add the information to a “Cart” table that I had previously created. A message appears saying that “Product has been added to cart”. Then I put a link at the bottom of the page which says “View Cart”. When the user clicks this, it takes them to another PHP page where I used the SELECT function which shows the records, or the customer’s “cart”.
I’m sure there is a better more realistic way to build a Shopping Cart, but this demonstrates the database functions we learned this week. Everything works.
http://webdev.ramapo.edu/~cdaleo/FinalProject/TEB_Master/ShoppingCt/Cart.html
Friday, April 2, 2010
Week 10 - Labs
Using the hard code files, I was able to create a table, insert records, and select the records. I modified the table and records using an Art Collection table. Here is my link showing the table of records using Select statement:
http://webdev.ramapo.edu/~cdaleo/Week10/select.php
Next, I worked on the HTML form and the PHP file that works with this. I created the HTML with text boxes where the user enters the art information and then clicks Submit. This takes them to the PHP page that tells them the new record has been added. I included a link on this page so the user can immediately see that the new record has been added to the table. The HTML page is below:
http://webdev.ramapo.edu/~cdaleo/Week10/Insert_Data_From_Form.html
Everything is working.
http://webdev.ramapo.edu/~cdaleo/Week10/select.php
Next, I worked on the HTML form and the PHP file that works with this. I created the HTML with text boxes where the user enters the art information and then clicks Submit. This takes them to the PHP page that tells them the new record has been added. I included a link on this page so the user can immediately see that the new record has been added to the table. The HTML page is below:
http://webdev.ramapo.edu/~cdaleo/Week10/Insert_Data_From_Form.html
Everything is working.
Subscribe to:
Posts (Atom)