Jump to content


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


I Need Help Sending Current Date Hidden In Form Field Using Post Method

Recommended Posts



I'm using a from on my website to get shipping quotes from YRC. Everything works fine, but now I'd like to have the date submitted with the from instead of the user having to input the date.


I'm using Dreamweaver CS3.



Below is what I had as the hidden date field.


<input type="hidden" name="PU_DATE" value="<?php echo $date; ?>" />


I tried a few samples that I search for on Google, but the display page on YRC returns an error. The date have to be submitted as mm/dd/yy.


How can I post the form to YRC with the current date submitted with it?


Thanks for your valued time.






The code from my fist post appears to be working on on the form. When I send the form to YRC it displays a shipping quote... which mean the date have been input.

Share this post

Link to post
Share on other sites

I'm not sure what a YRC is but depending on the format you need for the date, you'll want to put something like this:


<input type="hidden" name="PU_DATE" value="<?php echo date('j/d/Y'); ?>" />


will return:


<input type="hidden" name="PU_DATE" value="04/03/11" />


Check the PHP manual for date formatting here.

Share this post

Link to post
Share on other sites

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