Re: [PHP] pictures stored in PostgreSQL DB

2007-03-04 Thread Fergus Gibson
Alain Roger wrote: I know how to do that for 1 picture. But i want to display the pictures as thumbnail... so several pictures on the same PHP pages, with some texts. Seems to me that Matt's suggestion is perfectly applicable. You could simple add img tags as necessary, each with the call to

[PHP] Re: Matching logins to an old htpasswd file

2007-03-04 Thread Fergus Gibson
Ryan A wrote: Hey, I have a old htpasswd file with a lot of logins in this format: test:dGRkPurkuWmW2 (test:test) test1:dGlAW3zdxeAG2 (test1:test1) now I have a login form what takes a POST user and a POST pw... but if you look at my above first example login.. the username and pass are

Re: [PHP] Session Problem

2007-02-20 Thread Fergus Gibson
Brad Bonkoski wrote: How do you move from one page to the other? You have to pass the session along, I believe.. Something like: $s = SID; // session contant page2.php?$s You only need to pass the session identifier in the query string if you aren't using cookies. By default, sessions will

[PHP] Re: Securing user table with sha function

2007-02-20 Thread Fergus Gibson
Haydar Tuna wrote: 1) If you protect your site from SQL Injection, you must replace all quote and blank character in your form data. (with string functions) A better approach is data inspection. For example, if you know a field should only ever contain letters, you can use ctype_alpha() to

[PHP] Re: Securing user table with sha function

2007-02-20 Thread Fergus Gibson
Tim wrote: Now moving on into other aspects of security :P I was thinking of a way to secure my login inputs the best way possible. [...] Maybe I'm missing something, but why not simply inspect and clean input to ensure that it's always properly escaped and safe to send to your database? It

Re: [PHP] counting hyperlink clicks in php

2007-02-20 Thread Fergus Gibson
Brad Bonkoski wrote: I think the best way to do this would be to set an onClick (Javascript) event handler for each of the links, and then use AJAX style stuff to send the information to PHP on the server side, then PHP can log the link that was clicked, and keep track of the most clicked

Re: [PHP] css in mail()

2007-02-20 Thread Fergus Gibson
Sancar Saran wrote: $mail= html head titleTitle/title style.$data./style /head body Html content /body /html; I stopped being a designer quite a long time ago, and I never learned how to compose HTML e-mail because I think it's a blight. I do, however, work with some

[PHP] Re: Change in 5.2.1 re. parsing of URL

2007-02-20 Thread Fergus Gibson
Lewis Kapell wrote: http://www.mydomain.com/mypage.php/phonypage.pdf In this example there is a PHP script called mypage.php which serves up a PDF. Putting the extra text at the end of the URL makes it appear to the user's browser that the URL ends with '.pdf' rather than '.php'. We

[PHP] Re: re another hand wringer

2007-02-20 Thread Fergus Gibson
jekillen wrote: for($i = 0; $i $flen; $i++) // now it works { array_push($edata, $_POST[a_$z]); print $_POST[a_$z].'br'; // prints all values. $z++; }; I recommend you consider changing your loop to: for ($i = 1;

[PHP] Re: WHERE problem

2007-02-20 Thread Fergus Gibson
How about this instead, Mike? ?php // some code $fortune = mysql_query(SELECT text FROM fortunes ORDER BY RAND() LIMIT 1); $fortune = mysql_fetch_row($fortune); $fortune = sprintf( 'span class=quotecycquot;%squot;br /-Omniversalism.com/span', $fortune[0] ); // some more code ? MySQL is

Re: [PHP] Re: Change in 5.2.1 re. parsing of URL

2007-02-20 Thread Fergus Gibson
Lewis Kapell wrote: We are already using the Content-type header (I should have mentioned that in my first message). Hmmm. So you have a PHP script that sets the mimetype correctly and then outputs straight PDF data, but the user's browser does not accept it as a PDF because the extension of