Jump to content

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']

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.