Mysql Search, if searched number exists do the following? howto?
===

good evening everyone. let be begin by saying i am probably the biggest Noob out right now. But i have to learn somewhere, and have to begin somehow.

Here is what im trying to do, i have a company where we issue out invoices to people, i then upload this invoice with "TicketNumber" and "date"

what i want to do is fairly simple in logic, but my mind cant rap around the Mysql unfortunately and i cannot find a tutorial for what i want to do.
So what do i want to do exactly?
I have a form i created which acts like a search, where as "Search Ticket Number" and submits it to "proceed.php"

all i want it to do is simple, If the ticket number is found in my database, and the date of the ticketNumber submitted is less then 72 hours of the current time in relation to the date and time i submitted, Goto Link A, if its greater than 72 Hours Goto Link B, If the search doesnt find anything Goto Link C,

Now i dont expect anyone to write it out for me if its complicated, but maybe direct me to tutorials to want i want to do or tell me what i should be looking for. However if you feel kind enough to script it for me so i can see what i should have done that would be very appreciated.

Now this is what i have in my proceed.php file:

    <?
    $username="data";
    $password="data1";
    $database="data";
    
    $TicketNumber=$_POST['TicketNumber'];
    
    mysql_connect(localhost,$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");
    
    $query="SELECT * FROM plate";
    $result=mysql_query($query);
    
    $num=mysql_numrows($result);
    
    mysql_close();
    ?>

anyone?.. thanks..

