Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I know I've seen the answer to this 1

Status
Not open for further replies.

skicamel

Programmer
Dec 24, 2001
126
US
I know I've seen the answer to this on tek-tips previously, but I haven't been able to find the post again.

I have a page (page1) that passes entered information to another page (page2) that updates a database. The variable I'm concerned with is $date. Page2 updates beautifully. Everything's good. I have a link on page2 to a summary page (page3) that needs that $date variable. How do I pass that variable from page2 to page3? This is what I've tried:


echo '<a href=&quot;summary.php?date=$date&quot;>Summary</a>';

echo '<a href=&quot;summary.php?date2=$date&quot;>Summary</a>';

echo '<a href=&quot;summary.php?$date&quot;>Summary</a>';

The first two give me the text &quot;$date&quot; instead of the date value. The third I know is garbage. :) Any input would be appreciated. Thanks, all.

 
Shoot. Sorry for the lack of a subject line.
 
echo '<a href=&quot;summary.php?date=$date&quot;>Summary</a>';

should work but try :

echo '<a href=&quot;summary.php?date=' . $date . '&quot;>Summary</a>';

instead. Regards

Big Bad Dave

logo.gif


davidbyng@hotmail.com
 
It may just be a matter of quotes. Tried this?

echo '<a href=&quot;summary.php?date='$date'&quot;>Summary</a>';

Not 100% sure and not in a position to test, but that may work. :) Matt
matt@paperlove.org
If I can help, I will.
 
Ooh. That's good. I didn't even think about that. Worked like a charm. Thanks much.
 
Jeez, I only posted this 5 minutes ago. You guys are great.

Matt: Big Bad Dave just beat you to the punch. Same concept, but it did need the appending periods.

Thanks, both you guys.
 
Yeah, Big Bad Dave's response appeared between the time I started typing and the time I hit Submit... :) Just glad you got it working!

[and of course, I'm making a mental note of the periods in case I run into a similar situation... :)] Matt
matt@paperlove.org
If I can help, I will.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top