You started with an else if which is a no no. Also each database field where your using a non int value is being done wrong. Also you need to code in exceptions to your if statements of nothing will happen if the condition is not met and the program will terminate without doing anything since the first condition was not met. You need to do it like so:
$query = "SELECT * FROM plt_transact WHERE plt_no = '".$plt_no."'";
' " . $variable . " '
Just a question why do you need the start date and end date for? Is it for a project control site were your showing a start and finish date per project? I think your making it more complex then it is. I think you need to first write out what needs to happen so you have a plan or a list of what needs to be done. Then figure out code wise how it can be done. Then implement the code and make sure it works. Try using codelobster as your IDE because it catches errors in code. I think you need to polish your sql skills so your queries are optimized. If I knew what it was you were doing I could show you how to get it done.