Dear all,
I have an assignment that I don't know how to do it!! if anyone can do it for me !! I will pay them $50 by tonight VIA paypal !! is urgent please help!!!!
is too big to upload the assignment folder, if you willing to help, just let me know, i will send it to you VIA email. thank you so much!!
E-commerce Technologies
Assignment 4 - Shopping Cart Integration
Task 1 search.php
Outline
1. Create a page search.php use template.html as a starting point.
2. Modify index.php, products.php, and cart.php such that when the search bar form is submited the text in the input field with id searchInput is sent to search.php's get array. (Hint use the name attribute)
3. Skim this chapter on the LIKE keyword in MySQL.
http://dev.mysql.com/doc/refman/5.0/...#operator_like
4. Search.php will do the following:
1. Check to see if data is being sent from the get array
1. If not redirect to index page
2. If data is sent extact it to some variable, (lets call it $userInput)
2. Connect to the database
3. Generate SQL to request using the LIKE keyword and the %
1. The generated SQL statement should check all relavent fields in your products table
2. Specifically the name, category and description if you have not changed the initial table structure
3. Your search query should look something like this: (With the actual $userInput replaced)
SELECT * FROM products WHERE name LIKE %$userInput % OR category LIKE %$userInput % OR description LIKE %$userInput %;
4. Run the query using mysql_query
5. Store the resulting table somewhere.
6. Check the number of rows returned, if its 0 print out some generic nothing found message.
7. Otherwise loop through each product and print out some product information (product name and current price should suffice).
8. Format the product name such that it is a link to the actual products page of that product (Note you can pull the productID out of the return mysql resource)