RE: [PHP] Create PDFs with a strict layout automatically

2007-11-26 Thread Bastien Koert

you could also look at http://www.digitaljunkies.ca/dompdf/
 
bastien CC: php-general@lists.php.net From: [EMAIL PROTECTED] To: [EMAIL 
PROTECTED] Date: Tue, 27 Nov 2007 12:16:45 +0900 Subject: Re: [PHP] Create 
PDFs with a strict layout automatically  On 27 Nov 2007, at 11:51, Chris 
wrote:   There are a few packages you can use.   
http://pear.php.net/package/File_PDF  http://www.fpdf.org/   are two I 
know of, I'm sure there are more.  Thanks! The built-in PDFlib functions 
didn't seem to appealing, but  FPDF looks pretty good. I'll certainly play 
around with it to see what  it can do, but right of the bat it seems that 
templates aren't  supported the way I would like them to. Importing a PDF is 
possible,  but apparently they can only be treated like images.  Chrs, Dav 
 --  PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_
Have fun while connecting on Messenger! Click here to learn more.
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger

RE: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Bastien Koert

My approach to multi lang abilities uses the following db structure
 
base_name is the input field name and the basic raw label for the field
lang_1
lang_2
...
lang_12
prompt_1
prompt_2
...
prompt_12
 
since i currently need to support 12 languages in the initial concept
 
when the user signs on, i equate the language to an offset on the table to be 
able to pull the correct language out of the tables. I have the prompts in 
there to provide prompts for input fields as required. These values are then 
input thru a translation interface. Using the interface, i build up 
translatable values for the controls as well, where items like radio buttons 
and selects are done in the following manner
 
base_name   
 lang_1  lang_2   ...  lang_n

 salutation 
  Salutation Salut   something
base_name.db_value_1 = first option  mr 
Mister  Monsiour   
base_name.db_value_2 = second option  mrs   
 Mrs Madam
...
base_name.db_value_n = n option
 
Then for each option value i have a function that pulls the the correct values 
and builds the options list for each control type
 
 
Our final step to improve perfomance (note that this is, sadly, ASP / vbscript 
) was to take the translation table into an XML application level object to 
cache the data since its relatively immutable. 
 
Now when I write this same app in php, I am more likely to skip the caching 
portion of this in favor of templating the forms for each language. I would use 
a folder for each language.
 
hth
 
bastien
 
 To: php-general@lists.php.net From: [EMAIL PROTECTED] Date: Tue, 27 Nov 
 2007 15:18:45 + Subject: [PHP] Re: Newbie asks about multi-lingual 
 website strategies  Jeff Benetti wrote:  I'm a noob so keep the comments 
 to a noob's level please.I am doing a website and my client wants the 
 bulk of the text to be  bilingual (French and English). The last site I did 
 used php and mysql so I  am getting comfortable with that technology. 
 Typically I am using a single  php file and my menu constantly points to 
 the same file with different id  options example index.php?id=30 and I 
 want to use the same idea to choose  a language example 
 index.php?lang=frid=30. Pretty straight forward for  many of you folks 
 but before I start reinventing the wheel I wondered if  anyone could offer 
 any suggestions. I have a couple of approaches in mind.1: Session 
 vars, I have never used this but it seems straight forward.  Drawbacks?  
 2: Cookies again not too big a deal, never used cookies either but it  
 doesn't seem to be mystifying however the fact that the user can turn  
 cookies off makes me not want to go this route.  3: Use the mysql database 
 and log each ip address and record the preference  and maybe the last time 
 on the site. I am leaning in this direction because  I think it is the most 
 robust but will it be slow? First I have to get the  ip then I have to 
 check to see if it is in my data base and then get the  language 
 preference. It would be great to have a standardized function that  I could 
 use on all of my sites. I live in a bilingual country (Canada) so  this 
 could be a real selling point for my services.Any any and all 
 comments are welcome, it will be a learning curve no matter  which route I 
 take so a little advice on the best direction pros cons would  be great.  
   And of course knowing that I will have many many thousands of people on 
 my  site (hee hee) which option will perform best once I start 
 accumulating  vistors. That's one problem I see with the mysql solution, I 
 think it may  start to be slow unless I start purging vistors who have not 
 shown up in a  while or limit the number of entries.   First of all you 
 can use the browser supplied language preferences (if available) to try and 
 guess the users preferred language. It should be obvious from phpinfo() and 
 a half decent browser what vars you need to inspect ($_SERVER['HTTP_LANG'] 
 or something like that - can't remember of hand!).  You could do soemthing 
 like: 1. Check session for lang preference and use it. 2. Regardless of the 
 result of 1, check GET for a preference and store in session if present and 
 use it. 3. If neither 1 nor 2 has any preference, use the browser supplied 
 preference. 4. If nothing else, use a hard coded default.OK, that 
 selection taken care of :)   For hard coded strings in your PHP code use 
 Gettext and bind to standard your catalog files and use the language choice 
 from the above algorithm. xgettext can extract strings from PHP files easily 
 enough. You just have to make sure you write

RE: [PHP] Question about authenticating people...

2007-11-27 Thread Bastien Koert

adding a client name to the login process might make that easier 
 
and it forces a sort of 2 factor authentication making the database 'hopefully' 
harder to crack
 
bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Tue, 27 
Nov 2007 15:30:32 -0500 Subject: [PHP] Question about authenticating 
people...  The subject might be a little misleading... But I couldn't think 
of  how better to describe it in a small sentence :)  What I'm wondering is, 
I have a program that accesses a database and  displays the info in that 
database... I know, nothing revolutionary  about it... I plan on setting up a 
database per customer who uses my  system, and what I would like to do is have 
everyone go to the same  address to login... Such as:  raoset.com/oldb/ they 
enter their username/password and get redirected  to their site... Or at least 
pull up their database...  Now that I'm typing this out, I may have thought 
of away to do this...  Set the main page, so that when you login, it accesses 
a master  database, which has the username, password, and database name stored 
 in it. Write the database name to a session variable, which I could  then 
use in my mysql connect file for the database  Does that make sense? 
Thoughts? Problems? RTFM's? :)   --  Jason Pruim Raoset Inc. Technology 
Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com 
[EMAIL PROTECTED]  --  PHP General Mailing List (http://www.php.net/) To 
unsubscribe, visit: http://www.php.net/unsub.php 
_
Express yourself with free Messenger emoticons. Get them today!
http://www.freemessengeremoticons.ca/?icid=EMENCA122

RE: [PHP] PHP RFC # 0001 --- List Etiquette

2007-11-28 Thread Bastien Koert

Makes sense to me...

Count me in

bastien

 Date: Wed, 28 Nov 2007 10:48:57 -0500
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: [PHP] PHP RFC # 0001 --- List Etiquette
 
 Good morning (/afternoon/evening) all;
 
 This is more or less an RFC-type email, hence the subject line.  I
 would like to see your comments on this case, and maybe we can forge
 some sort of agreement or unofficial treaty or something.
 
 Oftentimes we see a user post a question to the list, with ongoing
 discussion back-and-forth on a troublesome issue, and when a solution
 is found, the subject line has an added [SOLVED] tag on it.  While
 this makes sense in a forum style arena, where posts are binded
 statically in the same group, it defeats the purpose of mailing list
 archives such as Nabble and GMANE.  A recent email from this morning
 illustrates the problem, as displayed presently at this page:
 http://www.nabble.com/PHP---General-f140.html
 
 The email  with the subject The PHP License received commentary
 from both Jochem Maas and myself, and the OP (AmirBehzad Eslami)
 replied to the message, appending the [SOLVED] tag to the subject.
 This is not a serious issue in this particular matter, as it was a
 simple thank-you message out of politeness (which is greatly
 appreciated, Amir!).  However, using just a single example should help
 to emphasize my point exponentially when you consider the frequency of
 occurrences we see following the [SOLVED]-appended route.
 
 On 12 September, 2007, Zbigniew Szalbot posted a message to the
 list about a segmentation fault in PHP 5.2.3.  Over the next 24
 hours-plus, exactly sixty comments passed back-and-forth on the
 thread.  When a solution was found, it was posted in a separate email
 with the [SOLVED] tag added to the subject line, and two additional
 comments added to that (entirely new) thread.
 
 Why is this such a critical issue?  Because if we hope not to have
 to answer the same questions over and over again, instructing people
 to properly STFW, then we should at least be contributing to proper
 archival and documentation of problems we've successfully solved.
 Using the aforementioned example, we check Google for the same
 problem:
 
 
 http://www.google.com/search?q=php+5.2.3+segmentation+fault+core+dumped
 
 Hooray!  Someone else has had the exact same list of problems, and
 now I can simply go through all of the responses and it should
 (fingers crossed!) correct my issues as well.
 
 Message 58 59 getting close! sixty-one WHAT?!?  No
 solution?  Back to Google only to find that each result is exactly
 the same discussion, never including the final three emails.
 
 So the summary of my proposal is as follows:
 
 1.) An issue has been identified with the list whereby
 improper archival will likely lead to repeat questions and unnecessary
 traffic to the list.
 2.) I propose that we discontinue the act of subject
 modification to indicate a change in status of the issue (SOLVED,
 ALSO, ANOTHER PROBLEM, etc.) unless a completely different problem is
 reached or question is asked.  This will allow a step-by-step document
 (of sorts) to be created and made searchable on the web.
 
 
 
 Comments welcomed!
 
 -- 
 Daniel P. Brown
 [office] (570-) 587-7080 Ext. 272
 [mobile] (570-) 766-8107
 
 If at first you don't succeed, stick to what you know best so that you
 can make enough money to pay someone else to do it for you.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

_
Express yourself with free Messenger emoticons. Get them today!
http://www.freemessengeremoticons.ca/?icid=EMENCA122
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] zip codes and lat/longs

2007-12-05 Thread Bastien Koert

hate to say it,but there is lots on google like
 
http://www.code322.com/zipcode_locator.php
 
bastien Date: Wed, 5 Dec 2007 20:58:52 -0500 To: php-general@lists.php.net 
From: [EMAIL PROTECTED] Subject: [PHP] zip codes and lat/longs  Hi gang:  
I'm entertaining how to determine what zip codes fall within a 50  mile radius 
of another zip code.  Anyone done this before?  Also, does anyone have any 
sources for zip codes and lat/long databases?  TIA for any help/suggestions. 
 Cheers,  tedd --  --- http://sperling.com http://ancientstones.com 
http://earthstones.com  --  PHP General Mailing List (http://www.php.net/) 
To unsubscribe, visit: http://www.php.net/unsub.php 
_
Discover new ways to stay in touch with Windows Live! Visit the City @ Live 
today!
http://getyourliveid.ca/?icid=LIVEIDENCA006

RE: [PHP] Uploading a file through PHP form

2007-12-13 Thread Bastien Koert

Hi Ron,
 
http://www.php.net/manual/en/features.file-upload.php is the page
 
its pretty simple
 
Bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Thu, 13 
Dec 2007 21:03:00 -0500 Subject: [PHP] Uploading a file through PHP form  
How do you upload a file using PHP? Also what is the web page which describes 
the procedure on php.net ? Thanks, Ron  --  PHP General Mailing List 
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_
Exercise your brain! Try Flexicon!
http://puzzles.sympatico.msn.ca/chicktionary/index.html?icid=htmlsig

RE: [PHP] Gathering data

2007-12-13 Thread Bastien Koert

Database...in either case the data that is being searched on makes it to the 
server...just store the search term in a table in the db
 
bastien To: php-general@lists.php.net From: [EMAIL PROTECTED] Date: Sat, 17 
Nov 2007 19:40:14 -0600 Subject: [PHP] Gathering data  Hi,  I have a web 
site where the customer can look for some info based on a destination either 
by making a click on a link or entering the destination name in a field in a 
html form  What is the best way to store that sort of info ? meaning that I 
want to store the event of making a click on a certain link OR entering the 
destination in the field and hitting the search button, I would like to know 
how many hits a link has or how many times the same (or similar) text was 
entered  Any recommendation on how to make this happen ?  Regards, 
Eduardo  --  PHP General Mailing List (http://www.php.net/) To unsubscribe, 
visit: http://www.php.net/unsub.php 
_
Read what Santa`s been up to! For all the latest, visit 
asksantaclaus.spaces.live.com!
http://asksantaclaus.spaces.live.com/

RE: [PHP] how to handle inserting special characters into a mysql field

2007-12-14 Thread Bastien Koert

use mysql_real_escape_string
 
bastien 
 Date: Fri, 14 Dec 2007 08:40:47 -0600 From: [EMAIL PROTECTED] To: 
 php-general@lists.php.net Subject: [PHP] how to handle inserting special 
 characters into a mysql field  I'm going to be inserting data from a PHP 
 form into a mysql field. The  data could contain special characters like   
 '  \ /, etc. How do I  handle that? just $data = 
 addslashes(htmlspecialchars($data)); before  the insert query? because later 
 on the data will be read back from the  mysql db and I don't want it to 
 contain a special character that would  break the PHP script.  --  PHP 
 General Mailing List (http://www.php.net/) To unsubscribe, visit: 
 http://www.php.net/unsub.php 
_
Introducing the City @ Live! Take a tour!
http://getyourliveid.ca/?icid=LIVEIDENCA006

RE: [PHP] Sending SMS via PHP

2007-12-23 Thread Bastien Koert

Sending proper SMS messges requires that you use an SMS gateway or buy a 
cellular modem. SMS is essentially XML will the message body limited to 160 
characters.

do some googling to get more information

bastien

 Date: Sun, 23 Dec 2007 08:30:29 +0330
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: [PHP] Sending SMS via PHP
 
 Hi,
 
 How can i send SMS messages via PHP? How can i set SMS-headers (UDH)?
 Does anyone know some article/class/package about this issue?
 
 Thank you in advance,
 -b

_
Discover new ways to stay in touch with Windows Live! Visit the City @ Live 
today!
http://getyourliveid.ca/?icid=LIVEIDENCA006
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] html to doc and pdf ??

2007-12-23 Thread Bastien Koert

PDF is easy, there are many packages and classes that can convert the html to 
PDFs. A quick google will give you lots of results like

www.fpdf.org
http://www.digitaljunkies.ca/dompdf/

etc

word docs will be harder to create

bastien
_
Discover new ways to stay in touch with Windows Live! Visit the City @ Live 
today!
http://getyourliveid.ca/?icid=LIVEIDENCA006
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] First stupid post of the year.

2008-01-02 Thread Bastien Koert

if you need to make the button wider, just style it with css and leave the 
value to be what it needs to be
 
input type='text' width='100px' value='Submit' name='submit' Date: Wed, 2 
Jan 2008 13:34:43 -0500 To: php-general@lists.php.net From: [EMAIL 
PROTECTED] Subject: [PHP] First stupid post of the year.  Hi gang:  I have 
a  $submit = $_POST['submit'];  The string contains:  nbsp; nbsp; 
nbsp; nbsp;Anbsp; nbsp; nbsp; nbsp;  (it's there to make a submit 
button wider)  How can I strip out the nbsp; from the $submit string 
leaving A?  I've tried  trim($submit);  but, that don't work.  
Neither does:  $submit = str_replace('nbsp;','',$submit);  or this:  
$submit = str_replace(' ';','',$submit);  I should know what to do, but in 
this case I don't.  Help is always appreciated.  Cheers,  tedd  --  
--- http://sperling.com http://ancientstones.com http://earthstones.com  
--  PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_
Use fowl language with Chicktionary. Click here to start playing!
http://puzzles.sympatico.msn.ca/chicktionary/index.html?icid=htmlsig

RE: [PHP] mysql date question

2008-01-03 Thread Bastien Koert

no need for quotes
 
select date_format(contract.length_start, '%m-%d-%Y') as length_start from 
contract where user_id = 1;
 
bastien
 Date: Thu, 3 Jan 2008 08:30:55 -0600 From: [EMAIL PROTECTED] To: 
 php-general@lists.php.net Subject: [PHP] mysql date question  I have a 
 field in mysql as shown by describe contract;  | length_start | date | YES 
 | | NULL  | |  Which stores it in the mysql format of -MM-DD. However, 
 I need the  output of my select statement to show it in MM-DD- format. I 
 can  select it to see the date in the field:  select length_start from 
 contract where user_id = 1; +--+ | length_start | 
 +--+ | 2006-01-12 | +--+ 1 row in set (0.00 sec) 
  so then I do my date_format() select statement, but it returns a NULL  
 value. Why?  select date_format('contract.length_start', '%m-%d-%Y') as 
 length_start  from contract where user_id = 1; +--+ | 
 length_start | +--+ | NULL | +--+ 1 row in set, 1 
 warning (0.00 sec)  --  PHP General Mailing List (http://www.php.net/) To 
 unsubscribe, visit: http://www.php.net/unsub.php 
_
Discover new ways to stay in touch with Windows Live! Visit the City @ Live 
today!
http://getyourliveid.ca/?icid=LIVEIDENCA006

RE: [PHP] handling ' with mysql/php insert and select

2008-01-03 Thread Bastien Koert

lots of ways to handle this
 
use HTMLentities($string) to convert the apostrophes
use addslashes($string) to escape them
use mysql_real_escape_string($string) to escape them
 
the last is my preferred method
 
 
bastien Date: Thu, 3 Jan 2008 13:22:09 -0600 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: [PHP] handling ' with mysql/php insert and 
select  In my form, I am parsing all the text inputs through  
mysql_real_escape_string() before inserting the data. however, when I  look at 
the SQL query in PHP, when I type the word blah's to my text box  variable, 
and then insert it into mysql after being ran through  
mysql_real_escape_string(), it does:  insert into contract (contract_id, 
responsibility) VALUES (15, 'blah\\\'s')  and when I query the in mysql/PHP 
it shows:  select responsibility from contract where contract_id = 15; 
++ | responsibility | ++ | blah\'s | 
++ 1 row in set (0.00 sec)  and when I run that select 
statement in PHP it prints blah\'s on the  screen. I want it to print back 
blah's without the \. So what are my  options? run every variable through 
stripslashes(); before printing  them to the screen?  --  PHP General 
Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_
Read what Santa`s been up to! For all the latest, visit 
asksantaclaus.spaces.live.com!
http://asksantaclaus.spaces.live.com/

RE: [PHP] which window?

2008-01-05 Thread Bastien Koert

this would be an html / js issue...

why have a popup login in this case? just show the logon in the main window and 
then do the redirect...


bastien



 To: php-general@lists.php.net
 From: [EMAIL PROTECTED]
 Date: Sat, 5 Jan 2008 10:17:55 -0800
 Subject: [PHP] which window?
 
 Hello;
 I have a login panel that is opened as a javascript window.
 In the processing script, a successful login  uses the
 header function to send the user to the restricted content
 index page.
 But this page is loading into the javascript window instead
 of the opener window of the browser. Is it possible to supply
 a target property to the header() function to display
 content in a specific window? Or is that strictly an html/javascript
 issue? I have looked into the header() function but it is unclear
 to me what all can be done with headers.
 Thanks in advance for suggestions, info;
 Jeff K
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

_
Use fowl language with Chicktionary. Click here to start playing!
http://puzzles.sympatico.msn.ca/chicktionary/index.html?icid=htmlsig
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHTML files showing as blank pages

2008-01-05 Thread Bastien Koert

Andy,

try this

AddHandler php5-script .php .phtml
#AddType text/html .php .phtml
AddType application/x-httpd-php .php .phtml  .html .htm


bastien



 Date: Sat, 5 Jan 2008 14:39:49 +
 To: php-general@lists.php.net
 From: [EMAIL PROTECTED]
 Subject: [PHP] PHTML files showing as blank pages
 
 Hi,
 
   I'm having a problem getting .phtml files to display in a web browser. I
 can successfully display a test.php page as per PHP install instructions but
 the phtml files show up blank
 (in firefox or IE).
 
 I have added these entries to my apache httpd.conf:
 
 LoadModule php5_modulemodules/libphp5.so
 AddHandler php5-script  .php .phtml
 AddType text/html   .php .phtml
 #AddType application/x-httpd-php .php .php3 .php4 .phtml (I tried with this
 uncommented too and without the previous entry)
 AddType application/x-httpd-php-source .phps
 
 My system is: Apache/2.2.6 (Unix) PHP/5.2.5
 
 
 The phtml files I am having the problem with are from an opensource project
 called CDRTool
 I believe other people can run this app fine so I believe my issue is a prob
 with apache/php
 (also because I've never configured apache/php before so its a fair shout
 Ive done something
 wrong! :P)
 
 The one thing that looks odd to me as someone who hasnt done this before is
 that all
 the phtml files start with a line:
 
  
 Anyway, hopefully its an easy one to fix if ur an expert! Any help
 appreciated!
 
 thanks in advance, Andy.
 
 
 Message sent using UK Grid Webmail 2.7.9
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

_
Read what Santa`s been up to! For all the latest, visit 
asksantaclaus.spaces.live.com!
http://asksantaclaus.spaces.live.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] fgetcsv

2008-01-09 Thread Bastien Koert

http://ca.php.net/manual/en/function.fgetcsv.php
_
Discover new ways to stay in touch with Windows Live! Visit the City @ Live 
today!
http://getyourliveid.ca/?icid=LIVEIDENCA006
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP SOAP Client formats

2008-01-09 Thread Bastien Koert

XML is case sensitive. I notice the case of the xml is different. Try making 
the PHP created xml the same case.
 
Bastien Date: Wed, 9 Jan 2008 13:54:36 -0800 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: [PHP] PHP SOAP Client formats  Hi all,  
ok, I am a little bit new to the SOAP game, but I understand it, and am  using 
it to talk to an outside API.  The problem that I have is that the server 
that I am talking to (that is  not in my control), will accept the following 
SOAP call  ?xml version=1.0 encoding=utf-8? soap:Envelope 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body 
AuthenticateTest xmlns=https://api.authorize.net/soap/v1/; 
merchantAuthentication namename/name 
transactionKeystring/transactionKey /merchantAuthentication 
/AuthenticateTest /soap:Body /soap:Envelope   But it refuses a call 
that I have made using the SOAPClient PHP classes  that look like this :  
?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope 
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:ns1=https://api.authorize.net/soap/v1/; SOAP-ENV:Body 
ns1:AuthenticateTest merchantAuthentication namename/name 
transactionKeystring/transactionKey /merchantAuthentication 
/ns1:AuthenticateTest /SOAP-ENV:Body /SOAP-ENV:Envelope  It appears 
that the one that PHP creates is all in line with all of the  latest 
standards, and I know that the server is a Microsoft IIS server.  Does anyone 
know any parameters that I can use with the PHP SOAP client  that could help 
me contruct the request like the top one???  I don't want to have to build 
the text myself, and open a socket and  send the text manually like I did to 
verify that the top one works, and  the bottom one doesn't.  Thanks,  
Tim. 
_
Use fowl language with Chicktionary. Click here to start playing!
http://puzzles.sympatico.msn.ca/chicktionary/index.html?icid=htmlsig

RE: [PHP] Encryption failing

2008-01-15 Thread Bastien Koert

are you base64 encoding the resultant encryption string? I have found that 
there are problems with certain characters that can result from the encryption, 
usually a combination of characters that approximate a null or end of line
 
bastien From: [EMAIL PROTECTED] Date: Tue, 15 Jan 2008 21:41:45 -0600 To: 
php-general@lists.php.net Subject: Re: [PHP] Encryption failing   On Jan 
15, 2008, at 7:06 PM, Casey wrote:   Maybe you could echo the results of 
the failed ones and compare.  I did that at first, thinking that something 
about these strings  might cause the problem. But then I realized: I can't 
blame the  data. I don't have any control over what users use for passwords, 
for  example. this thing is supposed to en/decrypt the strings I gige it,  so 
there must be some kind of programming flaw.  FWIW, there was no discernible 
pattern to the failed strings, at  least not to me. (Not that it matters.)  
Ken  --  PHP General Mailing List (http://www.php.net/) To unsubscribe, 
visit: http://www.php.net/unsub.php 
_



RE: [PHP] Scripts are fast locally, but slow on remote server

2008-01-16 Thread Bastien Koert

memory limitation in the php ini?
 
bastien
 Date: Wed, 16 Jan 2008 16:29:53 +0900 From: [EMAIL PROTECTED] To: [EMAIL 
 PROTECTED] CC: php-general@lists.php.net Subject: Re: [PHP] Scripts are 
 fast locally, but slow on remote server  Per Jessen,  Thank you for 
 responding.   Might this be a name-server issue?   Maybe, but I don't 
 think so. The reason I suspect that is not the case  is because I can go 
 first to a .html page on the server, and it loads up  quickly. Then I go to 
 one of my .php pages, and the slowdown occurs.  If it were a name server 
 issue, I would expect the slowdown to happen  regardless of which page I 
 load first.  So, I guess to be more specific, the slowdown happens the 
 first time I  load one of my PHP scripts on this site, not the first time I 
 access the  site.  --  Dave M G  --  PHP General Mailing List 
 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_



RE: [PHP] a better way to do a data import?

2008-01-21 Thread Bastien Koert

what about uploading the entire file into a [semi]temp table..then doing cross 
table comparisons to load your main table with the data?
 
bastien Date: Mon, 21 Jan 2008 13:08:27 -0500 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: Re: [PHP] a better way to do a data 
import?  I think that's possible, so I'll give it a shot.  For some reason, 
even with straight inserts my php script is dying around 180,000 rows. 
Basically, I took out all the compare/update code so now I grab the row from 
the db and if there isn't one, do an insert. I've wiped my db so should do 
straight inserts so I'm not sure what's taking up the memory.private 
function processFile($table, $key){  $this-openFileForReading(); //foudn in 
GLFile class while (!feof($this-fileHandle)) { $file_data = 
fgets($this-fileHandle);  $this-insert($table, $key, $file_data);  } 
$this-closeFile();  }  private function insert($table, $key, $data){ if 
(strlen($data)10) return false;  $data=$this-db-escape_string($data);  
//this is the data we will use should we need to do an insert $insert_data = 
str_replace(\, ', $data);  //this is a hack we need to change the 
separator of the file //we need this because we need to put the data into an 
array and if //we simply use the comma, then it splits address fields $data = 
str_replace(\,\, ~, $data); $data = str_replace(\,,$data); //let's 
remove the double quotes $this-setDelimiter(~); 
$dataToArray=$this-stringToArray($data); //set it back for other functions 
$this-setDelimiter(,);  //get the id, we trust it is the first column   
$key_data=$dataToArray[0];  //does the value exist in the database already? 
$sql=select * from prelim_$table where $key='$key_data'; 
$handle=$this-db-select($sql); if ($this-db-row_count($handle)0){ 
$textData=array(); $colsToUpdate=; $dataRow=; 
$dataRow=$this-db-fetch_row($handle); //now that we have the data, let's 
merge the row from the //file with the column names  
$textData=array_combine($this-carrierColumns, $dataToArray); //cast some 
values that are strings in the text file $textData['cars1']=(int) 
$textData['cars1']; $textData['car_amount']=(int) $textData['car_amount'];  
$textData['total_work']=trim($textData['total_work']);  
$textData['business_zip']=trim($textData['business_zip']); //clean up some old 
db data $dataRow['rfc_number']=trim($dataRow['rfc_number']);  
$dataRow['business_zip']=trim($dataRow['business_zip']);
$colsToUpdate=array_diff($textData,$dataRow);  //if we have columns to 
update, do it if (count($colsToUpdate)0){  $colset=; foreach 
($colsToUpdate as $column=$value){ $colset.=$column='$value',; } //strip 
last comma $colset=substr($colset, 0, -1); $sql=update prelim_$table set 
$colset where $key='$key_data'; $this-db-write($sql);  }  
$dataRow=NULL; $colsToUpdate=NULL; $colset=NULL; $textData=NULL; } else{ 
 //insert the row $sql=insert into prelim_$table values (; 
$sql.=trim($insert_data); $sql.=);; $this-db-write($sql); } } 
  On Jan 21, 2008 12:55 PM, Robert Cummings [EMAIL PROTECTED] wrote:   
 On Mon, 2008-01-21 at 12:35 -0500, blackwater dev wrote:   I have a text 
file that contains 200k rows. These rows are to be  imported   into our 
database. The majority of them will already exists while a few  are   new. 
Here are a few options I've tried: I've had php cycle through the 
file row by row and if the row is there,   delete it and do a straight 
insert but that took a while. Now I have php get the row from the 
text file and then to array_combine  with   a default array I have in the 
class so I can have key value pairs. I  then   take that generated array 
and do array_diff to the data array I pulled  from   the db and I then 
have the columns that are different so I do an update  on   only those 
columns for that specific row. This is slow and after about   180,000 rows, 
php throws a memory error. I'm resetting all my vars to  NULL   at each 
iteration so am not sure what's up.   Anyone have a better way to 
do this? In MySQL, I could simply a replace  on   each row...but not in 
postgres.   Does Postgres support any method of temporarily disabling 
keys/indexing?  Indexing is what causes the inserts to take a while. MySQL 
can optimize  an import by locking the table and allowing the keys/indexes to 
be  temporarily disabled. You'll see the following lines in recent MySQL  
database dumps surrounding the inserts:   /*!4 ALTER TABLE `xxx` 
DISABLE KEYS */;  INSERT ...  INSERT ...  /*!4 ALTER TABLE `xxx` 
ENABLE KEYS */;   Cheers,  Rob.  --  
...  SwarmBuy.com - 
http://www.swarmbuy.com   Leveraging the buying power of the masses!  
...  
_



RE: [PHP] Best Approach

2008-01-21 Thread Bastien Koert

sure, why notyou can exec most of the commands and log all of the results 
to a file that you can email yourself

bastien


















 Date: Mon, 21 Jan 2008 17:55:11 -0600
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: [PHP] Best Approach
 
 Hello fellow members of this list,
 
 There is a couple of rutinary tasks that our servers (different platforms)
 perform during the night. Early during the day, we have to check that every
 task was performed correctly and without errors. Actually, we do this by
 hand, going first to server A (AIX platform), and verifying that the error
 logs files have a size of zero (0), which means that there were no errors to
 report on the logs, verify that some files have been written to a specific
 directory and so on. As I told you before, this is done by hand, many ls
 commands, grep’s and more’s here and there!!
 
 On the other hand, I have to do this on a another Windows 2003 server!!
 
 So, I’m thinking on creating a web page on PHP that performs all this tasks
 for me, and my fellow co-workers. But, all my experience with PHP is about
 working with data on MySQL server, wrting files to a harddisk, sending
 e-mails with or without attachments and so on.
 
 Is PHP a correct approach to solve this tedious problem?? Can I access a
 servers and get the results of a ls command for instance??
 
 Best Regards,
 
 __
 Miguel Guirao Aguilera, Linux+, ITIL
 Sistemas de Información
 Informática R8 - TELCEL
 Ext. 7540
 

_

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Verification number

2008-01-24 Thread Bastien Koert

google mod10 checksum
 
bastien
 Date: Thu, 24 Jan 2008 12:37:20 +0100 From: [EMAIL PROTECTED] To: 
 php-general@lists.php.net Subject: [PHP] Verification number  Hi  Sorry 
 if this is considered off topic. Please ignore the post in that case.  My 
 site uses ten digit numbers as ID:s for our products. I would like  the last 
 digit to be a verification/check digit. I was just about to  just make some 
 simple function that would add the other values together  into a one digit 
 verification digit. But I thought maybe there are  better or worse ways of 
 doing this, since some algorithms probably  produce a more even distribution 
 of verification digits than others do.  I.e. it would be a shame if I later 
 on notice that half of my ID:s get  9 as verification.  Any ideas?  
 Regards Emil  --  PHP General Mailing List (http://www.php.net/) To 
 unsubscribe, visit: http://www.php.net/unsub.php 
_



RE: [PHP] Rename

2008-01-24 Thread Bastien Koert

http://ca3.php.net/manual/en/function.copy.php
 
make the manual your friend
 
bastien Date: Thu, 24 Jan 2008 14:36:55 -0600 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: [PHP] Rename  Does anyone know if there 
is a way to move all the files in one directory into another?  Thanks,  
-- Steve M.
_



RE: [PHP] PHP and LDAP Authentication

2008-01-24 Thread Bastien Koert

htmlentities?
 
urlencode?
 
 
bastien Date: Thu, 24 Jan 2008 15:20:44 -0600 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: [PHP] PHP and LDAP Authentication  
Hello,  I have encountered a situation where a user password Contains a 
space in it (in the middle). I am looking for A way to send that password 
through ldap_bind() Correctly. So far no luck.  Can you give me any 
suggestions?  John J. Sutton Sr. Programmer/Analyst 371-4872 (office) 
773-4550 (cell) 
_



RE: [PHP] Help looking for inventory software

2008-01-30 Thread Bastien Koert

check for code / systems on
 
www.hotscripts.com
http://sourceforge.net
 
hth
 
bastien Date: Wed, 30 Jan 2008 19:14:57 +0100 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: [PHP] Help looking for inventory software 
 Hello,  I am sorry if this is appropriate but does anyone know php based, 
open source solution that would enable me to put a system handling inventory 
(books, booklets). I work for a charity and we are archiving our old products 
by making a digital archive. So far we have been doing it in Excel but I would 
really like to move it to a relational database (like mysql).  Have been 
googling around for solution but without much luck. Anyway, it does not have 
to be an inventory project. Even a modular system that would allow me to 
design and generate php files, would be really, really helpful.  Sorry if 
this is wrong group to be asking such a question.  Thank you in advance for 
any pointers!  Zbigniew Szalbot  --  PHP General Mailing List 
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_



RE: [PHP] Resetting a session variable

2008-02-03 Thread Bastien Koert

unset($_SESSION['var_name']);



bastien



 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Date: Sun, 3 Feb 2008 13:14:47 -0500
 Subject: [PHP] Resetting a session variable
 
 What is the command to reset a session variable --- essentially deleting
 all of the values it contains?  Ron
 
 -- 
 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] flash with PHP

2008-02-04 Thread Bastien Koert

try asking on www.flashkit.com
 
bastien Date: Mon, 4 Feb 2008 07:45:25 +0200 From: [EMAIL PROTECTED] To: 
[EMAIL PROTECTED] CC: php-general@lists.php.net Subject: Re: [PHP] flash with 
PHP  FlashKnowledge = 0; phpKnowledge = 1;  I remember some time back 
finding a class for php and a class/unit/addon  for flash that allowed 
communication between php file and flash files,  just google for it  Clive 
 Alain Roger wrote:  Hi,   i would like to have a flash menu in my PHP 
website.  this is no problem.   My problem is how to exchange data 
between PHP andFlash (in both direction).  i found a lot of posts on this 
theme, but nothing with really works under  ActionScript 3 and PHP.   
does anyone already solved such topic ?   thx. --  PHP General 
Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_



RE: [PHP] PHP Source code protection

2008-02-06 Thread Bastien Koert

zend encoder?
 http://sourceforge.net/projects/php-screw/
 
 
google for more
 
 
 
bastien To: php-general@lists.php.net From: [EMAIL PROTECTED] Date: Wed, 6 
Feb 2008 12:28:12 +0100 Subject: [PHP] PHP Source code protection  Hi,  
I'm building a C# application that connects to a server that has PHP scripts  
on it.  We need to deliver the complete solution to a firm, the C# is no 
problem  because it is compiled...  But PHP is a problem bacause it is 
interpreted and we will have to deliver  pure, unprotected script...  Is 
htere a way to secoure my code so when they put it on the server, they  can't 
see it!  Thank You!   --  PHP General Mailing List (http://www.php.net/) 
To unsubscribe, visit: http://www.php.net/unsub.php 
_



RE: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Bastien Koert

Select * from wine where name = 'Silver Oak' GROUP BY wineid,size
 
 
bastien Date: Wed, 6 Feb 2008 17:46:52 -0800 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: [PHP] PHP/mySQL question about groups  
Let's say I have a PHP-based wine application, and it's taking a set of mySQL 
data that looks like this:  wineid name size  123 Silver Oak 750ML 123 
Silver Oak 1.5L 123 Silver Oak 1.5L 456 Liberty School 750ML 456 Liberty 
School 750ML 456 Liberty School 750ML 456 Liberty School 1.5L   If I do 
a:  Select * from wine where name = 'Silver Oak' GROUP BY 'wineid'  I'd 
get:  Silver Oak   However, what I'd REALLY like to return is:  Silver 
Oak 750ML Silver Oak 1.5L  I'd like the groupby to group by wineid, BUT ALSO 
separate the groups by 'size'. So there'd be a '750ML' group, and a '1.5L' 
group  Can anyone tell me how I'd do that? I'm hoping I don't have to write a 
PHP script that loops through the results and separates things manually.  -- 
 PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_



RE: [PHP] Template system in PHP

2008-02-12 Thread Bastien Koert

smarty?
 
bastien
 
 Date: Tue, 12 Feb 2008 14:01:11 +0400 From: [EMAIL PROTECTED] To: 
 php-general@lists.php.net Subject: [PHP] Template system in PHP  Hi, I 
 need to develop a website, but my management is rather unstable in his 
 vision for the layout. I'm thinking of developing the components as classes 
 and functions, and then use a template system to render the layout. If the 
 management wishes to change the layout, I'll just have to modify my template 
 and the jobs' done.  Do any of you guys  gurls know of a way to implement 
 that template system.  (The best one I know of is that of Wordpress)  
 Regards, Xavier de Lapeyre Web Developer  --  PHP General Mailing List 
 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_



RE: [PHP] Fwrite Function

2008-02-16 Thread Bastien Koert

Its a text file and so doesn't support markup. You could write out html into 
the file that does mark it up and could be displayed to the user via the 
browser...or you could use regex or str_replace to mark up certain text on the 
read of the file to display to the user


bastien




 Date: Sat, 16 Feb 2008 14:03:26 +0200
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: [PHP] Fwrite Function
 
 Hello,
 
 Can you please help me, I am writing code where I create a file and write to
 it from a form on a webpage and then read and display this file on the
 webpage.
 I want to change the color of the text that is written to the file.
 Do you know how I can do this?
 
 This is some of my code if you need clarification:
 * $boardFile = MessageBoard.txt;
 $boardFileHandle = fopen($boardFile,'a') or die(can't open file);
 fwrite($boardFileHandle, $name);
 fwrite($boardFileHandle, $talk);
 fclose($boardFileHandle);
 }
 $boardFile = MessageBoard.txt;
 $boardFileHandle = fopen($boardFile,r);
 $talkR = fread($boardFileHandle, filesize($boardFile));
 fclose($boardFileHandle);
 echo $talkR;*
 **
 **
 Thanks

_

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-16 Thread Bastien Koert

char(14) is a better data type

bastien



 Date: Sat, 16 Feb 2008 15:22:17 -0800
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: [PHP] PHP/mySQL dropping zeros after inserting number into record
 
 I've got a PHP script that inserts 00012345678 into a record in a mySQL 
 database (it's a barcode).  Things work ok unless the number has preceding 
 zeros, and then the zeros get cut off and all I get is 12345678.
 
 I have the mySQL database fieldtype set to bigint(14).  If the maximum length 
 a barcode can be is 14, is there a better fieldtype to use that will keep the 
 zeros?
 
 (or some way for PHP to tell mySQL not to chop off the zeros?)
 
 -- 
 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] Protected ZIP file with password

2008-02-18 Thread Bastien Koert

Hey, what about placing the unzipped folder into a dir that has a process 
watching it that will pick up the file, zip and protect it and then ftp (or 
another delivery mechanism) to the destination?
 
Bastien
 Date: Mon, 18 Feb 2008 08:59:02 -0300 From: [EMAIL PROTECTED] To: [EMAIL 
 PROTECTED] CC: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: 
 [PHP] Protected ZIP file with password  Nick,  Thanks again for your 
 worry. So, let's go, here goes my situation. I'm exporting data to another 
 system. That system have an option to be feed by a password protected zip 
 file. The export activity will be occur in this way: the user will generate 
 the file on my application and will put this file into that another system. 
 So, I need generate that file. Maybe one solution is to generate the file 
 unzipped and determine that user should zip the file with password on his 
 Windows or Linux operating system. But, I can't let that responsibility on 
 user hands. So, because that I need to generate the file already protected. 
  PS: Sorry my bad english. I'm Brazilian and I'm not fluent english.  
 Thanks one more time, Petrus Bastos.  On Feb 18, 2008 12:26 AM, Nick 
 Stinemates [EMAIL PROTECTED] wrote:   Petrus Bastos wrote:   Chris, 
 Thanks for your help, but I think that package can't make what I  
 want.   But , I appreciate your help anyway and if you have any other 
 ideas,  please   let me know! :) Thanks,   Petrus Bastos. 
 On Feb 17, 2008 10:38 PM, Chris [EMAIL PROTECTED] wrote:
Petrus Bastos wrote: Unfortunately I don't have access 
 to this family of methods because security policy. 
 Lefting this way out, I didn't find anyway on how to do that.  If
  you have any idea or know any module can do that, I'll 
 appreciate to know too! See if the pear package does 
 what you want: http://pear.php.net/package/File_Archive
  --   Postgresql  php tutorials   http://www.designmagick.com/  
 I'm sure you know what you're doing, but maybe you'd be 
 better off  letting us know the task / process to better understand what 
 you'd like  to accomplish. From there, since it's obvious that PHP does not 
 have  built in password functions, and that exec() is out of the question; 
  maybe we can figure out how to move onward.   --  == 
  Nick Stinemates ([EMAIL PROTECTED])  http://nick.stinemates.org   
 AIM: Nick Stinemates  MSN: [EMAIL PROTECTED]  Yahoo: [EMAIL PROTECTED]  
 ==   
_



RE: [PHP] More than one values returned?

2008-02-18 Thread Bastien Koert

return an array
 
bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Tue, 19 
Feb 2008 10:31:02 +0900 Subject: [PHP] More than one values returned?  Hi, 
  Is it possible to return more than one values in PHP?  return $x; 
return $y;  They don't work for me.  -T  --  PHP General Mailing List 
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_



RE: [PHP] mysql input

2008-02-18 Thread Bastien Koert

mysql_real_escape_string()
addslashes()
htmlentities()
 
take your pick
 
 
bastien
 From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Mon, 18 Feb 
 2008 23:05:10 -0500 Subject: [PHP] mysql input  I have a user saving a 
 VARCHAR(255) field in a mysql db which has  single quotes in the text, how 
 can i replace them so that they dont  fuck up my mysql command?  -e  -- 
  PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
 http://www.php.net/unsub.php 
_



RE: [PHP] mysql input

2008-02-19 Thread Bastien Koert

I agree, but they all provide some level of handling just might not be the 
'most correct' way of handling it
 
bastien Subject: RE: [PHP] mysql input From: [EMAIL PROTECTED] To: [EMAIL 
PROTECTED] CC: [EMAIL PROTECTED]; php-general@lists.php.net Date: Mon, 18 Feb 
2008 23:31:21 -0500   On Mon, 2008-02-18 at 23:19 -0500, Bastien Koert 
wrote:  mysql_real_escape_string()  addslashes()  htmlentities()
take your pick  That's a bad answer. If he's using MySQL then he SHOULD use 
mysql_real_escape_string(). None of the other functions will fully protect him 
from malicious input.  Cheers, Rob. --  
.. | InterJinn 
Application Framework - http://www.interjinn.com | 
:: | An 
application and templating framework for PHP. Boasting | | a powerful, 
scalable system for accessing system services | | such as forms, properties, 
sessions, and caches. InterJinn | | also provides an extremely flexible 
architecture for | | creating re-usable components quickly and easily. | 
`' 
_



RE: [PHP] Re: mysql input

2008-02-19 Thread Bastien Koert

thats awesome
 
bastien To: php-general@lists.php.net Date: Tue, 19 Feb 2008 11:21:02 + 
From: [EMAIL PROTECTED] Subject: Re: [PHP] Re: mysql input  Zoltán Németh 
wrote:  2008. 02. 19, kedd keltezéssel 11.03-kor Nathan Rixham ezt írta:  
Richard Heyes wrote:  Shawn McKenzie wrote:  nihilism machine wrote: 
 I have a user saving a VARCHAR(255) field in a mysql db which has single 
 quotes in the text, how can i replace them so that they dont fuck up my 
 mysql command?   -e   Have you tried: 
dont_fuck_up_my_mysql_command()  Hrmph, I can't seem to find that in the 
manual...   it's been depricated I heard in favour of unfuck();
 as I remember its also in SPL.  $whatever = new 
MySqlCommandUnFucker($command);  $whatever-unFuck();:D
greets  Zoltán Németh  ?php  class MySqlCommandUnFucker {  public 
function _unfucker($toUnFuck) { if(function_exists('get_magic_quotes_gpc')) { 
if (get_magic_quotes_gpc()) { $in = stripslashes($toUnFuck); } } return 
$in; }  public function unFuck($fucked) { 
if(function_exists('mysql_real_escape_string')) { return 
mysql_real_escape_string($this-_unfucker($fucked)); } else { return 
$fucked; } } } ?   usage: $unfucker = new MySqlCommandUnFucker; $sql 
= $unfucker -unFuck($sql);  :)  --  PHP General Mailing List 
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_



RE: [PHP] PHP To an EXE Executable for Win32 ( Is it possible)

2008-02-21 Thread Bastien Koert

www.roadsend.com ?


bastien

 To: php-general@lists.php.net
 From: [EMAIL PROTECTED]
 Date: Thu, 21 Feb 2008 14:16:55 -0700
 Subject: [PHP] PHP To an EXE Executable for Win32 ( Is it possible)
 
 I know that there's apparently some way to compile PHP to make it run 
 faster.  But has anyone come up with a system to turn PHP scripts into an 
 .exe?  What I mean is you would run the exe and see exactly the same thing 
 as if you were viewing the script through a webbrowser, but without having 
 to install php.
 
 What is the name of this?
 
 - Dan 
 
 -- 
 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] Deleting all rows in a database every 24 hours?

2008-02-22 Thread Bastien Koert

cron
 
bastien To: php-general@lists.php.net From: [EMAIL PROTECTED] Date: Fri, 22 
Feb 2008 07:28:58 +0100 Subject: [PHP] Deleting all rows in a database every 
24 hours?  The title says it all, how do I perform an action every 24 hours? 
 Thank you.   --  PHP General Mailing List (http://www.php.net/) To 
unsubscribe, visit: http://www.php.net/unsub.php 
_



RE: [PHP] Re: temporary error

2008-02-22 Thread Bastien Koert



 To: php-general@lists.php.net
 Date: Sat, 23 Feb 2008 00:14:27 +
 From: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: temporary error
 
 tedd wrote:
 At 3:58 PM -0500 2/22/08, Robert Cummings wrote:
 On Fri, 2008-02-22 at 14:49 -0600, Greg Donald wrote:
  On 2/22/08, Daniel Brown  wrote:
  So help me God

  Speaking of imaginary things, check out this new site I built few 
 weeks back:

  http://rewriteproject.com/

  I do believe I am the first person to ever tag cloud a bible  :)

 That's pretty funny... but why rewrite a great fantasy?
 
 Not meaning to start a religious debate or what's real and what isn't 
 with regard to the Bible, but the other day I was thinking about proof 
 for God's existence.
 
 Shouldn't the reason why we ask if be sufficient proof that it is?
 
 Take the other side of that coin -- if God didn't exist, would we be 
 asking? I imagine there are a great number of things that don't exist 
 that we never mention -- so why this one?
 
 All rhetorical comments -- no need to reply. We all have different 
 beliefs -- whatever gets you through.
 
 Just offered as food for thought.
 
 Cheers,
 
 tedd
 
 Going to reply anyways..
 
 I think grass is proof, as in blades of grass - there are billions per 
 square foot, and they are all grass, not half baked weird 
 grass/*something else* mixes, but all grass - to me thats proof of 
 creation, and therefore proof of a creator, thus god.
 
 god's like wind, can't see it but it still blows your bin over so you 
 know it's there.
 
 shoulda posted on php-religion *shrugs*
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

I think the existance of god is more like the MS interoperability 
proposals...everyone talks about it, but no one has any real proof ;-)

bastien
_

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Flash menu

2008-02-23 Thread Bastien Koert



 Date: Sat, 23 Feb 2008 09:38:17 -0500
 To: php-general@lists.php.net
 From: [EMAIL PROTECTED]
 Subject: Re: [PHP] Flash menu
 
 At 9:46 AM +0100 2/23/08, Alain Roger wrote:
 Hi,
 
 i have a problem with my animated web flash menu (+images+sounds).
 basically my menu in embedded into flash, and each time that i click on menu
 link, my flash is playing from start as it is integrated into each PHP
 pages.
 I know that this is not the topic of this forum, but i would like to know
 how you cope with such issue from PHP point of view ?
 
 i mean, did you play the flash menu on first page (like index.php e.g.) and
 after you have another menu, or do you use it through your complete website
 ?
 basically i found a lot of flash templates but nothing about PHP pages menu
 integration.
 
 I guess several of you have already done it so i need just your feedback on
 possible solutions.
 thanks a lot.
 
 --
 Alain
 
 Windows XP SP2
 PostgreSQL 8.2.4 / MS SQL server 2005
 Apache 2.2.4
 PHP 5.2.4
 C# 2005-2008
 
 I never use Flash for anything functional.
 
 It can be a nice enhancement or visual aid, but never reply on it to 
 do anything -- especially a menu. Instead, use css or css with php.
 
 Cheers,
 
 tedd
 
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Since the issue is that a page reload forces the movie to start over, i can see 
three options...

1. use frames (not recommended for a variety of reasons, but the top frame w/ 
your menu won't need to reload and keeps its place)
2. get into ajax and try not to reload the entire page that often
3. pass a variable into the movie each time the page loads, so that it knows 
what frame its on, kinda like a counter or placemarker to keep the continuity 
correct.


bastien

_



RE: [PHP] validate + if

2008-02-23 Thread Bastien Koert

 From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Sat, 23 Feb 
 2008 16:01:08 -0300 Subject: [PHP] validate + if  Hi list!I have a 
 form.  I validated it with javascript.  Do the validation, but send the 
 form information.  How can I prevent send the information and stay in the 
 form?  When validate all correctly send the info, but if the form isn’t 
 complete correctly don’t send.Thanks!+ _ // Emiliano 
 Boragina _  // Diseño  Comunicación // + _  // [EMAIL 
 PROTECTED] / // 15 40 58 60 02 /// + _   
Return false from the form validation if it fails and call if with the form's 
onSubmit function
 
form onsubmit=return validate();
 
returning false will stop the submission
 
bastien
_



RE: [PHP] Shopping Carts

2008-02-24 Thread Bastien Koert

 To: php-general@lists.php.net Date: Sun, 24 Feb 2008 09:43:20 -0600 From: 
 [EMAIL PROTECTED] Subject: Re: [PHP] Shopping Carts   questions and help 
 out people who try and stumble...  I'm less likely to help someone who 
 tries to stumble.  -Shawn  --  PHP General Mailing List 
 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
 
I usually stumble after too much beer ;-)
 
bastien
_



RE: [PHP] PHPTriad and php error

2008-02-24 Thread Bastien Koert

 To: php-general@lists.php.net Date: Sun, 24 Feb 2008 20:53:03 +0200 From: 
 [EMAIL PROTECTED] Subject: [PHP] PHPTriad and php error  hi to all, I set 
 up phptriad on my computer running windows xp. When I tried to  test php 
 with the following program I got an error Parse error: parse  error, 
 expecting `','' or `';'' in C:\apache\htdocs\mytest.php on line 10  
 html head titlePHP Test/title /head body pThis is an HTML 
 line p ?php  echo “This is a PHP line”; phpinfo(); ? 
 /body/html  what is the reason?  p.s. phpinfo.php which comes with 
 the installation executes correctly.  --  PHP General Mailing List 
 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
 
Use proper quotes (single or double as long as you are consistent) to wrap the 
text. That is what the error is telling you.
 
Note that when using quotes, double quotes will eveluate php variables 
correctly, while single quotes treat them as text.
 
bastien
_



RE: [PHP] PHPTriad and php error

2008-02-24 Thread Bastien Koert

This is a good place, other include various forums and the manual
 
bastien To: php-general@lists.php.net Date: Sun, 24 Feb 2008 21:21:01 +0200 
From: [EMAIL PROTECTED] Subject: Re: [PHP] PHPTriad and php error  thanks 
for the help. I am a C/C++ programmer and decide to learn php and  mysql to 
develop web pages. is it the correct place to ask questions  similar to this? 
or is there any other group suitable for this?  --  PHP General Mailing List 
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_



RE: [PHP] More than one values returned?

2008-02-26 Thread Bastien Koert

 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: 
 php-general@lists.php.net Date: Tue, 26 Feb 2008 10:40:34 -0500 Subject: 
 Re: [PHP] More than one values returned?   On Tue, 2008-02-26 at 10:32 
 -0500, tedd wrote:  At 1:08 PM -0500 2/25/08, Daniel Brown wrote:  On 
 Sat, Feb 23, 2008 at 6:21 AM, Robert Cummings [EMAIL PROTECTED] wrote:   
  On Fri, 2008-02-22 at 18:13 -0500, tedd wrote:He said your 
 narratives, not your jokes. ;) Besides, if you gave up 
 programming and took up comedy, both professions would suffer.   
 How's that for a backhanded compliment? :-) Thanks for 
 the... I mean ouch, I mean thanks for the compli... no ouch,   bah, you 
 and your double speak. Tedd's message was the last email I saw 
 before I left for the  weekend. And perhaps it was through my 
 visualization from his words  (physically backhanding Rob while whispering 
 sweet nothings in his  ear), but I cracked up by which I mean I 
 literally laughed out  loud. And still today, it makes me chuckle.
 --  /Dan  Does that mean if I took up comedy and gave up 
 programing that both   professions would benefit?This reminds me of 
 when I commented to a friend that I swim everyday   but still can't seem to 
 lose the weight I want. He replied Look at   whales, they swim all the 
 time and don't lose weight.I understood his point, but didn't like 
 the metaphor.  No point blubbering about it.  Cheers, Rob. --  
 .. | InterJinn 
 Application Framework - http://www.interjinn.com | 
 :: | An 
 application and templating framework for PHP. Boasting | | a powerful, 
 scalable system for accessing system services | | such as forms, properties, 
 sessions, and caches. InterJinn | | also provides an extremely flexible 
 architecture for | | creating re-usable components quickly and easily. | 
 `'  --  PHP 
 General Mailing List (http://www.php.net/) To unsubscribe, visit: 
 http://www.php.net/unsub.php 
 
Now, thats funny
 
;-)
 
bastien
_



RE: [PHP] How do you send stylized email?

2008-02-26 Thread Bastien Koert

send an html email...
 
if you are looking to send calendar events, you could look at using the vcal or 
ical standards
 
plain text emails you can't do much with other than separate sections with 
dashes or asteriks
 
 
bastien
 
 
 Date: Tue, 26 Feb 2008 09:28:06 -0500 To: php-general@lists.php.net From: 
 [EMAIL PROTECTED] Subject: [PHP] How do you send stylized email?  Hi 
 gang:  I want to send a styled email via heredoc, can that be done?  
 $message = EOT Title: This is a title of the Event. Time: This the time 
 of the Event.  Please show up on time. EOT  mail('[EMAIL PROTECTED]' , 
 'An Event' , $message);  If so, how do you style it?  If not, how do you 
 send stylized email?  Cheers,  tedd --  --- http://sperling.com 
 http://ancientstones.com http://earthstones.com  --  PHP General Mailing 
 List (http://www.php.net/) To unsubscribe, visit: 
 http://www.php.net/unsub.php 
_



RE: [PHP] checking for and enforcing https

2008-02-26 Thread Bastien Koert



 Date: Tue, 26 Feb 2008 17:39:13 -0500
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: Re: [PHP] checking for and enforcing https
 
 On Tue, Feb 26, 2008 at 04:46:38PM -0500, Daniel Brown wrote:
 
 Of course, getting into that is a completely different discussion
 from the post made by the OP whom, as it appears, gave up and took
 off when Tedd *hijacked* his thread.  ;-P
 
 No, I've been reading all the posts and have learned and implemented.
 
 Works great.
 
 I've had nothing to add although I've been somewhat annoyed by the
 excessive quoting.
 
 -- 
 The most important thing in life is not simply to capitalize on your
  gains. Any fool can do that. The important thing is to profit from your
  losses. That requires intelligence, and makes the difference between a
  man of sense and a fool. -- Dale Carnegie
 Rick Pasotto[EMAIL PROTECTED]http://www.niof.net
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Now thats excessive quoting  ;-)

Bastien
_

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Are these Truthful Proof about PHP ??

2008-02-27 Thread Bastien Koert

 Date: Wed, 27 Feb 2008 14:28:30 -0600 From: [EMAIL PROTECTED] To: [EMAIL 
 PROTECTED]; [EMAIL PROTECTED] CC: php-general@lists.php.net Subject: RE: 
 [PHP] Are these Truthful Proof about PHP ??  [snip]  I thought ASP was 
 the language and .NET was the framework.  I was under this impression as 
 well.. I always equated .NET to ASP the same way I would ZEND to PHP... 
 [/snip]  Think of ASP like you would JBoss or Tomcat - it is an 
 application server. Most folks used VBScript as the language back in the 
 day  --  PHP General Mailing List (http://www.php.net/) To unsubscribe, 
 visit: http://www.php.net/unsub.php 
 
 
Back in the day???
 
Damn it, My boss said we were bleeding edge
 
Work is ASP, but for anything else, its PHP all the way
 
Bastien
_



RE: [PHP] Are these Truthful Proof about PHP ??

2008-02-27 Thread Bastien Koert

Nah, I try to keep the 2.0 subtle, where its just cool...some others here use 
it as a shotgun to kill the fly...just to say the product does it...
 
bastien


Date: Wed, 27 Feb 2008 16:26:01 -0500From: [EMAIL PROTECTED]: [EMAIL 
PROTECTED]: Re: [PHP] Are these Truthful Proof about PHP ??CC: [EMAIL 
PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] not 
bleeding edge unless it's web2.0 ;)
On Wed, Feb 27, 2008 at 4:22 PM, Bastien Koert [EMAIL PROTECTED] wrote:
 Date: Wed, 27 Feb 2008 14:28:30 -0600 From: [EMAIL PROTECTED] To: [EMAIL 
 PROTECTED]; [EMAIL PROTECTED] CC: php-general@lists.php.net Subject: RE: 
 [PHP] Are these Truthful Proof about PHP ??  [snip]  I thought ASP was 
 the language and .NET was the framework.  I was under this impression as 
 well.. I always equated .NET to ASP the same way I would ZEND to PHP... 
 [/snip]  Think of ASP like you would JBoss or Tomcat - it is an 
 application server. Most folks used VBScript as the language back in the 
 day  --  PHP General Mailing List (http://www.php.net/) To unsubscribe, 
 visit: http://www.php.net/unsub.phpBack in the day???Damn it, My boss said 
 we were bleeding edgeWork is ASP, but for anything else, its PHP all the 
 wayBastien_
_



RE: [PHP] Guidance

2008-02-27 Thread Bastien Koert

UK? I was hoping for Windsor Ontario Canada


bastien




 CC: php-general@lists.php.net
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Date: Wed, 27 Feb 2008 22:21:59 +
 Subject: Re: [PHP] Guidance
 
 On 27 Feb 2008, at 21:50, Shawn McKenzie wrote:
 Shawn McKenzie wrote:
 Stut wrote:
 I've interviewed more than my fair share of web developers who
 couldn't reverse an array without using array_reverse if their life
 depended on it. Sometimes it really does scare me!

 So my experience is that there are far more web developers out there
 than software engineers who do web development, and it's getting  
 harder
 to find decent software engineers to do web-based work at a  
 reasonable
 price. The good ones are rare - so rare in fact that I'm having  
 trouble
 finding one at the moment. If anyone considers themselves a software
 engineer rather than a web developer and would like a job in Windsor
 drop me a note.

 Job! Now!

 foreach($array as $k = $v) {
$reversed[$v] = $k;
 }
 $array = $reversed; //optional
 No wait!
 
 Yeah, nice try ;)
 
 Anyways, I assume you're based in the US somewhere so unless you're  
 considering emigrating to the UK you were never in the running.
 
 -Stut
 
 -- 
 http://stut.net/
 
 -- 
 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] Can PHP do this? -- w/o using event handler

2008-03-03 Thread Bastien Koert

sure, user curl (www.php.net/curl)
 
bastien
 
 
 Date: Mon, 3 Mar 2008 15:57:19 +0800 From: [EMAIL PROTECTED] To: 
 php-general@lists.php.net Subject: [PHP] Can PHP do this? -- w/o using event 
 handler  Could PHP do..  1. Connect and send a parameter to a remote 
 host 2. Wait for the host to reply -- not using event handler 3. Send XML 
 data to the host  --  Louie Miranda ([EMAIL PROTECTED]) 
 http://www.axishift.com  Security Is A Series Of Well-Defined Steps chmod 
 -R 0 / ; and smile :)
_



RE: [PHP] GPS Locator

2008-03-04 Thread Bastien Koert

http://www.phpclasses.org/browse/package/3507.html
 
bastien Date: Tue, 4 Mar 2008 10:18:15 -0600 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: [PHP] GPS Locator  Howdy group!  I know 
that this is not a PHP question (but it will work with a PHP app) but I 
thought I would ask the smartest group of people I know if they have any clue 
or would be familiar with a device I can use. I need to purchase a small GPS 
receiver/antenna that will plug into a USB port. Then I need to access the 
port (Ajax? Java?) while in my web application to deliver the coordinates to 
my PHP application. That will give me the physical location of the machine 
accessing the application.  Any insight will be valuable.  --  PHP General 
Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_



RE: [PHP] SESSIOn when cookies are disabled

2008-03-07 Thread Bastien Koert

 Date: Fri, 7 Mar 2008 23:45:51 +0530 From: [EMAIL PROTECTED] To: 
 php-general@lists.php.net Subject: [PHP] SESSIOn when cookies are disabled 
  Hi all  how can we manage session variables when cookies are disabled.  
 --  Have A pleasant Day Chetan. D. Rane Location: India Contact: 
 +91-9986057255 other ID: [EMAIL PROTECTED] [EMAIL PROTECTED]
 
 
pass the session id in the URL or add it as a hidden field 
 
 
Bastien
_



RE: [PHP] I'm prepared to feel like an idiot... But I just simply need the answer :)

2007-08-01 Thread Bastien Koert

I have had success in running CLI php pages from a bat file fired via a 
scheduled task. Since the output can be limited I would suggest adding some 
logging functionality to the page to trap errors and write them to a file that 
you can use to analyze any issues.
 
bastien To: php-general@lists.php.net From: [EMAIL PROTECTED] Date: Wed, 1 
Aug 2007 08:49:34 -0400 Subject: [PHP] I'm prepared to feel like an idiot... 
But I just simply need the answer :)  Hi All :)  I have a php script that I 
am attempting to run from the CLI to  connect to a MySQL database and update a 
field. but when I run it  with this command: php cronjob.php it prints out the 
script on screen  but doesn't process it...  Running: php-rphpinfo(); 
prints out the standard phpinfo screen..  and I don't think I should have to 
write it differently to make it  run from the command line right?  HELP! I'm 
desperate... I would offer to name my first born after  you... But he's 
already been born :)   --  Jason Pruim Raoset Inc. Technology Manager 
MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL 
PROTECTED]  
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

RE: [PHP] DOMDocument - loadHTML() cuts off html input

2007-08-01 Thread Bastien Koert

Is there a quote in the data?
 
That is the usual culprit in my situations like that...
 
bastien
 Date: Wed, 1 Aug 2007 10:54:59 +0200 From: [EMAIL PROTECTED] To: 
 php-general@lists.php.net Subject: [PHP] DOMDocument - loadHTML() cuts off 
 html input  Hey List,  In my application, I am loading html content into 
 a DOMDocument using  loadHTML(). The DOMDocument is validated, then the 
 element with a  certain ID tag is extracted and loaded into a node in the 
 main  DOMDocument, which is then presented as html with saveHTML().  This 
 works fine and has worked fine for relatively large pages  (containing 
 several select lists with up to 400 options in total).  The problem I am 
 now facing is a page with a single, relatively large  select list, i.e. 
 some 330 options. The html is generated as expected. However when I load it 
 into a  DOMDocument and saveHTML(), the select list is cut off to about 30  
 options. The remainder of the html content dissappears and instead, the 
 remaining open tags are closed, presumably by  DOMDocument's saveHTML() 
 method.  Any ideas as to why this behaviour is occurring and how to fix it 
 ? Further information available if needed.  Thanks in advance,  Stijn  
 --  PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
 http://www.php.net/unsub.php 
_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE

RE: [PHP] Problem with php mail

2007-08-05 Thread Bastien Koert

Can you post the headers that you are using...they play a role how the message 
is viewed by the receiving agent

bastien





 Date: Sat, 4 Aug 2007 21:06:53 -0700
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: [PHP] Problem with php mail
 
 Hi Everyone,
 I'm having problem with php mail.  When I try to create an html message 
 with only mydomain, gmail is registering it as a spam while yahoo is not.  
 Can you suggest solutions to my problem.
 
 Thanks,
 Jason
 
 
 
 Send instant messages to your online friends http://uk.messenger.yahoo.com 

_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Problems in php

2007-08-07 Thread Bastien Koert

This is the proper behavior for php. its supposed to only send the html down to 
the client

bastien





 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Date: Tue, 7 Aug 2007 20:09:51 +0700
 Subject: [PHP] Problems in php
 
 Dear Sirs,
 I have installed a Sambar 64 server and PHP 4.7 plus MySql. I connect through 
 localhost and the PHPINFO.php file works OK on IE and Firefox. PHPINFO.php 
 shows that the php.ini file is situated in C:/Windows as advised and I have 
 altered the error_log and extensions_dir as advised by Sambar.
 The problem is:
 When I try to run a php file, either to connect to MySql OR just a simple 
 Create Button file, neither browser will output either file. I get no error 
 messages and the error logs show nothing significant. I just get the html 
 source code (NONE of the php code) when I interrogate 'view source' in IE and 
 just a blank in Firefox.
 Can you please advise. I don't know where to look next. I attach the two test 
 files for your perusal.
 Best regards
  Roger Collis

_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Check if var has a date (timestamp or regular)

2007-08-08 Thread Bastien Koert

Other options include
 
using a date calendar widget (js) to fill the field
splitting the date field into three separate selects and building the date on 
the server from those three elements
 
Bastien From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; 
php-general@lists.php.net Date: Wed, 8 Aug 2007 16:50:39 +0530 Subject: RE: 
[PHP] Check if var has a date (timestamp or regular)  Hi,  You need to 
check with your submitted data as in which format it is. Try with different 
combination for splitting the string (include -, / while splitting string). If 
input string works with split then assume input string as in above format. 
Otherwise simple, consider it as in timestamp.  But I suggest if some user is 
entering the date then let them insert the date as you want. Just mention 
(mm/dd/) after the text field and it will solve your problem  Warm 
Regards, Sanjeev http://www.sanchanworld.com/ 
http://webdirectory.sanchanworld.com -Original Message- From: OOzy 
Pal [mailto:[EMAIL PROTECTED]  Sent: Monday, August 06, 2007 5:22 PM To: PHP 
Subject: [PHP] Check if var has a date (timestamp or regular)  How can I 
check an inputed date if it is a valid date and if it is in the form of a 
timestamp or regular date such as (22-07-2007 or 22/07/2007)  --  OOzy 
Ubuntu-Feisty  --  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 
_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us

RE: [PHP] magic quotes

2007-08-09 Thread Bastien Koert

you could use ini_set at the top of the script to turn the magic quotes 
off...if you add this in a prepend file or a common included file that sits at 
the top of the script, it should take care of the damn magic quotes...
 
failing that ask your host to turn it off
 
Bastien From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: 
php-general@lists.php.net Date: Wed, 8 Aug 2007 23:58:50 -0500 Subject: RE: 
[PHP] magic quotes  I added the code to my script and I still ended up 
escaped quotes. if(ini_get('magic_quotes_gpc')) $_POST['data'] = 
stripslashes($_POST['data']); Didn't work at all. I think I read something 
about it not working on runtime data. Like gpc if this is correct do you have 
another solution? I put this line in the .htaccess file it didn't work either: 
php_flag magic_quotes_gpc off... Is there anyway possible? I don't need it now 
but it'd be nice to know for the future dev.  Kevon K. Hayes 815-980-3435 
RFD, IL  -Original Message- From: Richard Lynch [mailto:[EMAIL 
PROTECTED]  Sent: Wednesday, August 08, 2007 11:49 PM To: k3cheese Cc: 
php-general@lists.php.net Subject: RE: [PHP] magic quotes  .htaccess is only 
meaningful for Apache.  JavaScript is equally useless to Ajax for working 
around Magic Quotes.  On Wed, August 8, 2007 7:55 am, k3cheese wrote:  
Thanks,   Met javascript not ajax. I had AJAX on the brain do to a project 
I'm  working  on. So I'm assuming there is a library of functions to use 
with the  .htaccess file? Cause it looks like you can use UNIX and PHP to 
edit  this  file?   Kevon K. Hayes  815-980-3435  RFD, IL   
-Original Message-  From: Richard Lynch [mailto:[EMAIL PROTECTED]  
Sent: Tuesday, August 07, 2007 11:30 PM  To: KVIGOR  Cc: 
php-general@lists.php.net  Subject: Re: [PHP] magic quotes   On Tue, July 
31, 2007 9:28 am, KVIGOR wrote:  If magic quotes is on and I dont have 
access to the php.ini.   Is there any way I can strip quotes from the 
form field with out  using  AJAX?   Best: Use .htaccess to turn 
magic_quotes off.  Okay: Use something like if (ini_get('magic_quotes_gpc')) 
$data =  stripslashes($data);  Worst: Ajax cannot possibly begin to address 
this issue and is  completely useless to solve this particular problem.   
--  Some people have a gift link here.  Know what I want?  I want you 
to buy a CD from some indie artist.  http://cdbaby.com/browse/from/lynch  
Yeah, I get a buck. So?   No virus found in this incoming message.  
Checked by AVG Free Edition.  Version: 7.5.476 / Virus Database: 269.11.6/938 
- Release Date:  8/5/2007  4:16 PMNo virus found in this outgoing 
message.  Checked by AVG Free Edition.  Version: 7.5.476 / Virus Database: 
269.11.6/938 - Release Date:  8/5/2007  4:16 PM --  Some people 
have a gift link here. Know what I want? I want you to buy a CD from some 
indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?  
No virus found in this incoming message. Checked by AVG Free Edition.  
Version: 7.5.476 / Virus Database: 269.11.8/941 - Release Date: 8/7/2007 4:06 
PM   No virus found in this outgoing message. Checked by AVG Free Edition. 
 Version: 7.5.476 / Virus Database: 269.11.8/941 - Release Date: 8/7/2007 
4:06 PM   --  PHP General Mailing List (http://www.php.net/) To 
unsubscribe, visit: http://www.php.net/unsub.php 
_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us

RE: [PHP] simplexml_load_file()

2007-08-11 Thread Bastien Koert

switch to an underscore comment_id instead

bastien





 Date: Fri, 10 Aug 2007 23:03:19 +0100
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: [PHP] simplexml_load_file()
 
 Hello,
 
 I'm doing an script which it'll read the xml values, but I have one
 problem doing that.
 
 On the xml there is a tag that has an hífen in the middle, so when I do
 echo $xml-comment-id it gives me an error.
 
 How can I make this work?
 
 Thanks in advantage.

_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] www.soongy.com

2007-08-14 Thread Bastien Koert

Looks nice, but you need to have it adapt to screen resolutions...the fixed 
size of the page doesn't allow for scrolling etc...does not fit well on a 
1400x900 laptop screen
 
bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Tue, 14 
Aug 2007 20:15:27 +0500 Subject: [PHP] www.soongy.com  Hello,I am 
Gevorg.   I just wanted to introduce you my new PHP based work here 
www.soongy.com http://www.soongy.com/ .  It is working on PHP and MySQL 
and here is used DHTML, AJAX.Thank you very much.Waiting for 
your response Regards,  Gevorg   
_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

RE: [PHP] QuickTime question

2007-08-15 Thread Bastien Koert

Can't you just embed embed  the file in the page?
 
   object  classid=clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B  
codebase=http://www.apple.com/qtactivex/qtplugin.cab;  height=256  
width=320   param  name=src  value=?php  echo  
./vids/$file  ?   param  name=autoplay  value=true   
param  name=controller  value=true   embed  
height=256  width=320  src=?php  echo  ./vids/$file  ?  
pluginspage=http://www.apple.com/quicktime/download/;  type=video/quicktime  
controller=true  autoplay=true   /object
 
bastien Date: Wed, 15 Aug 2007 11:25:43 -0400 To: php-general@lists.php.net 
From: [EMAIL PROTECTED] Subject: [PHP] QuickTime question  Hi gang:  
Given:  http://www.webbytedd.com/bb/ice/  How can I play the movie inside 
the page instead of going to another page?  I know that I could use 
phpclasses, but that seems an overkill.  I think something like this --  
$file_source = 'ice-fishing.mov'; $size = filesize($file_source,,);  
header('Pragma: public'); header('Last-Modified: '.gmdate('D, d M Y H:i:s').' 
GMT'); header('Cache-Control: must-revalidate, pre-check=0, post-check=0, 
max-age=0'); header('Content-Transfer-Encoding: none'); header(Content-type: 
video/quicktime); header(Content-Length:  . $size);  -- but it's falling 
short.  Thanks for any help.  Cheers,  tedd  --  --- 
http://sperling.com http://ancientstones.com http://earthstones.com  --  PHP 
General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

RE: [PHP] adding Back to Search results link

2007-08-15 Thread Bastien Koert

what about hadding the search form elements to the results page and letting the 
users search right from there
 
bastien To: php-general@lists.php.net From: [EMAIL PROTECTED] Date: Wed, 15 
Aug 2007 15:44:46 -0500 Subject: Re: [PHP] adding Back to Search results 
link  Jim and Brad.  Thanks for the feedback. I was thinking it was 
something simple like a back  button. But the problem that arises when I use 
this method is on Form 3.  If I go through the steps, and make a change to an 
item on Form 3. Then use  the a href=javascript:history.go(-2);Return to 
search  results/a.everything works fine. But if I dont make any changes 
to Form 3. then this takes me all the way  back to the search page.  People 
in my group use this form to update database information for a number  of 
items. Once they make changes, they would like to go back to the search  
results, instead of having to run the same search again and again. 
Jim Lucas [EMAIL PROTECTED] wrote in message  news:[EMAIL PROTECTED]  
Derek Moon wrote:  I am trying to imporve a web application that my group 
uses.   Basically there are 3 forms that work together Form 1  form 2 
  Form 1 - searchs for enterend values  Form 2 - returns search 
results, letting you individually select any item  Form 3 - lets you edit a 
specific individual item   I want to make a link on the Form 3 that 
returns you to form Form 2  basically a Back to Search results link.  
 I'm thinking that there is a way to pass the query string, but I am a   
newbie and I'm not sure that I am going about this the right way.   
Anyone have any advice or knowledge to share?   I would personally just use 
the back button. Isn't that what it is there   for?   But seriously, if 
you changed the method on Form 1 to use get instead of   post, you could then 
just have a button that sends you back 1 in your   history, or 2 in this 
case.  ...  ...   Actually wait, it would be 3   form 1 - results 
- edit - save changes -\  \--/   hope the 
format is correct on my ascii art :)   nope, now that I read it again, it 
is only 2 back in the history   So something like this for the back button 
  a href=javascript:history.go(-2);Return to search results/a   
That should do   GUIDE LINES FOR USE OF METHOD in forms  POST Only use 
post when you are submitting a form  that will change the data that you are 
submitting   GET Use this for forms that do not change get, but  only 
retrieve data. --   Jim Lucas   Some men are born to 
greatness, some achieve greatness,  and some have greatness thrust upon 
them.   Twelfth Night, Act II, Scene V  by William Shakespeare   --  
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline

RE: [PHP] About Session And Cookies

2007-08-17 Thread Bastien Koert

If cookies are not available, you can either
 
hide the id in the hidden form field element
or
enable trans_sid to automatically pass the session id in the url
 
bastien From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; 
php-general@lists.php.net Date: Fri, 17 Aug 2007 17:03:54 -0700 Subject: RE: 
[PHP] About Session And Cookies  Kelvin,  Sessions is just one of the items 
recommended for an e-commerce website. I seem to recall that if cookies were 
not enabled that there was a way of passing the session id in the URL as a 
Get parameter.  Basically you will store the items to be purchased in a 
special table and a shopper ID or cart ID number will be assigned with the 
first selected item and needs to be retained to be able to recall the selected 
items when the shopper is ready to check out. A session variable is a good 
place to store this id, but it could also be passed in the form as a hidden 
field. A session is also a convenient way of providing a generic storage of 
the items to be purchased, separate table is possibly more common. You don't 
have to be too concerned about security up to the point where someone begins 
to check out when you begin gathering personal information from the buyer. 
Give it some thought, but I suspect in most cases that if someone were to 
capture a session at this point, the worse that could happen is they would 
both order and pay for the same items.  When you gather personal information 
it becomes a different matter, and at this point I would first recomment you 
consider passing your order items to a resource like paypal and let them 
collect the personal information. If that is not possible you will want to 
switch to SSL communication with the browser before when you present your form 
for the personal information, and even in this mode I would recommend that if 
you detect errors on the forma and need to represent the form for the buyer to 
correct info, toss away the credit card info and have them reenter it. You do 
not want to store this in your session, or anywhere on your system without 
really secure incryption (I'm talking about the DB side here, not the SSL 
channel to the browser).  Once you begin collecting personal information (and 
this is not limited to the obvious like social security numbers), you should 
make sure the session cannot be hijacked, to prevent identity theft, this is 
where cookies work so well. Anyone who doesn't allow cookies is forcing you 
into a situation where you must expose their session information in the URL or 
a hidden field on the form where it can be hijacked, in which case I would 
refuse to have them as a customer, it's not worth the risk.  Hope this 
helps,  Warren   -Original Message- From: Kelvin Park 
[mailto:[EMAIL PROTECTED]  Sent: Friday, August 17, 2007 3:02 PM To: 
php-general@lists.php.net Subject: [PHP] About Session And Cookies  I am 
trying to setup a secure login system. I've heard that if I use just cookies 
for login, members without cookie turned out won't be able to see the member 
pages.  Is using session recommended for e-commerce websites with shopping 
carts? Or, using both of them might be more effective in some way.  --  PHP 
General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us

RE: [PHP] Cookies and sent headers

2007-08-18 Thread Bastien Koert

sessions and cookies either need to be set at the beginning of the page, or you 
can look into the ob_start(), ob_flush() functions to use output buffering


bastien


 To: php-general@lists.php.net
 Date: Sat, 18 Aug 2007 11:25:54 +0200
 From: [EMAIL PROTECTED]
 Subject: [PHP] Cookies and sent headers
 
 If built a simple login page and store any information within 
 $_SESSION's. Yet I'd like to move these into cookies but I always get an 
 error about sent headers. Is there a way to circumvent this problem 
 without changing too much in the page?
 
 The setting of the cookies happens just at the end of the page.
 
if (!$errortext and $Anmelden) {
  if (!empty($Permanent)) {
$expires = time()+ 365 * 86400;  // 365 days
setcookie (l.Lastname, $_SESSION['l_Lastname'], $expires);
setcookie (l.Firstname, $_SESSION['l_Firstname'], $expires);
setcookie (l.Email1, $_SESSION['l_Email1'], $expires);
setcookie (l.Email2, $_SESSION['l_Email2'], $expires);
  }
  echo ;
  exit;
}
 
 O. Wyss
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Cookies and sent headers

2007-08-18 Thread Bastien Koert


The commands start and use an output buffer, a chunk of memory that stores all 
the output on the server until the ob_flush, the buffer flush, function is 
called. You need to be aware that in high load situations this may adversly 
affect performance since it loads the servers memory, also be aware that you 
may hit a memory limit for large pages. This is server / OS depandant so you 
may want to read up on server documentation

bastien




 To: php-general@lists.php.net; [EMAIL PROTECTED]
 Date: Sat, 18 Aug 2007 16:39:29 +0200
 From: [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]; php-general@lists.php.net
 Subject: Re: [PHP] Cookies and sent headers
 
 ob_start() at the beginning and ob_end_flush() at the end of the PHP 
 section seems to do the trick albeit I've still problems to understand 
 why. The description in the manual is rather sparse unfortunately. Is 
 there any more information about what's going on?
 
 O. Wyss
 
 Wouter van Vliet / Interpotential wrote:
  You best option would be to go through all of your include'd or require'd
  files and make sure there is no whitespace before and after you open your
  php tags. Those are often the cause for such problems. The easy way would
  indeed be to use output buffering. In that case, put the call to ob_start();
  on the first line of the file you're calling. You will still have to make
  sure to not have any whitespace before your   
  To even bypass that, the output_buffering ini setting might be useful. Alter
  it in your php.ini if you can, otherwise try your apache vhost configuration
  or .htaccess. The syntax there is:
  
   php_flag output_buffering On
  
  Good luck!
  
  On 18/08/07, Kelvin Park  wrote:
  Kelvin Park wrote:
  Otto Wyss wrote:
  If built a simple login page and store any information within
  $_SESSION's. Yet I'd like to move these into cookies but I always get
  an error about sent headers. Is there a way to circumvent this
  problem without changing too much in the page?
 
  The setting of the cookies happens just at the end of the page.
 
if (!$errortext and $Anmelden) {
  if (!empty($Permanent)) {
$expires = time()+ 365 * 86400;  // 365 days
setcookie (l.Lastname, $_SESSION['l_Lastname'], $expires);
setcookie (l.Firstname, $_SESSION['l_Firstname'], $expires);
setcookie (l.Email1, $_SESSION['l_Email1'], $expires);
setcookie (l.Email2, $_SESSION['l_Email2'], $expires);
  }
  echo ;
  exit;
}
 
  O. Wyss
 
  ob_start() might help
 
  --
  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
 

_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] mail() issue

2007-08-22 Thread Bastien Koert

try doing a trim($email) to remove any whitespace, just in case
 
bastien Date: Wed, 22 Aug 2007 08:27:36 -0400 From: [EMAIL PROTECTED] To: 
[EMAIL PROTECTED] CC: php-general@lists.php.net Subject: Re: [PHP] mail() 
issue  The . (period) is simply the end of my sentance in the email.  The 
From address is specified in the php.ini and is fully qualified.  If I hard 
code the value of $to into the mail function it works fine.  $user_email = 
[EMAIL PROTECTED] $to = [EMAIL PROTECTED]  mail($to, $subject, $message); = 
PHP Warning: mail() [function.mail]: SMTP server response: 504 br /: 
Recipient address rejected: need fully-qualified address   On 8/22/07, Jay 
Blanchard [EMAIL PROTECTED] wrote:   [snip]  PHP Warning: mail()  
[function.mailhttp://develop1/credit%20card%20processing/Submit/ChildSu  
pport/function.mail]:  SMTP server response: 504 br /: Recipient address 
rejected: need  fully-qualified address.   The value of $user_email when 
it is echoed out above is [EMAIL PROTECTED]  [/snip]   Just a sanity 
check, does the e-mail address have that period at the end  of it when you 
echo it out? That would make the address non fully  qualified because the 
server is expecting a top level domain to follow.  Just for giggles check the 
FROM address as well, it needs a fully  qualified domain too. 
_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE

RE: [PHP] ignore-user-abort and connection-handling

2007-08-23 Thread Bastien Koert


if aborted actions are a worry, then consider using transactions in the 
database, if the process is interupted at any time, the changes made will all 
role back to a pre transaction start state.

bastien





 Date: Thu, 23 Aug 2007 13:30:00 -0400
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: Re: [PHP] ignore-user-abort and connection-handling
 
 Hi Jason,
 
 If you have a lengthy script with several queries throughout it, it is
 possible you could end up with a scrambled database. However, with
 short scripts, there is not much of a threat of this. Generally, your
 scripts will probable execute in  2 seconds (and 2 seconds is
 lengthy), with an average of 1 second or less. In these cases, by the
 time the user makes the request to the server, it will take longer
 than the length of your script execution for the termination request
 to be sent from the browser to the web server, and then to php.
 Therefor, php will simply halt returning output(assuming output
 buffering), but all script execution will be complete.
 
 That being said, if you wanted extra peace of mind, you could enable
 ignore-user-abort. Odds are though, that you will never really need it
 unless you are writing lengthy scripts that take several seconds to
 execute.
 
 Hope this helps,
 - Craige
 
 On 8/23/07, Jason Pruim  wrote:
  Hi Everyone :)
 
  One of these days someone is going to get sick of hearing from me,
  but until that day comes I have another question :)
 
  I asked on a MySQL list about wether it's better to have 1 database
  with many tables, or many databases with 1 table for my address list
  application I'm writing.
 
  One of the people there asked me about terminating the TCP
  connections and ensuring that each PHP script runs to completion to
  keep the database in good condition.
 
  He recommened looking at the ignore-user-abort and connection-
  handling functions in php...
 
  So now the question, Do I have to worry if a user hits the stop
  button in their browser before the script finishes? Will It corrupt
  the database or causing undo havoc to my system?
 
  This is far past my knowledge, so references to how I would use
  something like that properly would be greatly appreciated! :)
 
 
  --
 
  Jason Pruim
  Raoset Inc.
  Technology Manager
  MQC Specialist
  3251 132nd ave
  Holland, MI, 49424
  www.raoset.com
  [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] SQL Distinct-like behaviour

2007-08-24 Thread Bastien Koert

Read them all into an array and do an array-unique on it
 
bastien Date: Thu, 23 Aug 2007 23:54:40 -0300 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: [PHP] SQL Distinct-like behaviour  How 
could I iterate over the files in a directory and build a list of unique 
filenames? Take the following filelist:  file1_01.jpg file2_01.jpg 
file2_02.jpg file2_03.jpg file3_01.jpg file3_02.jpg file3_03.jpg 
file4_01.jpg file4_02.jpg file4_03.jpg  I would like to build an array like 
this: $names = (file1,file2,file3,file4)  How could I do that ?  
Thanks in advance.
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

RE: [PHP] text to HTML

2007-08-26 Thread Bastien Koert

the closest is nl2br() which converts line breaks to  tags. Other than that, 
you would need to look at regex manipulation to make those changes.

Bastien





 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Date: Sun, 26 Aug 2007 10:36:06 -0400
 Subject: [PHP] text to HTML
 
 
 Is there a PHP command that turns text into HTML?
 
 EXAMPLE:
 
 before
 
 Hi.
 
 How are you doing?
 
 after
 
 Hi.
 
 How are you doing?
 

_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] A simple PHP script to generate a Pie Chart based on SQL query

2007-08-27 Thread Bastien Koert

http://www.aditus.nu/jpgraph/

bastien





 Date: Mon, 27 Aug 2007 10:44:01 -0700
 From: [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Subject: [PHP] A simple PHP script to generate a Pie Chart based on SQL query
 
 Hello All,
 
 I am looking for a simple PHP script that can generate Pie Chart based
 on SQL query resultset.
 
 I don't want a reporting system, as we are already using Crystal
 Reports for that.
 
 Any suggestions?
 
 Saqib Ali
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Pragmatically changing a Record Number

2007-08-29 Thread Bastien Koert

Please don't do that...autonumber should not be relied for anything other than 
a unique row identifier. It should NOT matter to the application what that 
value is as long as it unique. If you need a count of the number of records, do 
a query (select count(*) from table...)
 
bastien To: php-general@lists.php.net From: [EMAIL PROTECTED] Date: Wed, 29 
Aug 2007 13:49:02 -0400 Subject: [PHP] Pragmatically changing a Record 
Number  Hi Everyone,  I think after I get this question answered, I can 
stop asking for  awhile since my project will be done, at least until the 
users say  What happened to XYZ then I'll ask again :)  I asked on a 
MySQL list about Resetting a auto increment filed so  that there arn't any 
gaps in the record number.  So to say it another way, I have a table that has 
900 records in it,  I've added 3 records, but then deleted 2 of those which 
puts the  actual record count at 901 but my auto increment field starts at 904 
 on the next insert.  Is there away with PHP that I can pragmatically change 
that value to  the total records in the database more so then a representation 
of  the actual record number?   --  Jason Pruim Raoset Inc. Technology 
Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com 
[EMAIL PROTECTED]  
_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE

RE: [PHP] mail() silly question

2007-09-01 Thread Bastien Koert

no difference

bastien







 Date: Sat, 1 Sep 2007 08:00:11 -0500 
From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] mail() 
silly question I have a question that might be too silly for those of you who 
are PHP gurus. Here it comes: I had a mail (specifically in the headers) 
function call like this: $header = ; $header .= 'From: [EMAIL 
PROTECTED]; $header .= 'MIME-Version: 1.0\r\n; $header .= 'Content-type: 
text/html; charset=iso-8859-1\r\n; $header .= Reply-To: 
.utf8_decode($nombreVar). .utf8_decode($apellidosVar).\r\n; $header .= 
X-Mailer: PHP/.phpversion().\r\n; $header .= X-Priority: 1; and the 
mail(...) function always returned TRUE, but the mail was NOT sent. After 
hours of... trial/error debugging, I noticed from an example that it should 
be: $header = ; $header .= 'From: [EMAIL PROTECTED]' . \r\n; $header .= 
'MIME-Version: 1.0' . \r\n; $header .= 'Content-type: text/html; 
charset=iso-8859-1' . \r\n; $header .= Reply-To: 
.utf8_decode($nombreVar). .utf8_decode($apellidosVar).\r\n; $header .= 
X-Mailer: PHP/.phpversion().\r\n; $header .= X-Priority: 1; 
Question: Why? What's the real difference between $header .= 'From: [EMAIL 
PROTECTED]' . \r\n; and $header .= 'From: [EMAIL PROTECTED]; ? If 
somebody knows, please let me know! Thank you in advance. -- PHP General 
Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php

_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Create a matrix gallery

2007-09-03 Thread Bastien Koert

Hotmail sucks


but try this

[code]

$counter = 1;

while ($rows=mysql_fetch_assoc($getpic))
{


//close the tr tag after 5 photos usng the mod function to check the counter
if($counter % 5 == 0) {
  echo ;

//reset the counter
$counter = 1;
}



extract ($rows);
echo ;
echo ;


$counter++;

}


hth

bastien







}
?








 Date: Mon, 3 Sep 2007 04:30:29 -0400 
From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] Create a 
matrix gallery hi list. I wonder if anyone can help me with this. i have a 
database with the file name of several images stored in a filesystem, and I 
want to create a table containing the image results of a query. this is my 
code  include_once(../../../connection/connection.php); ?   Image 
Gallery//get the thumbsnails $getpic=mysql_query(select * from 
rsiis_images) or die(mysql_error()); while 
($rows=mysql_fetch_assoc($getpic)) { extract ($rows); echo ; echo  
src=.$ImageThumb.$rows['image_id']..jpg; } ? With this code, 
I am able to see the thumb images with their respective link ok, but if I have 
a query with 40 results, I will have a big row of images. 
 |pic1 | pic2 | pic3 | 
pic4 | pic5 | pic6 | pic7 | pic8 | pic9 | pic10 | 
__ What I want to to do 
is insert a new  after showing 5 thumb images, and continue with the next 
picture on the next row. something like this __ 
|pic1 | pic2 | pic3 | pic4 | pic5 | __ |pic6 | pic7 | 
pic8 | pic9 | pic10 | __ |pic11 | pic12 | pic13 | 
__ Thanks in advance. Yamil

_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread Bastien Koert

I just let it go...there is no need to manage that process or you'll just screw 
up the mysql...
it shouldn't be relied on for anything other that uniqueness any way
 
bastien
 
 
 
 
 
 Date: Mon, 3 Sep 2007 23:53:22 -0400 From: [EMAIL PROTECTED] To: 
 php-general@lists.php.net Subject: [PHP] Dealing with auto-increment in 
 MySQL  How're you folks dealing with records that are auto incremented in 
 MySQL after a delete is made? I've noticed the only way to get a sequential 
 order back is to truncate the table completely.  Do you use logic in your 
 code to find a missing ID and insert new records based on that? Or do you 
 just ignore it, let mysql handle the numbering and go on with your lives?  
 Just curious.  Thanks!  - sf
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline

RE: [PHP] php Login script issue

2007-09-16 Thread Bastien Koert

argh! hotmail sucks

I don't see in the script where you are using $_POST / $_GET / $_REQUEST to 
access tha data from the form. Its likely that the example you are following is 
old and uses 'register_globals'. Since register_globals is a huge security hole 
and is not active in any new installations of PHP you need to change your 
script to use the above methods to get the form data. The error you are getting 
is due to the fact that you are not passing in the values to the sql and not 
getting a valid result

Note that the below example fixes your issue but DOES NOT do any validation, 
which you really should do before passing your data to the sql...




$userid=mysql_real_escape_string($_POST['userid']);  
$password=mysql_real_escape_string($_POST['password']); 

if($rec=mysql_fetch_array(mysql_query(SELECT * FROM tablename WHERE 
userName='$userName' AND password = '$password'))){ 

 if(($rec['userName']==$userName)($rec['password']==$password))


bastien



 Date: Sun, 16 Sep 2007 02:39:57 
-0700 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] 
php Login script issue Hi, Its just a login and password validation that I 
am trying to achieve. If the username is correct then the person is able to 
view certain page, if incorrect then he is directed elsewhere.  
$userid=mysql_real_escape_string($userid); 
$password=mysql_real_escape_string($password); 
if($rec=mysql_fetch_array(mysql_query(SELECT * FROM tablename WHERE 
userName='$userName' AND password = '$password'))){ 
if(($rec['userName']==$userName)($rec['password']==$password)){ include 
../include/newsession.php; echo  Successfully,Logged in logout.php Log OUT 
 welcome.php Click here if your browser is not redirecting automatically or 
you don't want to wait. ; print ; } } else { session_unset(); echo 
Wrong Login. Use your correct Userid and Password and Try  
onClick='history.go(-1)'; } ? I am getting this error when I am using 
this code: Warning: mysql_fetch_array(): supplied argument is not a valid 
MySQL result resource in thispage.php on line 37 Wrong Login. Use your 
correct Userid and Password and Try Why does it show up everytime and whats 
wrong with mysql_fetch_array(). Please advice also if there is some other way 
available please help me try that. Thanks, Chris -- View this message in 
context: http://www.nabble.com/php-Login-script-issue-tf4450691.html#a12698139 
Sent from the PHP - General mailing list archive at Nabble.com. -- PHP 
General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php

_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] setup help in IIS6

2007-09-18 Thread Bastien Koert

Have you created the .php file type in the IIS and pointed IIS to the php.exe?
 
Bastien Date: Tue, 18 Sep 2007 22:39:07 -0400 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: [PHP] setup help in IIS6  Hello,  I 
have installed the latest PHP on my windows server 2003 IIS6 machine. From  
the DOS command line interface (when in the C:\PHP directory) if I type PHP  
phpinfo.php, the file runs. However I cannot get it to work on the browser  on 
the server our out on the web using my URL. I'm sure it's just an II6  issue, 
but what am I doing wrong?  Thanks!   --  PHP General Mailing List 
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

RE: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-20 Thread Bastien Koert

Max file size is a hint to the browser and not all support it...you can't count 
on it
 
bastien
 
 To: php-general@lists.php.net Date: Thu, 20 Sep 2007 14:45:36 -0500 From: 
 [EMAIL PROTECTED] Subject: [PHP] MAX_FILE_SIZE not working with file 
 uploads  The punchline question is: What am I missing?  Now for the 
 details.  I have a form through which a user uploads image files. In the 
 event the chosen file exceeds the MAX_FILE_SIZE (which I have included as a 
 hidden form field immediately after the form tag), I want to abort the 
 upload process and display an appropriate error message to the user, 
 including the size of the file s/he attempted to upload.  But that doesn't 
 seem to be working.  Instead, the computer chugs along and then properly 
 refuses to perform the upload, but not immediately.   And here is the dump 
 of the $_FILES array (which, notably, reports zero as the size):  [code] 
 Array ( [userfile] = Array ( [name] = beach_iStock_00112348_L2.jpg 
 [type] =  [tmp_name] =  [error] = 2 [size] = 0 )  ) [/code]  The 
 file (about 1.2MB) DOES upload when I increase the MAX_FILE_SIZE value to 
 200.  This, from PHP.net: [quote] The MAX_FILE_SIZE hidden field 
 (measured in bytes) must precede the file input field, and its value is the 
 maximum filesize accepted by PHP. Fooling this setting on the browser side 
 is quite easy, so never rely on files with a greater size being blocked by 
 this feature. The PHP settings for maximum-size, however, cannot be fooled. 
 This form element should always be used as it saves users the trouble of 
 waiting for a big file being transferred only to find that it was too big 
 and the transfer failed. [/quote]   Here is the form code:  [code] 
 form action=__URL__?action=sent method=post 
 enctype=multipart/form-data name=upload id=upload  input 
 type=hidden name=MAX_FILE_SIZE value=1024000  Filename on your PC: 
 input name=userfile type=file size=45  Please click ONCE and be 
 patient: input name=Submit type=submit id=Submit value=Upload File 
  /form [/code]Pertinent php.ini settings: version = 4.3.10 
 file_uploads = on upload_max_filesize = 2M post_max_size = 8M  Any 
 guidance would be appreciated.  Jeff  --  PHP General Mailing List 
 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE

[PHP] OT IDEs

2007-10-03 Thread Bastien Koert

I just found a tool called CodeLobster, but the site seems a little funky, 
mostly because the owners first language is not English...is anyone using this 
tool and is it any good?
 
 
Thanks
 
 
bastien
_
Be seen when you can't be heard! Discover how today!
http://www.freemessengeremoticons.ca/

RE: [PHP] inserting ´ in a db

2007-10-03 Thread Bastien Koert

There are any number of elements to try
 
htmlspecialchars
mysql_real_escape_string
addslashes
 
RTFM and see what works best for your situation
 
 
 
bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Thu, 4 
Oct 2007 11:44:34 +0900 Subject: [PHP] inserting ´ in a db  Hi list, good 
day.I have a simple script that inserts text on a mysql table, that has 
a field named description and the type is text.  Everting works fine, except 
when I try to insert a text that includes a simple quote.   For example   
  Yamil´s carI send the character string to a variable and then 
insert into a query. But the mysql says that something is wrong with the query 
because the quote after the l looks like the end of the string, and “s car” 
doesn`t look like a valid part of the query.Can anyone help me out, 
how to handle this error?Thanks  Yamil 
_
Show your pals how you really feel! Learn more today!
http://www.freemessengeremoticons.ca/

RE: [PHP] IIS 6 and php.ini not being friends

2007-10-10 Thread Bastien Koert

why not try searching the c:/windows folder for a copy of the php.ini file? 
Maybe there is a straggler that needs to be deleted.
 
 
Bastien Date: Wed, 10 Oct 2007 17:24:54 +0100 From: [EMAIL PROTECTED] To: 
[EMAIL PROTECTED] CC: php-general@lists.php.net Subject: Re: [PHP] IIS 6 and 
php.ini not being friends  Philip Thompson wrote:  Hi. I have installed PHP 
~ a dozen times on Windows and *nix systems, so I  don't consider myself to 
be a newbie at this. However, I've run into a  problem that I have run out of 
ideas. I have Google'd many sites and none of  the suggestions provided 
worked for me. Specs:PHP 5.2.4 (Manual install)  Windows (virtual) 
Server 2k3  IIS 6, ISAPIOk, getting there... When I view phpinfo(), 
for the Configuration File (  php.ini) Path it shows C:\WINDOWS. However, I 
*know* that it's located in  the PHP install directory: C:\php. I've put 
C:\php in my Windows PATH  environment and I have even given Everyone full 
permissions on the .ini  file - still no go. Thinking maybe I screwed 
something up in my .ini file, I  tested both the recommended and dist .ini 
files with no changes - still no  go. Yes, I restarted IIS each time and 
verified permissions a lot.Any suggestions for what might be happening? 
Why can't these just play  nicely together? Is it possible the .ini file PHP 
provided is corrupt so  it's falling back to the *default* .ini?  Move 
php.ini to C:\WINDOWS. If it were finding a php.ini to work with it  would 
show the full path including the php.ini on the end. This  location is 
compiled into the PHP binaries.  -Stut  --  http://stut.net/  --  PHP 
General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_
Send a smile, make someone laugh, have some fun! Start now!
http://www.freemessengeremoticons.ca/?icid=EMENCA122

RE: [PHP] How do I get PHP to save a backslash in a Mysql table?

2007-10-10 Thread Bastien Koert

use mysql_real_escape_string
 
bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Wed, 10 
Oct 2007 13:48:03 -0400 Subject: [PHP] How do I get PHP to save a backslash in 
a Mysql table?  Hi,  I have a field in which a user inputs a Windows style 
directory path, hence  using backslashes and not forward slashes.  Example: 
c:\qb\data\mydatadile.qbw  However, when the use clicks update, what gets 
saved is:  c:qbdatamydatadile.qbw  Does anyone know if there is a work 
around?  The backslashes mysteriously are stripped. I use the following 
function to  wrap each variable that's saved in the MySQL table:  function 
update_database($value) { // Addslashes if (!(get_magic_quotes_gpc())) { 
$value = addslashes($value); } // Quote if not a number or a numeric string 
if (!is_numeric($value)) { $value = mysql_real_escape_string($value); } 
return $value; } 
_
R U Ready for Windows Live Messenger Beta 8.5? Try it today!
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger

RE: [PHP] Which PHP-Editor to use?

2007-10-16 Thread Bastien Koert

In the same boat here...waiting for a guinea pig to ok it
 
Bastien Date: Tue, 16 Oct 2007 08:56:16 -0500 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Subject: Re: [PHP] Which PHP-Editor to use?  On 
10/16/07, Stut [EMAIL PROTECTED] wrote:   Zoltán Németh wrote:   2007. 
10. 16, kedd keltezéssel 04.59-kor mooor ezt írta: I recommed you 
Codelobster php edition. Very good free php  editor. It reminds 
me a mix of Zend Studio and MS Visual Studio. If to the  basic   features 
they are: syntax highlighting, an intelligent outocomplete, step by 
step  debugger,   help on php, html, mysql; jump to funtion's 
or class's declaration in the project; search within the   project; 
highlighting of paired tags and brackets; Calss View. I like that 
it has small size - only 5 mb. Free. I've downloaded from:   
http://www.codelobster.com   Good luck! wow I haven't 
seen that thread for several weeks. this is really thread   resurrection lol 
:) anyway, this thread has been talked to death a million times, so 
we   could just let it drop finally (I thought we already did it...) ;)  
 Nahh. I wanna hear more about the Drug and Drop function for loading a  
new file. Cause everyone knows that for best results you've gotta drug  
files before you drop them into an application.   
http://www.codelobster.com/details_phped.html (end of page)   -Stut   
Outta curiosity... is this a legit piece of software? I went to the site and 
it *looks* real but we all know how looks can be. =P I wasn't interested 
in downloading a virus this morning. any takers? =D  ~Philip
_
Express yourself with free Messenger emoticons. Get them today!
http://www.freemessengeremoticons.ca/?icid=EMENCA122

RE: [PHP] IF command

2007-10-18 Thread Bastien Koert

Are you sure that the value is a string? If its numeric, then try the check 
without the quotes around the value
 
 
bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Thu, 18 
Oct 2007 19:49:55 -0500 Subject: [PHP] IF command  When $component_reference 
is 5 or 19 I don't want the echo statement to  output to the screen. What is 
the correct syntax? What I have below isn't  working. Thanks for your help. 
Ron  if ( ($component_reference != 5) OR ($component_reference != 19) ) 
{ echo lia href=\index.php?request= . $request . \ .  
$component_name . /a; }  --  PHP General Mailing List 
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_
Send a smile, make someone laugh, have some fun! Start now!
http://www.freemessengeremoticons.ca/?icid=EMENCA122

RE: [PHP] Multi-table pager sorted by date

2007-10-21 Thread Bastien Koert

damn hotmail blows

But if the database supports it, what about using a view that is made up of the 
two tables?

Could that be a possibility?

Bastien






 From: [EMAIL PROTECTED] To: 
php-general@lists.php.net Date: Sat, 20 Oct 2007 21:39:03 -0400 Subject: 
[PHP] Multi-table pager sorted by date I'm doing a project where the database 
was designed before me and they don't have a budget for a database re-design. 
There are two entity tables which /should/ have been the same model with some 
meta-fields keyed off a type field, but it's not. It's two tables, which 
should be displayed intermixed, paged, and sorted by date. The solution I 
thought up didn't do the trick. I: - made two pagers, one for each table - 
got the current page's set - intermixed them by making an array of references, 
keyed off the datetime string, refering to items in both result sets - 
krsort()ed the intermixed array The result is probably obvious, but I'll 
explain it anyway... there is nowhere near an equal density in 
entries-per-date between the two tables, and so, each page shows results from 
both tables, but the dates for the two models on the same page are very 
different; on page 1, i'll get items from tableA with dates ranging 
10/5/2007-10/9/2007 and tableB with dates ranging from 10/13/2007 12:00:00 to 
10/13/2007 at 15:00:00. So I'm thinking I need to find a way to align the 
results, and it needs to happen somehow in the pagers themselves (this being 
symfony, the pager grabs the query criteria object and sets limit and offset 
for you.) I am already generating pager links based on the resultset with the 
most pages; so artificially generating page links won't be a far step. The 
only solution I've thought up, I don't want to do, which is to break the query 
into dates e.g. if the date range is 2007-10-01 to 2007-10-31, I do not want a 
separate pager link for each date which then subpages the results or shows all 
results for that date; the date range might span years and there might be 
hundreds of entries for a date. I need a single pager which aligns the two 
tables' entries' dates in each page of results throughout the span. I am 
very open to a ready-made class that can do this, especially if it's based on 
Propel, or if it can take raw sql queries. Thoughts? Nathan -- PHP 
General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php

_
Express yourself with free Messenger emoticons. Get them today!
http://www.freemessengeremoticons.ca/?icid=EMENCA122
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] problem with foreach

2007-10-22 Thread Bastien Koert

I am sure that I am late to the party, but am sure that double or single quotes 
at least are needed around the attribute values to make this work


Civil Rights


bastien





 Date: Mon, 22 Oct 2007 12:20:55 
-0500 From: [EMAIL PROTECTED] CC: php-general@lists.php.net Subject: Re: 
[PHP] problem with foreach Robert Cummings wrote: On Mon, 2007-10-22 at 
18:07 +0100, Stut wrote: Adam Williams wrote: I have an html page 
with checkboxes:  Modern Mississippi Civil Rights 
MilitaryHistory  and mailform2.php containing: echo you 
selected: ; /* line 81 */ foreach ($_POST[option] as $a) { echo 
$a; } but I'm getting the error: you selected: 
*Warning*: Invalid argument supplied for foreach() in 
*/var/www/sites/mdah-test/museum/mmhsurvey/mailform2.php* on line *81* 
I googled some checkbox/foreach pages on google, but I don't see where I'm 
going wrong. I'm running php 5.2.5 on Apache 2.2.4 on Fedora Linux. Any 
help? Turn notices on. You will then get lots of notices about the use 
of an undefined constant option. You should be using 
$_POST['option'] instead - notice the quotes. Your HTML should really 
have double quotes around the attributes but that's beyond the scope of this 
list. He's still going to get an invalid argument warning though since 
PHP will automatically convert the unquoted key to a string and then look 
up the value. The problem is that the value doesn't exist or is not an 
array as expected. Cheers, Rob. Yeah, thats the problem I'm having 
for some reason. When I do: print_r($_POST['option']); it prints nothing. 
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php

