Forum Moderators: coopster
Most of the wishes are for days in the future and this is also populated through the form.
However, I was wondering if there was a way where only those wishes and messages for today and past days was extracted and displayed.
If I use “$result = mysql_query("SELECT * FROM {$table} WHERE $publish_Date =< today");” and did an echo, will the entire contents will be displayed or just those that are as I intend as below.
I do not want to display any messages that are for a future date even if a visitor changes the date on his/her computer.
I would be ever so grateful for any assistance and help provided.
I'm curious about the other two variables you're using in your statement, though - do the table name and field name change? If the table is wishes and the field is publish_date, for example, this is a little easier:
$result = mysql_query("SELECT * FROM wishes WHERE publish_Date =< $today");
since you don't have to define the variables $table and $publish_date.