kenki
10-05-2009, 06:24 PM
I sent a email to websitedatabases, and they reffered me here, I am hoping someone can help.
I wrote the following piece of code for my reservation database. This code sits just above the insert sql statement.
It works as expected, if someone enters a reservation for more than 7 days, the entry does not go in to the database.
What I need to do is create an error message in the detail view or the table view. Note the print statement, all that does is flash for a split second as the page refreshes.
Can someone help me with how to display this message after the page refreshes after the user has clicked add new or update?
// Do not allow reservations over 7 days.
$days = abs(strtotime($frdate) - strtotime($todate)) / (60 * 60 * 24);
if ($days > 7) return;
else;
{ print '<p> You cannot reserve an item for more than 7 days</p>';
}
Thanks
Ken.
I wrote the following piece of code for my reservation database. This code sits just above the insert sql statement.
It works as expected, if someone enters a reservation for more than 7 days, the entry does not go in to the database.
What I need to do is create an error message in the detail view or the table view. Note the print statement, all that does is flash for a split second as the page refreshes.
Can someone help me with how to display this message after the page refreshes after the user has clicked add new or update?
// Do not allow reservations over 7 days.
$days = abs(strtotime($frdate) - strtotime($todate)) / (60 * 60 * 24);
if ($days > 7) return;
else;
{ print '<p> You cannot reserve an item for more than 7 days</p>';
}
Thanks
Ken.