Not sure exactly how I would implement this.  Currently the reload URL
is being provided via the "$PHP_SELF" variable.  I like using this, but
suppose I could change this if truly necessary.  Also, the $td is not
currently being passed into the function that generates the two buttons and
hence defines the reload URL.  I would rather not pass any additional
variables into this function as I just feel this is "unclean".  Thanks again
for the idea, and any additional advice or suggestions are most appreciated.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 9:01 AM
To: NIPP, SCOTT V (SBCSI)
Subject: RE: [PHP-DB] Datetime help in an INSERT...



You could alway place it as a "GET" 

echo "<a href=\"yourscript.com/yourpage.php?td=$td\">"; 


Gary Every 
Sr. UNIX Administrator 
Ingram Entertainment 
(615) 287-4876 
"Pay It Forward" 
mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>  
http://accessingram.com <http://accessingram.com>  


> -----Original Message----- 
> From: NIPP, SCOTT V (SBCSI) [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] 
> Sent: Thursday, June 05, 2003 8:57 AM 
> To: 'CPT John W. Holmes'; [EMAIL PROTECTED] 
> Cc: [EMAIL PROTECTED] 
> Subject: RE: [PHP-DB] Datetime help in an INSERT... 
> 
> 
>       I have actually discovered that the $td value is blank. 
>  The reason 
> appears to be that the page is reloading when a button is 
> pushed, and that 
> is when the $td value is being lost.  My question now is, how 
> do I keep the 
> $td value after the page is reloaded?  I would rather keep 
> the value from 
> the original query than perform another database query to 
> populate this 
> value yet again.  Thanks yet again for the help. 
> 
> -----Original Message----- 
> From: CPT John W. Holmes [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] 
> Sent: Wednesday, June 04, 2003 2:14 PM 
> To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED] 
> Cc: [EMAIL PROTECTED] 
> Subject: Re: [PHP-DB] Datetime help in an INSERT... 
> 
> 
> > > I am stumbling across something that I thought I have done before, 
> > > and I am not having any luck finding an example of this.  
> Basically, I 
> am 
> > > wanting to timestamp the date and time into new entries 
> in a simple 
> > database 
> > > table.  The following section is the actual code for 
> this, and I cannot 
> > > figure out how to get the date/time stamp to populate 
> into the database. 
> > > Thanks in advance for the help.  I suspect this is a very 
> simple fix. 
> > > 
> > > $denylog = "INSERT INTO deny (account, td, date) VALUES 
> ($tmp, $td, 
> > NOW())"; 
> > > $denylog_result = mysql_query($denylog, $Prod) or 
> die(mysql_error()); 
> > 
> > The error I am receiving is: 
> > 
> > You have an error in your SQL syntax near ' NOW())' at line 1 
> 
> Are you sure $td has a value? If it's blank, you'd get an 
> error like that. 
> 
> ---John Holmes... 
> 
> -- 
> PHP Database Mailing List ( http://www.php.net/ <http://www.php.net/> ) 
> To unsubscribe, visit: http://www.php.net/unsub.php
<http://www.php.net/unsub.php>  
> 

Reply via email to