PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a table that pulls all of a users products currently in the database. The user can click on the product name and be taken to an update page where they can update their product. What I need is to create and pass a variable based on what the user clicks so that I bring up the correct item to on the update page. Here is the table with product info and hyperlinks:
Most users will have numerous products. When they click on the 'prod_name' I want the update_product.php to pull up the info for only that product. I have the update_product built so I just need to get and pass the variable based on the click.
thanks,
tim
To the best of my knowledge you can only do that with a submit function. You might be able to get away with something along the lines of... in your link instead of just saying href="update_product.php" do href="update_product.php?prod=whatever". then use that variable that you are passing in the link to do the sql query and display that product only.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
In my query I join tables user_product and product on prod_id. Since both tables have prod_id, do I need to specify u.prod_id in my SELECT and in my link as I've done below?