[PHP] Number of days between two dates
Hello everyone, Do you know how to calculate the number of days between 2 dates? So far, I used that function: $a=mktime("","","",$month1, $day1, $year1); $b=mktime("","","",$month2, $day2, $year2); $c=($a-$b)/(60*60*24); The problem is one date is prior to 01/01/1970, the mktime function does not work. Any idea? Thanks. Jean-Louis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Self-filling login form
A few days ago, I found a way to stop the autocomplete feature. It's more html coding that php actually. Try Jean-Louis Jean-Louis -Original Message- From: Alberto Brea [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 10:33 AM To: [EMAIL PROTECTED] Subject: [PHP] Self-filling login form A question please: I have a login form on (PHP 4.3.1 and Apache 1.3.27). When I click inside the ID box, you can glimpse at some of the user IDs inside it for a fraction of a second (similar to a drop-down menu), which shows an unauthorized visitor some of the id values. Worst of all, when you enter your ID the password automatically fills in, giving free access to the unauthorized user. Does anybody know why this happens? Something in the php.ini or httpd.conf files perhaps? Thanks for any comment Alberto Brea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Redirect
To work around that "headers already sent" problem, I use: if ($condition == true) { echo "location.href=('http://...');"; } That works great all the time (unless the javascript has been disabled at the browser side, but usually it's enabled). Jean-Louis At 15:55 3-4-2003, you wrote: >Hi, > >How would one redirect a user to a different page if a certain >condition was met? > >i.e. > >if($condition == true){ > goTo newPage.php >} if ($condition == true) { Header("Location: "http://www.sense.nl/index.php?module=ContentExpress&func=display&ceid=15";); } take care that your script does not create any output before this,because then you will get an error (headers already sent) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Need help with ?> vs. php?>
That's fixed. Thanks. Now, another problem. The data I capture in a form (web page 1) are not received by the PHP page (web page 2). Is there something different with the previous version of PHP? Thanks to all of you for your help. Jean-Louis > -Original Message- > From: LeTortorec, Jean-Louis > Sent: Wednesday, March 05, 2003 11:59 AM > To: '[EMAIL PROTECTED]' > Subject: Need help with ?> vs. php?> > > Hello everyone, > > I've installed the Apache v2.0.44 with PHP4.3.1., under Windows. > > My pages starting and ending with "" don't work anymore. I would > have to change them to "". > > Do you know if there is a way for keeping " > Thanks for your help. >
[PHP] Need help with ?> vs. php?>
Hello everyone, I've installed the Apache v2.0.44 with PHP4.3.1., under Windows. My pages starting and ending with "" don't work anymore. I would have to change them to "". Do you know if there is a way for keeping "
RE: [PHP] How to know if we're using http or https
Thanks to all for your prompt replies! It works just fine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to know if we're using http or https
Hello all! Is there a flag that would tell me if the page requested is using SSL, by https, or regular http? I'm not sure I could get that from PHP, or from Apache/PHP. Thanks for your help. Jean-Louis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP-PDB: Create files for PALM Pilot
Hi all: I'm trying to write files for PDAs (pdb type) from a PHP script. I've tried to use PHP-PDB from SourceForge but can only give a name to the database, I cannot add any record (pretty bad for a database, no?). Is someone could help with, that'd be fantastic! Either with that library or with other one. I know I could use PERL but I'm addicted to PHP :-) Thanks Jean-Louis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imagecreate and/or GD library not activated
Hello everyone. I wrote a little code creating PNG images under Apache/PHP windows. As the code works fine, I need to transfer it onto the Linux platform. When I execute the code, PHP replies "Fatal error: Call to undefined function: imagecreate()". I had libgd installed. I just added GD 1.8.4. The php.ini file says ";extension=gd.so". I removed the comma, restarted Apache. Does not work. I copied libgd.so in /etc/lib/php4 but did not change anything. Any idea? Thanks. Jean-Louis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP & Excel
Hello every one: I'm trying to create XLS files on the fly. I found BiffWriter. Looks great for adding texts and numbers, but not formulas. Has anyone implemented something about formulas? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Emails sent out twice
Hello all: I have a script that looks like: ... $name="Project #1"; ... $title="NEW PROJECT: ".$name; $a=mail("[EMAIL PROTECTED], [EMAIL PROTECTED]",$title,$body, "From:[EMAIL PROTECTED]"); ... When I execute this code (there is no loop anywhere), ALL the recipients receive 2 emails: - the first one with the subject "NEW PROJECT:" - the second with the subject "NEW PROJECT: Project #1" I cannot figure out why the first one is sent, and why with a partial subject. Any idea? Thanks. Jean-Louis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help on current working directories
Hi: I'm coding pages that need to include some general functions. File1 is an example of those pages. I also need to use the very same function file across several web sites. So, I created an additional file, where I have listed all the options for a particular site (which is then included into functions.php). The problem is how to properly include "options.php"? FYI, functions.php and options.php are located in the same directory. if file1.php and functions.php are in the same directory, no problem. if file1 is not in the same directory as functions.php, I can change the path for "include('here\there\here\functions.php')", but I cannot read options.php (because the current working directory is the one were file1.php is located). Any help? Thanks. Jean-Louis File 1: File functions.php -