php-general Digest 2 Aug 2013 09:00:27 -0000 Issue 8317

2013-08-02 Thread php-general-digest-help
php-general Digest 2 Aug 2013 09:00:27 - Issue 8317 Topics (messages 321750 through 321756): Re: Sending headers to server 321750 by: Karim Geiger 321756 by: Miguel Guedes Re: POST action 321751 by: Larry Garfield 321752 by: Paul M Foster 321755 by:

Re: [PHP] Sending headers to server

2013-08-02 Thread Miguel Guedes
Hi Karim, On 01/08/13 15:40, Karim Geiger wrote: Works for me. What happens exactly? Do you get a 200? That's exactly right - I always get a 200. How can I diagnose this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How to delete 3 months old records in my database?

2013-08-02 Thread Karl-Arne Gjersøyen
Hello again, folks! I wish to delete records in my database that is older than 3 months. $todays_date = date('Y-m-d'); $old_records_to_delete = ??? if($old_records_to_delete){ include(connect.php); $sql = DELETE FROM table WHERE date = '$old_records_to_delete'; mysql_query($sql, $connect_db) or

Re: [PHP] How to delete 3 months old records in my database?

2013-08-02 Thread Dušan Novaković
$query = DELECT FROM `__table_name__` WHERE `__date__` BETWEEN NOW() - INTERVAL 3 MONTH AND NOW() On Fri, Aug 2, 2013 at 12:58 PM, Karl-Arne Gjersøyen karlar...@gmail.comwrote: Hello again, folks! I wish to delete records in my database that is older than 3 months. $todays_date =

Re: [PHP] How to delete 3 months old records in my database?

2013-08-02 Thread Simon Griffiths
Hello, Try something like: $oldDate = new DateTime(); $oldDate-sub(new DateInterval('P3M')); $old_records_to_delete = $oldDate-format('Y-m-d'); Hope this helps, Si Sent from my iPhone On 2 Aug 2013, at 11:58, Karl-Arne Gjersøyen karlar...@gmail.com wrote: Hello again, folks! I wish to

Re: [PHP] How to delete 3 months old records in my database?

2013-08-02 Thread Karl-Arne Gjersøyen
2013/8/2 Dušan Novaković ndu...@gmail.com $query = DELECT FROM `__table_name__` WHERE `__date__` BETWEEN NOW() - INTERVAL 3 MONTH AND NOW() This delete everything from now and 3months backwards. I want to store 3 months from now and delete OLDER than 3 months old records. Karl

Re: [PHP] How to delete 3 months old records in my database?

2013-08-02 Thread Simon Schick
On Fri, Aug 2, 2013 at 2:02 PM, Karl-Arne Gjersøyen karlar...@gmail.com wrote: 2013/8/2 Dušan Novaković ndu...@gmail.com $query = DELECT FROM `__table_name__` WHERE `__date__` BETWEEN NOW() - INTERVAL 3 MONTH AND NOW() This delete everything from now and 3months backwards. I want to

Re: [PHP] How to delete 3 months old records in my database?

2013-08-02 Thread Dušan Novaković
Yeah, just spelling mistake :-) And yes, it should be: $query = DELETE FROM `__table_name__` WHERE `__date__` = NOW() - INTERVAL 3 MONTH Cheers ;-) On Fri, Aug 2, 2013 at 2:35 PM, Simon Schick simonsimc...@gmail.com wrote: On Fri, Aug 2, 2013 at 2:02 PM, Karl-Arne Gjersøyen

Re: [PHP] Sending headers to server

2013-08-02 Thread Matijn Woudt
On Thu, Aug 1, 2013 at 4:04 PM, Miguel Guedes miguel.a.gue...@gmail.comwrote: Hello List, I'm running PHP 5.4.9 as CGI (via apache 2.2.22) and can't seem to be able to send headers to the server. Both, header('Status: 500 Internal Server Error'); and, header('HTTP/1.1 500 Internal

[PHP] Re: How to delete 3 months old records in my database?

2013-08-02 Thread Jim Giner
On 8/2/2013 6:58 AM, Karl-Arne Gjersøyen wrote: Hello again, folks! I wish to delete records in my database that is older than 3 months. $todays_date = date('Y-m-d'); $old_records_to_delete = ??? if($old_records_to_delete){ include(connect.php); $sql = DELETE FROM table WHERE date =

Re: [PHP] Sending headers to server

2013-08-02 Thread Miguel Guedes
On 02/08/13 14:10, Matijn Woudt wrote: Did you print some data before using header? No, not at all. I've PHP configured to complain about notices, warnings and errors; would've got a warning about headers already sent, which I don't get. -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Sending headers to server

2013-08-02 Thread Karim Geiger
Hi Miguel, On 08/02/2013 10:50 AM, Miguel Guedes wrote: Hi Karim, On 01/08/13 15:40, Karim Geiger wrote: Works for me. What happens exactly? Do you get a 200? That's exactly right - I always get a 200. How can I diagnose this? Try getting the complete header by using curl -v

Re: [PHP] Sending headers to server

2013-08-02 Thread Miguel Guedes
Great tip, Karim! On 02/08/13 15:29, Karim Geiger wrote: Try getting the complete header by using curl -v http://url.com and paste it here. What is your output? Here's my output: $ curl -v http://localhost/header-test.php * About to connect() to localhost port 80 (#0) * Trying

Re: [PHP] Sending headers to server

2013-08-02 Thread Karim Geiger
Hi Miguel, On 08/02/2013 04:34 PM, Miguel Guedes wrote: Here's my output: $ curl -v http://localhost/header-test.php * About to connect() to localhost port 80 (#0) * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 80 (#0) GET /header-test.php HTTP/1.1 User-Agent:

Re: [PHP] Sending headers to server

2013-08-02 Thread Miguel Guedes
This is strange. I've just found out that the headers are sent correctly if I access the website outside of localhost. I don't understand why. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Just passing this along: Free Book

2013-08-02 Thread Tamara Temple
O'Reilly has a free download, apparently through a company called SAVVIS. No affiliation, just passing this along… http://go.savvis.net/paas You give them some contact info, and you get a download link. Nothing is actually checked to see if the info you fill in is real or not. (cross-posted: