here i am trying to pass the id as parameter for next page using php.
I am retrieving values from database and i have id as a primary key. i want to pass the id for next page. but when i pass the parameter through URL its not appearing on url. how can i do this?
here is what i have done.
echo "<a href='product-des.php?'". $row["product_id"].">";
here the URL is visible till.php but i am not able to see any id after that.
what am i doing wrong here... how can i do this?
To pass parameter
echo '<a href="product-des.php?pro_id='. $row["product_id"].'">';
To get parameter:
echo $_GET['pro_id'];
this
echo "<a href='product-des.php?'". $row["product_id"].">";
should be like this
echo "<a href='product-des.php?product_id=".$row['product_id']'>."'" >Product Name</a>";
try this
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.