Jump to content

Problem sending variables


melissal

Recommended Posts

So I'm trying to build a basic shopping cart product page, wherein the the user can select put a date into a form and that date gets passed into the URL after which it gets put into the session for the specific cart item. The trouble that I'm having is putting it into the URL in the first place along with the other variables that I need.

 

Here's my code...I know I'm doing something wrong but I'm not sure how to fix it...

 

<form action="reserve.php" method="get">
Date Requested: <input name="reservation_date" id="reservation_date" type="text" value="dd/mm/yy">
</form>
<?php 
echo "<center>
<a href='reserve.php?reservation_date=".$_GET['reservation_date']."&category_id=$category_id&product_id=".$_GET['product_id']."'>
<img src='images/reserve_button.gif' border='0'></a></center>

Link to comment
https://forums.phpfreaks.com/topic/83210-problem-sending-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.