_
Are you ready for Windows Live Messenger Beta 8.5 ? Get the latest for free 
today!
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WAMP servers

2008-03-27 Thread Bastien Koert
On Thu, Mar 27, 2008 at 9:40 AM, Rod Clay [EMAIL PROTECTED] wrote:

 Hello.  Does anyone use a WAMP server?  And, if so, have you found one
 to be better than another?

 I am using a WAMP server entitled, aptly enough, WampServer (formerly
 WAMP5).  In the few weeks I have been using it, I frequently get
 messages that a certain library or routine cannot be found.  My question
 therefore is:  do these WAMP servers typically come with all of the php
 libraries and subroutines that are most commonly needed?  I have the
 impression that this WAMP server does not have some of the libraries and
 subroutines I need (or would very much benefit from having, anyway).

 Thanks for any information you can give me about WAMP servers.




I recommend installing the individual pieces yourself. Then you end up with
a more current and maintainable install. And you learn to do this all
yourself

-- 

Bastien

Cat, the other other white meat


Re: [PHP] munge / obfuscate ?

2008-03-27 Thread Bastien Koert
On Thu, Mar 27, 2008 at 9:10 PM, Joey [EMAIL PROTECTED] wrote:

 Hi All,



 I have written an app to allow a person to go online and see a picture we
 take of them.  When we link to the picture I don't want it to be obvious
 that the URL is

 Domain.Com/Pix/123.jpg because the next person we take a picture of may be
 123.jpg, so I am trying to munge/obfuscate the URL to make it less
 obvious.



 Of course coders can figure it out, but we just want to keep out the
 normal
 people.



 Does someone have an obfuscate function which still allows the URL to
 work,
 but doesn't allow the person to figure it out?



 Thanks!







 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


The solution here is to store the images in a folder above the web root and
then use a php page to read in the requested image ( a hash value should be
sufficient (eg img
src='show_image.php?i=a1d3200086d3ec14dae1e40c50f6374f'Click for image/a

The show_image page can query the database for the true image name, read it
in from the folder and pass it to the page

hth

-- 

Bastien

Cat, the other other white meat


Re: [PHP] Re: Quick email address check

2008-03-27 Thread Bastien Koert
On Thu, Mar 27, 2008 at 10:23 PM, Bill Guion [EMAIL PROTECTED] wrote:

 At 1:28 PM -0400 3/26/08, Al wrote:

 I'm scripting a simple registry where the user can input their name
 and email address.
 
 I'd like to do a quick validity check on the email address they just
 inputted. I can check the syntax, etc. but want check if the address
 exists.  I realize that servers can take a long time to bounce etc.
 I'll just deal with this separately.
 
 Is there a better way than simply sending a test email to see if it
 bounces?
 
 Thanks

 I've had pretty good success from the following:

 after checking the syntax (exactly one @, at least one . to the right
 of the @, etc.), if it passes the syntax check, I then set $rhs to
 everything to the right of the @. Then I test:

 if (!checkdnsrr($rhs, 'MX'))
   {
   invalid
   }
 else
   {
   valid
   }

  -= Bill =-
 --

 You can't tell which way the train went by looking at the track.



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


I have used this to good effect

function isEmail($email)
{
 if
(eregi(^[a-z0-9]+([-_\.]?[a-z0-9])[EMAIL 
PROTECTED]([-_\.]?[a-z0-9])+\.[a-z]{2,4},$email))
  {
  return TRUE;
  } else {
  return FALSE;
 }
}//end function




-- 

Bastien

Cat, the other other white meat


[PHP] Humour in Hotmail :OT

2008-04-21 Thread Bastien Koert
Guys,

I switched to gmail since I was having so many issues getting my emails thru
the spam filter thanks to M$ adding ads to the bottom of the message. To
make it even better, the unsubcribe confirmation email is also being
rejected due to spammy urls in the message.

Anyway, this should work out much better,

Thanks,

-- 

Bastien

Cat, the other other white meat


Re: [PHP] Re: php framework vs just php?

2008-04-22 Thread Bastien Koert
On 4/22/08, Jay Blanchard [EMAIL PROTECTED] wrote:

 [snip]
  [snip]
  If you don't use a framework then obviously you are writing nothing
 but
  mickey mouse programs, and wouldn't stand a chance when it comes to
  writing a proper application.
 ..If you think you can achieve the same
  level of productivity WITHOUT a framework then you are living in cloud
 \cuckoo land.
 \[/snip]
 
  Tony is obviously joking here folks.

 No I'm not.
 [/snip]

 My mistake, you must be trolling. I forgot that you were better than all
 of the other PHP developers combined +1 says the President of Cuckoo
 Land. (I attempted to defend you so that your tone would not be
 offensive to others...oh well)

 You're right to a point, developers of large scale applications in PHP
 will likely re-use code and thereby develop even a small framework but a
 framework is not required to create robust, scalable, large scale
 applications in PHP. Certainly there will be a much higher
 time/management factor involved but there are several non-mickey mouse
 proper programs written in PHP that used no framework what-so-ever.

 Different strokes for different folks.

 Is there a value to a framework? Of course there is. Are there cons?
 Every framework comes with its own set of gotcha's too. What framework
 should you use? There are so many that it would be hard to know...it
 depends on the size and the scope of the work to be done.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


Gonna throw my two cents in here. I think eventually we all end up using
frameworks. We just roll our own. I have been using the same framwork that I
wrote for a while now and its holding up nicely. But it also leaves a lot to
be desired in terms of a pure OO approach. So I am working on projects using
Zend and symfony and learning what their limitations are. My concern
now-a-days is more about scalibility. The company I work for uses ASP and
we've built a framework that doesn't scale well at all. But then OO in ASP
is no go.

To me, as to many of you, its about getting the correct tool for the job.
This is where the component nature of the Zend framework is more appealing.
I can pick and choose what I need without having the whole kit and kaboodle
draining resources.

Personally, I think the OO approach has relevance, but its not a panacea to
cure all ills. And under the covers its procedural any ways. (Oh, that
should raise some blood pressure  ;-)  )

Any way, my two cents.


-- 

Bastien

Cat, the other other white meat


Re: [PHP] Big companies that use PHP?

2008-04-23 Thread Bastien Koert
On 4/23/08, Thiago Pojda [EMAIL PROTECTED] wrote:

 Hey guys,



 I've been asked this common question: What big companies use PHP in big
 apps?



 I don't know where to find this kind of stuff and, well. here I am :)





 Do any of you know?



 And what % of the web market share does PHP take?





 Thanks,

 Thiago Pojda



Facebook, Wikimedia, Oracle, Yahoo are just a few


-- 

Bastien

Cat, the other other white meat


Re: [PHP] Large XML manipulation within PHP

2008-04-23 Thread Bastien Koert
On 4/23/08, Steve Gula [EMAIL PROTECTED] wrote:

 I work for a company that has chosen to use XML (Software AG Tamino XML
 database) as its storage system for an enterprise application. We need to
 make a system wide change to information within the database that isn't
 feasible to do through our application's user interface. My solution was
 to
 unload the XML collection in question, open it, manipulate it, then write
 it
 back out. Problem is it's a 230+MB file and even with PHP's max mem set to
 4096MB (of 8GB available to the system) SimpleXML claims to still run out
 of
 memory. Can anyone recommend a better way for handling a large amount of
 XML
 data? Thanks.

 --
 --Steve Gula

 (this email address is used for list communications only, direct contact
 at
 this email address is not guaranteed to be read)


Can you chunk the data in any way, break it into smaller more managable
peices?

-- 

Bastien

Cat, the other other white meat


Re: [PHP] peer review (was php framework vs just php?)

2008-04-25 Thread Bastien Koert
damn reply-all

On 4/25/08, Ray Hauge [EMAIL PROTECTED] wrote:

 Jay Blanchard wrote:

 I did a quick and dirty of just one of those functions. This function
 takes a table and creates a form based on the table. It needs quite a
 bit of refining, but I am willing to share and let you guys and gals
 throw suggestions;


 I use a very similar style of approach, but it's more on a field by field
 basis rather than a whole form.  I also wrote mine on company time, so
 here's an example:

 ?php $table = 'customers'; ?
 form id='search' name='search' action='' method='post'
table align='center'
tr
td align='right'?php echo UI::getFieldLabel($table,
 'first_name'); ?/td
td colspan='3'?php echo UI::getBlankTextField($table,
 'first_name'); ?/td
/tr
tr
td align='right'?php echo UI::getFieldLabel($table,
 'city'); ?/td
td?php echo UI::getBlankTextField($table, 'city');
 ?/td
/tr
tr
td align='right'?php echo UI::getFieldLabel($table,
 'state'); ?/td
td?php echo UI::getBlankSelectField($table, 'state');
 ?/td
td align='right'?php echo UI::getFieldLabel($table,
 'zip'); ?/td
td?php echo UI::getBlankTextField($table, 'zip'); ?/td
/tr
/table
 /form

 The UI class figures out the max-length of the field, and there are also
 configurations to determine what type of field it is (text, phone, date,
 textarea, etc.) and security settings based on the user logged in.  This has
 helped keep my template files very clean, and I still have full control over
 the form by not including the fields I don't want.

 --
 Ray Hauge
 www.primateapplications.com




?
/*
  bastien koert
  Aug 2004
  www.bastienkoert.net

  This code writes out all the needed DB fields for insert / update
statements as well as
  generating the $global code, the post/get code and the initialization code
with defaults from
  the db tables

  http://codewalkers.com/seecode/494.html
 Hi All,

 The most tedious part of coding any db interaction is the
defining/initialization of the variables that interact with the db. All
those POST/GET elements, the global elements and the development of the sql
statements.

 This code takes the work out of that. Simply fill in the form to point it
to a database and table and run it...the output shown is to :

 1. initialize all db variables
 2. generate the POST/GET values from the forms.
 3. generate the global variables
 4. generate the insert statement
 5. generate the update statement

 It will look for primary keys, adapt to place quotes only around the text
elements, and fill in the default db values where needed.

 There is always room for improvement, but this really reduces the workload
when working on pages that map to one table.

 You can copy the code generated from the screen, or for a little more
formatted code, view source, copy and remove the tags

 enjoy,

 bastien


  10 September 2005 --
  A few tweaks added by a much lazier guy than Bastien...
   - a place to set db variables for that db you're always using
   - generation of a SELECT query
   - PHP code snippets for extracting ONE Value and MANY values
   - checkbox to enable htmlspecialchars protection
   - generation of a table-formatted form in two versions:
 - all of it tucked into a single php variable
 - html with embedded php variables
   - checkbox to color every other row in the table
   - checkbox to add a t to form variable names AND retrieved vari names
 (useful when form used to set session variables... which CANNOT be
directly
   by a form so you have to give them another name first)
   - handy table format

   Unfortunately, the option to view the source for better formatted code
   not an option: to show the HTML I had to convert it to its special
   characters... source code is therefore a MESS!!

   Best Regards,
   Neil A. Garra

   Owner  Despot for Life
   www.S2company.com http://www.s2company.com/
   Mind Tools for Tactical Intelligence
 -

*/




//control code
if(!isset($_POST['submit'])){
  show_form();
}else{
  generate_scripts();
}//end if

//
//  show form function
//

function show_form()
{

//=
//Variables for your usual MySQL Server
//
$dbname = ;
$uname = ;
$pass  = ;
$host  = ;
//
//=

echo 
  htmlbody
  form action=.$_SERVER['PHP_SELF']. method=post
  table
  tr
   td colspan=2 bgcolor=blue align=centerfont size=5
color=yellowbPHP-O-Matic/b/font
trtd align=rightTable Name:/tdtd input type='text'
name='tablename

Re: [PHP] peer review (was php framework vs just php?)

2008-04-26 Thread Bastien Koert
On 4/26/08, Robert Cummings [EMAIL PROTECTED] wrote:

 Wow, that's umm hideous.

 Cheers,
 Rob.



 yep, but i did say it was old

 --

 Bastien

 Cat, the other other white meat


Re: [PHP] Replacing accented characters by non-accented characters

2008-05-14 Thread Bastien Koert
On Tue, May 13, 2008 at 8:39 AM, Per Jessen [EMAIL PROTECTED] wrote:

 Yannick Warnier wrote:

  That would probably work out if it wasn't too dependent on the locales
  to work. I'm developing an open-source product which could end up on a
  server without the locales for French but be used by some French
  people, which would make (as far as I can get out of one comment from
  Richie in the PHP manual) the transliteration somewhat wrong.

 With the kind of rough conversion/transformation you're doing, is the
 locale really very important anyway?


 /Per Jessen, Zürich


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


Why should the server folder name matter? Make it a hash and store the user
provided name in a db. Then when presenting the data to the user just show
the user provided name as the folder name. This would also handle multiple
users trying to use the same folder name for their stuff.

-- 

Bastien

Cat, the other other white meat


Re: [PHP] using variable in php form before the form is POSTed

2008-05-14 Thread Bastien Koert
On Tue, May 13, 2008 at 9:02 AM, tedd [EMAIL PROTECTED] wrote:

 At 2:44 PM -0700 5/12/08, milt wrote:

 I have a form that will be filled in by the user, I want to have access to
 the content of one of the fields in that form, in order to fill in an
 another variable that is not part of the form.  this variable is used by a
 routine when the form is posted.  Question - is the $_post[field name]
 availble before the submit button is pushed, or is there another way to
 get
 the contents of the field?
 thanks, Milt


 Use hidden, such as:

 input type=hidden name=step value=1

 After the form is posted, $_POST['step'] will = 1.

 I use this technique all the time so that I can use the same script to
 present different forms based upon which step in the form processing the
 user is on (i.e., step=1, step=2, step=3 and so on).

 Cheers,

 tedd

 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 You could get funky and send that data bit via AJAX to the server to be
preprocessed. But likely handling the data bit as the first step on
submission, is gonna be simpler and faster to do


-- 

Bastien

Cat, the other other white meat


Re: [PHP] Mic check 1, 2, 3...

2008-05-14 Thread Bastien Koert
On Wed, May 14, 2008 at 4:56 PM, tedd [EMAIL PROTECTED] wrote:

 At 1:50 PM -0700 5/14/08, Jim Lucas wrote:

 Just wondering if the mailing list is working.  I have not received
 anything from this list today.

 --
 Jim Lucas


 If you don't receive this, please let me know.

 Cheers,

 tedd

 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


check check

-- 

Bastien

Cat, the other other white meat


Re: [PHP] OT - Question about nested sortable lists

2008-05-16 Thread Bastien Koert
On Fri, May 16, 2008 at 11:09 AM, Jim Lucas [EMAIL PROTECTED] wrote:

 I notice in a previous thread, people are suggesting using these two tools.

 http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html

 and

 http://tool-man.org/examples/

 Now, my question is, does anybody know if these, or similar tools, would
 allow you to manipulate nested lists and move items between lists and
 various levels?

 Example would be this.  I work for a telephone company and I am in the
 process of rebuilding the Add a new Service wizard.

 What I would like to do is to allow people to move nested lists around.

 DS1 #1
Voice line # 800-555-1210
Caller ID
Three Way Calling
Voice line # 800-555-1211
Caller ID
Three Way Calling
Voice line # 800-555-1212
Caller ID
Three Way Calling
 DS1 #2
Voice line # 800-555-1214
Caller ID
Three Way Calling
Voice line # 800-555-1215
Caller ID
Three Way Calling
Voice line # 800-555-1216
Caller ID
Three Way Calling

 This is what I would like to end up with.  But what I start with is an
 empty white board.  With a static list of available services above the white
 board.

 What I would like to see is someone be able to grab the DS1 service and
 place it.  Then grab a voice line and place that as a sub-service to the
 DS1.  Then be able to grab Features and add them as sub-services to the
 previous voice line.

 Now say they are done but realize that instead the 800-555-1216 number
 under the DS1 #2, it should have been under DS1 #1.  Could someone grab the
 Voice line # 800-555-1216 and move it so it becomes a sub-service of DS1 #1?
 and keeps the features that were previously associated to it intake?

 TIA

 --
 Jim Lucas  [EMAIL PROTECTED]
 Systems Engineer   541-323-9113
 BendTelwww.bendtel.com


 --
 Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

 Twelfth Night, Act II, Scene V
by William Shakespeare


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 Jim,

You could make each element of the list its own div..then you could use the
drag'n'drop tools

-- 

Bastien

Cat, the other other white meat


<    1   2   3   4   5   6   7   >