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 wrap around the MySQL and I cannot find a tutorial for what I want to do.
I have a form that I created which acts like a search, where it takes "Search Ticket Number" and submits it to "proceed.php"
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 doesn't find anything Goto Link C,
I don't expect anyone to write it out for me if it's 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();
?>