With this I'm needing to start off by logging in. This is done by putting in the email of a customer and pressing the login button (this is the customer_login.php page). The login button goes through the index.php page and then goes to the product_register.php page. Once the product_register.php page is opened, the first name of the customer that is associated with the email is automatically shown, then there is a drop down that is used to select the product that is being registered. Then when you click on the register product button it is to show a statement on the same product_register.php page stating "Product (product name that was inputted in the drop down) was registered successfully. How can I get the coding that I have now to be able to do that?

Recommended Answers

All 5 Replies

So looking at customer_login.php, I'm not sure what you mean to do here:

<form action="index.php" method="post" value="login_customer">

You cannot set a value of "login_customer" to the form itself. I think what you mean to do is:

<form action="index.php" method="post">
    <input type="hidden" name="action" value="login_customer">

The same is true on the product_register.php page:

<form action="index.php" method="post" id="aligned">
    <input type="hidden" name="action" value="register_product">

Then, the form enters the register_product block on index.php at which point you will need to retrieve the form contents from INPUT_POST, etc.

Thank you, I have done the changes but I'm still getting up a blank page when I click on the buttons

Please show me what all your code looks like now, with all the echo statements included.

Confirm you're referring to clicking on the button to delete a product, correct?

It's for all buttons, so the delete button and the add product button that takes the information inputted into the text boxes on the product_add.php page and transfer that into the table on the product_list.php page

I think we may have the topics confused. For this one I'm looking for the search bar to search for a customers email and when you click the login button, it takes you to the product_register.php page that shows the same of the customer associated with the email automatically and then you click from the drop down to select the product you want to register. When you click the register product button, it shows up "Product (name of product selected from drop down) was registered successfully

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.