Jump to content

php help


fsl4faisal

Recommended Posts

if($_POST['Submit']=="Check"){

        /*$title=mysql_real_escape_string($_POST['title']);
    $subject=mysql_real_escape_string($_POST['subject']);
    $author=mysql_real_escape_string($_POST['author']);*/

        $bookid=(int)$_POST['bookid'];
        $account=(int)$_POST['account'];
        $issuedate=mysql_real_escape_string($_POST['issuedate']);
        //Sduedate=$issuedate+15;
        $duedate=DATE_ADD('$issuedate'+interval 15 DAY)
        
        print $duedate;
        print $issuedate;
        $insert_query="insert into issue values($account,$bookid,'$issuedate','$duedate')";

        $result=mysql_query($insert_query,$linkID1);
        if($result){
            print "<html><body background=\"header.jpg\">
            <p>book successfully added</p></body></html>";
        }
    else{
        print "<html><body background=\"header.jpg\">
        <p>$insert_query</p>";
        print "<p>there was a problem in adding</p></body></html>";
    }
            }

 

i want $duedate should be 15 days from the issuedate
Link to comment
https://forums.phpfreaks.com/topic/215483-php-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.