rocg23
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;
<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
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
Runs fine when I run it on its own though...
First Script;
<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
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