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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.