Jump to content

How do you capture HTML anchor text?


wopopd83

Recommended Posts

I'm pretty much a newbie to PHP (4 months). I have a very simple question that has a very simple answer I'm sure. I have a PHP generated calendar that I want to use so that customers can schedule their own appointments. Each day in the month has an anchor to link to a sheduletime.php page. How do I capture the day number when the anchor is clicked on? Like I said I'm sure there is a simple function that I can use to do this. I have tried to find another post regarding this however can't seem to find one. Please either direct me to a post regarding this or simply show me a snippet of the code that I can use. I appreciate anybody's help.

Thanks

Link to comment
https://forums.phpfreaks.com/topic/192682-how-do-you-capture-html-anchor-text/
Share on other sites

You need to generate unique links for each day by adding a variable to the url. I'd suggest using a tmestamp. Example:

<a href="schedule.php?date=56438547">5</a>

 

Then on the page schedule.php you can reference the value using $_GET['date']

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.