Re: [PHP] checking for and enforcing https

2008-02-26 Thread Aleksandar Vojnovic
If you are running Apache you could use a rewrite rule for such a case. Example below RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(my|folder|examples) /https/://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Aleksander Per Jessen wrote: tedd wrote: Sometimes I feel like a child

Re: [PHP] crc check for JPEG file exists

2008-02-26 Thread Aleksandar Vojnovic
I would rather use md5_file() for file uniqueness. Aleksander Olav Mřrkrid wrote: hello is crc32() an acceptable way of managing whether a JPEG file exists (in a database or similar collection)? i mean doing a crc32() on the binary data of the JPEG file, and then check the database if there

Re: [PHP] Re: Uploading PDF

2008-02-15 Thread Aleksandar Vojnovic
Upload error 2 occurs when the file size exceeds the maximum allowed upload size. Aleksander David Robley wrote: Pastor Steve wrote: Greetings, I am getting an error when I am trying to upload a PDF file through a script. When I do a print_r($_FILES) I get the following: Array (

Re: [PHP] Template system in PHP

2008-02-12 Thread Aleksandar Vojnovic
Because its painful and fun at the same time :) Aleksandar Quoting Nate Tallman [EMAIL PROTECTED]: Ditto on Eval() PHP is already a templating system. Why go the long way around? On Feb 12, 2008 10:13 AM, Greg Donald [EMAIL PROTECTED] wrote: On 2/12/08, Xavier de Lapeyre [EMAIL

Re: [PHP] Re: Question about development

2008-02-12 Thread Aleksandar Vojnovic
Could you explain this a little better - ...into using a database[1] for storing the pages and using browser sniffing to find out what language preference they currently had selected to display in that language? Aleksandar Quoting Jason Pruim [EMAIL PROTECTED]: On Feb 12, 2008, at 1:03

Re: [PHP] Empty Array?

2007-10-05 Thread Aleksandar Vojnovic
I think the $lock_result is just a resource #id you haven't fetched any data yet. True? Aleksander Dan Shirah wrote: Ah, what a lovely case of the Friday morning brain farts! I have a query that selects some data from a table based on the current ID selected. If the query does not return

Re: [PHP] error messages

2007-10-05 Thread Aleksandar Vojnovic
try putting this on the top of your PHP page ?php error_reporting(E_ALL); ? tbt wrote: yes it is pscott wrote: On Fri, 2007-10-05 at 00:32 -0700, tbt wrote: I added the following lines to the top of my script but still no error messages show up on the browser. When a php

Re: [PHP] error messages

2007-10-05 Thread Aleksandar Vojnovic
Maybe display errors is set on off? ? ini_set('display_errors','1'); ? Aleksander tbt wrote: yes it is pscott wrote: On Fri, 2007-10-05 at 00:32 -0700, tbt wrote: I added the following lines to the top of my script but still no error messages show up on the browser. When a php

Re: [PHP] Empty Array?

2007-10-05 Thread Aleksandar Vojnovic
']; if (empty($lock_row)) { $set_lock = INSERT into locked_payments ( id, locked_by_user) VALUES ('$request_id', '$current_user'); mssql_query($set_lock) or die (Query failed: br /.mssql_get_last_message()); } ? Thanks! :) On 10/5/07, Aleksandar Vojnovic [EMAIL PROTECTED

Re: [PHP] A two flavored post

2007-10-05 Thread Aleksandar Vojnovic
This might be a way to do it: *Example 1* script function appendMeBaby(aVar){ self.location.href = 'img.php?s=' + aVar + 'someOtherVar=itIsMeTheValue'; } /script a href=javascript:appendMeBaby(?php echo($value);?);Click here/a *Example 2* script function appendMeBaby(aVar, bVar){

Re: [PHP] inserting ´ in a db

2007-10-04 Thread Aleksandar Vojnovic
Pick one: http://si2.php.net/manual/en/function.htmlentities.php http://si2.php.net/manual/en/function.addslashes.php http://si.php.net/mysql_escape_string Aleksandar Yamil Ortega wrote: Hi list, good day. I have a simple script that inserts text on a mysql table, that has a field named

Re: [PHP] Re: the opposite of a join?

2007-10-03 Thread Aleksandar Vojnovic
I would also suggest to limit yourself to things you actually need not to select the whole table. Aleksandar Jim Lucas wrote: Colin Guthrie wrote: Martin Marques wrote: SELECT * FROM company WHERE id NOT IN (SELECT companyID FROM contacts); Not ideal as has been mentioned else where in

[PHP] Re: [PHP-DB] Re: [PHP] Re: the opposite of a join?

2007-10-03 Thread Aleksandar Vojnovic
It seems you missed my point :) if you would need all the data then select them all, but if you need only partial data from the table then you could limit yourself to that specific columns. I doubt everybody need everything all the time. True? Aleksandar Chris wrote: Aleksandar Vojnovic

Re: [PHP] Public Announcement

2007-09-11 Thread Aleksandar Vojnovic
Hahaha oh wow. -Xander Stut wrote: Sascha Braun - CEO @ Braun Networks wrote: hi stut, thank you for your advices. Ok, just so it's perfectly clear to you... I'm taking the piss. Still, since you provided apparently serious answers I'm going to continue to enjoy myself... -

Re: [PHP] remove page referrer

2007-09-11 Thread Aleksandar Vojnovic
You can not control this, but you might be able to control the page where the user is going back through the third page :) like this: page 1: submit to page 2 page 2: header('Location: /page 3'); page 3: the final page if the user clicks back he is going to end up on page 2 which has