Hi there,
I am not sure where to start here so was wondering if someone could point me in the right direction please? I've had a look on Google and can't find anything that works.
I have an expense system that shows data by week (index.php?wk=1 for example) and I would like to create a button called Next and Previous to show the previous and next weeks.
Database example
ID - 1
Week - 1
issue_date - 02/02/2023
money_in
money_out
initials
Many thanks,
ED.
hey that is an excellent and time saving tip! I also did not know that php has this old friend from cpp. php is just a hobby for me. I don't have alot of time to invest. Now i have a new tool in my toolbox. I will play this over the weekend., haha.
so you could drop the padding in my example and replace it with a better idea:
<?php /* php 8.2 compatible */
$delimiter = 2; /* tens (01-99) */
if (empty($_GET['selectWeek']) || preg_match("/^[0-9]{1,$delimiter}+$/", $_GET['selectW