I im having an issue with this, Im not able to retrieve data from db.
This Works fine
$user_date = ISSET($_POST['input_date']);
$query1=mysql_query("SELECT START_TIME,END_TIME FROM dummy where MDATE='2012-03-18'")
but this doesn’t. only change is I’ve used $user_date
$user_date = ISSET($_POST['input_date']);
$query1=mysql_query("SELECT START_TIME,END_TIME FROM dummy where MDATE='$user_date'")
isset()returns a boolean value if the variable has been set, not the value of the variable itself. You need something like:The above is a ternary operation. If the input value has been set, it is escaped and stored into
$user_date. Otherwise, an empty string is returned. You would need to decide what action to take when it isn’t set, the part after:. For example, you could return a default date instead: