View Full Version : Include script not working...

06-06-2007, 08:32 PM
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;

<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">

include "connect.php";
include "variables.php";

if(isset($_POST['submit'])) {

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

$sendfax = "

<!-- set up date and time for orders Table in count DB -->
$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);

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

06-08-2007, 01:50 PM
Please ensure your complete path name of including file
It must work