Results 1 to 2 of 2

Thread: Include script not working...

  1. #1
    Join Date
    Nov 2006
    Location
    New York
    Posts
    26
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Include script not working...

    I have a script that updates a second database with info I am passing. I see that all the info passes, but it won't update when I run in the first script.

    Runs fine when I run it on its own though...

    First Script;
    PHP Code:
    <html>
    <head>
    <title>Information Confirmation</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="huo.css" rel="stylesheet" type="text/css">

    </head>
    <?php 
    include "connect.php";
    include 
    "variables.php";
    ?>
    <body>
    <center>

    <?php
    if(isset($_POST['submit'])) { 

    // create date time stamp for order send
    $datetime date("F dS, Y l h:i a");
    ?>
    <!-- create fax file -->
    <?php
    $header 
    "
    <center>Order placed<br>
    $datetime
    </center>"
    ;

    $sendfax "
    $header<br>
    $userinfo<br> 
    $order";
    ?>

    <!-- set up date and time for orders Table in count DB -->
    <?php 
    $orderid 
    $_COOKIE["orderid"];  //  Get order ID from Cookies

    -->include "../order_counts/date.php";
    ?>

    <?php echo $sendfax ?>

    <?php include "fax/fax.php"?>

    <META HTTP-EQUIV = "Refresh" Content = "1; URL =fax/chkfax.php">
        <?php ?>
    Then the second script (date.php);
    PHP Code:
    <?php 
    include "./connect.php";     

    $date date("d/m/y");
    $time date("H:i");

        
    $updatedb "UPDATE orders SET date='$date',time='$time' WHERE ip_ID = '$orderid'";
        
    mysql_query($updatedb) or die("could not updatedb");
    ?>
    If I run date.php with and orderid set, but itself it runs fine, but when I run the first script with it included it dies...

    I am using different connect.php scripts, and I have done this before, but not an update...Any help would be appreciated, thanks

  2. #2
    Join Date
    Jun 2007
    Location
    Pakistan
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hi,
    Please ensure your complete path name of including file
    It must work
    thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •