Good evening! I call on you to give me a helping hand I'v run into a problem using Dreamweaver, basically I am creating a 'log' database for something in work and what I would like to do is be able to have a search page (see attachment image #3) and obviously when you click groovie you get the results. I'm having trouble creating the results page, anyone point me in the right direction in terms of what I need to put in the recordset to pull the information from the URL parameter? Hopefully someone can give me a hand! Thanks for your time, Jac
Hi , You did not mentioned if you use POST or GET or your field names but I will be showing you a general solution that you can addapt to your needs. lets assume your From date fields have the following names : f_day,f_month,f_year ( and that they all are numeric (f_month select value is date("n",...)) , same for To fields : t_dat,t_month,t_year. The code would be : $from = mktime(0,0,0,$_POST['f_month'],$_POST['f_day'],$_POST['f_year']); $to = mktime(0,0,0,$_POST['t_month'],$_POST['t_day'],$_POST['t_year']); $results_search = mysql_query("SELECT * FROM table WHERE date_field BETWEEN '".date("Y-m-d",$from)."' AND '".date("Y-m-d",$to)."'"); if(mysql_num_rows($result_search) > 0) { //print results } else { echo 'No results found !'; } PHP: Hope that clears things up.
Yup. thats a correct, now i think the problems is solved for him, now its up to him that how he wants to print the result.
Hey guys, thanks for your replys. I will give it a go now! In answer to your question yes it was a get field, shouldve known to post the code and what have you ha! Thanks again! Jac