News:

LVCS.NET offers low cost domain registration services.

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - TimCorless

#1
Support Requests / sendmail
April 10, 2006, 05:39:10 PM
Is there an implementation of sendmail on freepgs that I could use?
#2
Support Requests / PHP Help
January 10, 2006, 09:24:12 PM
I'm trying to write some PHP which takes in a date from the user, with each part being a seperate inputtable field, ie, hours, minutes, day, month, year etc are all their own edit box.

I then have to concatenate these, convert them to a timestamp, insert them into a database for later retrieval.

This isn't working at the minute, in fact it fails before it even gets to the database:


   // get components of a date
   $day = $_POST['day'];
   $month = $_POST['month'];
   $year = $_POST['year'];

   // add the compnents of date to make a real date
   $date = "$day-$month-$year";

   // get components of a time
   $hours = $_POST['hours'];
   $minutes = $_POST['minutes'];

   // add the components of time to make a real time
   $time = "$hours:$minutes:00";

   // get the place
   $place = $_POST['place'];

   // get the comments
   $comments = $_POST['comments'];

   // need to convert date and time on their own into a Timestamp
   // so concatenate them, then use strtotime to convert them into a
  // timestamp, and store this in a new variable.
   $datetime = "$date $time GMT";
   echo $datetime;

   $gigdate = strtotime($datetime, 0);
   echo $gigdate;

   $gigdate1 = strftime('%H %M %d %m %Y', $gigdate);
   echo $gigdate1;


with the input:
DD - MM - YYYY
21 06 2006

HH MM
21 00

produces (see echo statements):


21-06-2006 21:00:00 GMT
1795813200
13 00 27 11 2026


so as you see, the second date, when the timestamp is converted back into a string is completely different than what went in to the timestamp.

Can anyone see what I'm doing wrong?!
#3
Support Requests / Uploading Files
January 10, 2006, 09:22:17 PM
Hi all,

I would like to add a facility to my website where user can upload files to my site, they are then added to a database, this database will contain a boolean value of whether they are approved or not, which will be administered by myself.

I have an upload file, all the database is ready, but I get this error when I use my upload page:

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/uploadedphotos/photouploads.php) is not within the allowed path(s): (/tmp/:/fpgs/fpgshttpd/rickandsi/:/fpgs/fpgslogs/607/:/usr/share/pear/) in /fpgs/fpgshttpd/rickandsi/rick/photouploads.php on line 10

Now I'm assuming there is some freepgs restriction on uploads to the server? Is there anyway I could work with this, but still let users uploads their photos?

Thanks,
Tim.