php-windows Digest 28 Feb 2005 13:18:09 -0000 Issue 2593
Topics (messages 25685 through 25686):
Re: how to move files from one place to another ?
25685 by: M. Sokolewicz
Validation of Primary Key Datetime variable
25686 by: S.D.Price
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Vaibhav Sibal wrote:
Hello,
Can some please guide me as to how should I move files from one
directory to another on the server itself using PHP ? I use PHP 5.0.3
and Apache2 and Mysql.
Thanks
Vaibhav
http://www.php.net/copy
--- End Message ---
--- Begin Message ---
Hi, I wonder if anyone can help.
I have designed a newsblog which uses PHP and MySQL. Each news story has
a primary key which is the current date. The datatype used in MySQL is
"datetime". When stories are extracted from the database the user can
then navigate based on date order.
When a user adds a news story to the database the current days date is
shown in the form using
<dt>
<label for="publish_date"><?php echo $publish_datelabel ?></label></dt>
<dd><input type="text" name="publish_date" id="publish_date"
value="<?php echo date('Y-m-d H:i:s') ?>"/></dd>
This is the date added to the DB by default.
However, the user must be able to change the date so that they can set a
date sometime in the future when they want the story to be published.
The only stories shown in the archive (and pulled through to the home
page) are those which are before or on today's date.
My problem is that I am not sure how to validate any changes made to the
$publish_date so that it will conform to the required datetime range in
MySQL and not give the useless answer 0000:00:00 00:00:00.
Does anyone know how to do this?
Thanks
Steven Price
--- End Message ---