Re: [PHP] PHP vs JAVA

2013-08-20 Thread Pete Ford
of the beholder... Cheers Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP is Zero

2013-06-13 Thread Pete Ford
, for example. With all due respect to an experience programmer, years of experience do not make up for a limited tool set. Best Regards Daniel Buschke Cheers Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: [PHP] PHP is Zero

2013-06-13 Thread Pete Ford
'var_dump(floatval(0x8315e839da08e2a7afe6dd12ec58245d));' float(1.7424261578436E+38) In other words, you need to tell the interpreter that you have a number (in base-16) rather than a string. A proper strongly-typed language would just tell you that it's nonsense... Cheers Pete -- PHP General

[PHP] Re: Tree menu list in php

2011-07-27 Thread Pete Ford
get my coat... Pete -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom Registered in England and Wales: 2297906

Re: [PHP] Constants in strings

2011-07-08 Thread Pete Ford
On 06/07/11 17:33, Robert Williams wrote: Where I've made most use of heredocs is when I want to do nothing but define a bunch of long strings in one file. I find the most useful thing about heredocs is that they don't care about quotation marks, so I often use them for SQL statements where

Re: [PHP] Ftp upload

2011-06-15 Thread Pete Ford
On 15/06/11 01:24, Marc Guay wrote: I bought a 1GB external hard drive for $1000. Did I just choke on my lunch? If that was about 20 years ago, then it would be fine! -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd.

Re: [PHP] PHP download page blocking other HTTP requests

2011-06-07 Thread Pete Ford
On 06/06/11 21:07, Richard Quadling wrote: On 6 June 2011 13:55, Pete Fordp...@justcroft.com wrote: Is there something on the Apache/PHP end that might be causing this blocking? (Apache 2.2.10, PHP 5.2.14) The browser and / or OS may be obeying the settings about the number of simultaneous

[PHP] PHP download page blocking other HTTP requests

2011-06-06 Thread Pete Ford
I have a file download 'guardian' page which does something like this: $size = filesize($path); $fi = @finfo_file($path, FILEINFO_MIME_TYPE); @header('Content-type: ' . $fi); @header('Content-Length: ' . $size); @readfile($path); exit; ($path is derived from parameters in the request, including

Re: [PHP] Closing Session (Revisited)

2011-05-23 Thread Pete Ford
On 22/05/11 06:46, Roger Riordan wrote: On Thu, 05 May 2011 08:28:53 -0400, sstap...@mnsi.net (Steve Staples) wrote: On Thu, 2011-05-05 at 21:41 +1000, Roger Riordan wrote: I have developed a common engine which I use for several different websites. I had been using PHP 5.2.? and IE6 (yes;

[PHP] Re: Date validation

2011-05-23 Thread Pete Ford
On 20/05/11 16:29, Geoff Lane wrote: On Friday, May 20, 2011, Peter Lind wrote: Try: $date = new DateTime($date_string_to_validate); echo $date-format('Y-m-d'); Many thanks. Unfortunately, as I mentioned in my OP, the DateTime class seems to be 'broken' for my purposes because it uses

Re: [PHP] Re: Date validation

2011-05-23 Thread Pete Ford
On 23/05/11 13:12, tedd wrote: At 9:47 AM +0100 5/23/11, Pete Ford wrote: Finally, for some applications I have made an AJAX (javascript + PHP) implementation which provides feedback to the user as they type in the date field: every time a character is typed in the box, the backend is asked

Re: [PHP] Warning: session_start()

2011-05-19 Thread Pete Ford
On 19/05/11 10:37, Tim Streater wrote: On 19 May 2011 at 10:20, Richard Quadlingrquadl...@gmail.com wrote: On 18 May 2011 19:15, Nazishnaz...@jhu.edu wrote: Hi everyone, !--- WHEN USER CLICKS 'ENTER' TO

[PHP] Re: XML... Useful or another layer of complexity?

2011-04-04 Thread Pete Ford
On 03/04/11 19:41, Jason Pruim wrote: So the subject says it all... And yes I know this isn't related to PHP but it's the weekend and I trust the opinions on this list more then any other list I have seen. I've been doing alot of reading on XML and honestly it looks pretty cool... BUT the

[PHP] Re: mysql_num_rows()

2011-02-24 Thread Pete Ford
On 22/02/11 14:40, Gary wrote: Pete Fordp...@justcroft.com wrote in message news:76.48.39221.054c3...@pb1.pair.com... On 22/02/11 13:59, Gary wrote: Pete Fordp...@justcroft.com wrote in message news:a4.c0.39221.b3ca3...@pb1.pair.com... On 22/02/11 05:40, Gary wrote: Can someone tell me

[PHP] Re: Dynamically Created Checkboxes

2011-02-23 Thread Pete Ford
This bit? On 22/02/11 22:06, Gary wrote: for($i=1; $i=$_POST['counties']; $i++) { if ( isset($_POST[county{$i}] ) ) { You loop over $_POST['counties'] and look for $_POST[county$i] I suspect that there is no field 'counties' in your form, so the server is complaining about the missing index

[PHP] Re: mysql_num_rows()

2011-02-22 Thread Pete Ford
On 22/02/11 05:40, Gary wrote: Can someone tell me why this is not working? I do not get an error message, the results are called and echo'd to screen, the count does not work, I get a 0 for a result... $result = mysql_query(SELECT * FROM `counties` WHERE name = 'checked') or

[PHP] Re: mysql_num_rows()

2011-02-22 Thread Pete Ford
On 22/02/11 13:59, Gary wrote: Pete Fordp...@justcroft.com wrote in message news:a4.c0.39221.b3ca3...@pb1.pair.com... On 22/02/11 05:40, Gary wrote: Can someone tell me why this is not working? I do not get an error message, the results are called and echo'd to screen, the count does

Re: [PHP] New to list and to PHP

2011-02-21 Thread Pete Woodhead
On 2/20/2011 3:47 PM, tedd wrote: At 2:03 PM -0500 2/18/11, Pete Woodhead wrote: Hi I'm Pete Woodhead. I'm new to the list and to PHP. To be honest I very new to code writing. Thought this would be a good way to learn good habits as well as good code writing. Looking forward to learning

Re: [PHP] New to list and to PHP

2011-02-21 Thread Pete Woodhead
On 2/20/2011 6:41 PM, Richard Quadling wrote: On 20 February 2011 23:34, Richard Quadlingrquadl...@gmail.com wrote: On 18 February 2011 19:03, Pete Woodheadpete.woodhea...@gmail.com wrote: Hi I'm Pete Woodhead. Â I'm new to the list and to PHP. Â To be honest I very new to code writing

Re: [PHP] HTML errors

2011-01-13 Thread Pete Ford
On 12/01/11 14:13, Richard Quadling wrote: On 12 January 2011 14:07, Steve Staplessstap...@mnsi.net wrote: On Wed, 2011-01-12 at 13:40 +, Richard Quadling wrote: On 12 January 2011 13:20, Steve Staplessstap...@mnsi.net wrote: Jim, Not to be a smart ass like Danial was (which was

[PHP] Re: HTML errors

2011-01-12 Thread Pete Ford
On 12/01/11 03:35, David McGlone wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services',

[PHP] Re: Form Processing

2010-11-30 Thread Pete Ford
On 29/11/10 23:54, Ron Piggott wrote: I am unable to retrieve the value of $referral_1 from: $new_email = mysql_escape_string ( $_POST['referral_$i'] ); why? PHP while lopp to check if any of the fields were populated: $i=1; while ( $i= 5 ) { $new_email = mysql_escape_string (

Re: [PHP] Re: Xpath arguments in variable

2010-09-16 Thread Pete Ford
On 15/09/10 18:00, David Harkness wrote: And let's not forget $v = $row-xpath(//membernumber[. = \$MemberId\]); The \ inside the string turns into a double-quote and using to delimit the string allows for variable substitution. Oooh, I hate using backslashes - they always seem so untidy...

[PHP] Re: Xpath arguments in variable

2010-09-15 Thread Pete Ford
If you needed the double-quotes in the Xpath expression when the constant is used , then you probably need them in the variable version. $v = $row-xpath('//membernumber[. = '.$MemberId.']'); That should put the double-quotes in for you... On 15/09/10 09:33, Sridhar Pandurangiah wrote:

Re: [PHP] Standalone WebServer for PHP

2010-09-13 Thread Pete Ford
On 12/09/10 18:33, tedd wrote: At 5:57 PM +0100 9/12/10, Ashley Sheridan wrote: On Sun, 2010-09-12 at 12:55 -0400, tedd wrote: Can a business have a server connected to the Internet but limit access to just their employees? I don't mean a password protected scheme, but rather the server being

Re: [PHP] Trapping for PDF Type and file size in a UPLOAD form...

2010-07-30 Thread Pete Ford
checking. In any case, JavaScript doesn't (shouldn't) have access to the file you are trying to upload, so there's not much you can do there. You might achieve something client-side with Flash, or a Java uploader applet, I suppose. Cheers Pete -- Peter Ford, Developer phone

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Pete Ford
On 27/07/10 10:42, viraj wrote: $firstName is the most readable.. for variables. does anybody have negative thoughts on using the same naming format for method/function and for class names? i guess it's worth sharing! many thanks! ~viraj I like to use $firstName, and function firstName(),

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Pete Ford
On 27/07/10 14:16, Peter Lind wrote: 2010/7/27 Nilesh Govindarajanli...@itech7.com: 2010/7/27 Dušan Novakovićndu...@gmail.com: Hello, so when I'm sending the array to model it's like this: $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, r); $pdfContent = array(

Re: [PHP] How to alter the schema of a database to introduce newfeatures or change the current features

2010-07-15 Thread Pete Ford
On 15/07/10 06:03, Paul M Foster wrote: On Wed, Jul 14, 2010 at 09:28:53PM -0700, Slith One wrote: I'm developing an app using Zend Framwork using Git for version control. What is the best approach for updating the schema and the database when one of us makes an update to the db structure?

Re: [PHP] How to alter the schema of a database to introducenewfeatures or change the current features

2010-07-15 Thread Pete Ford
On 15/07/10 09:14, Ashley Sheridan wrote: ALTER TABLE is the way to go. If in doubt, look at the SQL phpMyAdmin produces when you make the changes in there. Thanks, Ash http://www.ashleysheridan.co.uk Yeah, scripting ALTER TABLE commands ... :) -- Peter Ford, Developer

Re: [PHP] Inner join woes... and sweet tea!

2010-07-05 Thread Pete Ford
On 05/07/10 14:38, Richard Quadling wrote: On 5 July 2010 14:02, Jason Pruimli...@pruimphotography.com wrote: Hi everyone, I'll admit right now that I'm still trying to wrestle with inner joins... It is all about set theory. Imagine two circles, which overlap

[PHP] Re: combo box validation

2010-06-09 Thread Pete Ford
On 07/06/10 18:49, David Mehler wrote: Hello, I've got a form with two combo boxes, one for the month one for the day. Both are required. I've got code that checks the post submission to ensure neither is empty. My problem is that if a user does not select anything in the combo boxes January

Re: [PHP] PHP Encoder like IonCube

2010-05-12 Thread Pete Ford
On 12/05/10 01:06, Ashley Sheridan wrote: On Tue, 2010-05-11 at 16:50 -0700, Brian Dunning wrote: Hi Shiplu - I also have a product with similar requirements. I searched a LOT and was never able to find a free solution that I was satisfied with. Even a lot of the commercial solutions

Re: [PHP] PHP Encoder like IonCube

2010-05-12 Thread Pete Ford
On 12/05/10 10:48, Pete Ford wrote: On 12/05/10 01:06, Ashley Sheridan wrote: On Tue, 2010-05-11 at 16:50 -0700, Brian Dunning wrote: Hi Shiplu - I also have a product with similar requirements. I searched a LOT and was never able to find a free solution that I was satisfied with. Even a lot

Re: [PHP] PHP Encoder like IonCube

2010-05-12 Thread Pete Ford
On 12/05/10 11:23, shiplu wrote: Can you paste a sample encoded version of a php file on pastie.org? Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Pete Ford
On 06/05/10 11:52, Paul Waring wrote: Ashley Sheridan wrote: Why don't you store them as integer values and add in the decimal point with something like sprintf() afterwards? Store the values as pence and then you won't have any rounding problems. If I was designing the system from scratch,

Re: [PHP] Error handling strategies (db related)

2010-04-28 Thread Pete Ford
On 27/04/10 16:37, tedd wrote: Error handling is almost an art form. More like a black art - voodoo perhaps... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Weird problem with is_file()

2010-04-26 Thread Pete Ford
On 26/04/10 16:56, Michelle Konzack wrote: Hello Peter, Am 2010-04-26 09:28:28, hacktest Du folgendes herunter: var_dump($isfile); Don't make assumptions of what the value is, just check it. Yes and grmpf! The filename has a space at the end but it can not removed even using

[PHP] PHP GUI library/package

2010-03-31 Thread Pete Ford
? Cheers Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP GUI library/package

2010-03-31 Thread Pete Ford
On 31/03/10 15:30, Ashley Sheridan wrote: On Wed, 2010-03-31 at 15:30 +0100, Pete Ford wrote: Hi All, I have a web project built in PHP which we want to break out part of into a stand-alone GUI program. The architecture is fine - display nicely separated from logic, so coding is not a problem

Re: [PHP] PHP GUI library/package

2010-03-31 Thread Pete Ford
On 31/03/10 15:30, Ashley Sheridan wrote: On Wed, 2010-03-31 at 15:30 +0100, Pete Ford wrote: Hi All, I have a web project built in PHP which we want to break out part of into a stand-alone GUI program. The architecture is fine - display nicely separated from logic, so coding is not a problem

Re: [PHP] Re: PHP in HTML code

2010-03-18 Thread Pete Ford
On 17/03/10 18:59, Tommy Pham wrote: On Wed, Mar 17, 2010 at 11:01 AM, Rene Veermanrene7...@gmail.com wrote: hmm.. seems easier to me to push a filetree of .php's with?= through the str_replace(), than it is to get all the?= writers to comply with your wishes, which may not apply to their

Re: [PHP] Re: Enforce a constant in a class.

2010-01-25 Thread Pete Ford
Richard Quadling wrote: 2010/1/22 Pete Ford p...@justcroft.com: IMHO, a constant is not the correct beastie in this case - if you want it to be different depending on the implementation then it ain't a constant! You should probably have protected static variables in the interface, and use

[PHP] Re: Enforce a constant in a class.

2010-01-22 Thread Pete Ford
'; self::$notes = Test; } } Cheers Pete Ford -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: how to retrieve a dom from innerHTML......

2010-01-20 Thread Pete Ford
I am on the top of the world! Borlange University wrote: hello, i can obnot retrieve a select ject from div innerHTML. what i want to do is that when a page is loaded, first selector,say #1, would be shown in the first div by sending a request.then i choose one option from #1, fire change event

[PHP] php/ruby drb adapter

2010-01-14 Thread Pete Yadlowsky
of those same types. All data translation and inter-process communication is transparent. It's just as if a local object instance is being messaged directly. If there's interest, I'd like to offer DRbClient to the php community, but I'm not sure how to go about that. -- Pete Yadlowsky ITC Unix

Re: [PHP] strtotime - assumptions about default formatting of dates

2010-01-04 Thread Pete Ford
On 24/12/09 16:59, Bastien Koert wrote: On Thu, Dec 24, 2009 at 9:12 AM, teddtedd.sperl...@gmail.com wrote: At 10:20 PM +1000 12/24/09, Angus Mann wrote: Hi all. I need to allow users to enter dates and times, and for a while now I've been forcing them to use javascript date/time pickers so

[PHP] Re: strtotime - assumptions about default formatting of dates

2009-12-24 Thread Pete Ford
in the AJAX calls, and it requires JavaScript. If you wanted to do without JavaScript you could do a similar parse-format sequence when the form is submitted and show a confirmation page with your server's interpretation of the date. Cheers Pete -- PHP General Mailing List (http://www.php.net

[PHP] Lookimg for a script....

2008-07-15 Thread Pete Holsberg
Can anyone point me to a (free) script that will ask for a person's email address and username, and then look up the password that's in a plain text file? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie question about sending email

2008-04-17 Thread Pete Holsberg
Daniel Brown has written on 4/16/2008 5:20 PM: On Wed, Apr 16, 2008 at 5:14 PM, Pete Holsberg [EMAIL PROTECTED] wrote: Why do I need both from_addr and field_4 (Email Address)? Could I just use $from = $_POST['field_4']? Sorry, I noticed it after I started rewriting the form

Re: [PHP] Newbie question about sending email

2008-04-17 Thread Pete Holsberg
Daniel Brown has written on 4/17/2008 12:29 PM: I'll reiterate: Note the mail() parameters. There's no header information there. RTFM: http://php.net/mail You just have your mail() function wrong. Reiterating my code as well (with updated field_4 data): ?php

Re: [PHP] Newbie question about sending email

2008-04-17 Thread Pete Holsberg
Ooops! processor.php is now: ?php $where_form_is = http://.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF'])./; $to = [EMAIL PROTECTED],[EMAIL PROTECTED]; $subject = SUBSCRIBE; //$from = $_POST['field_4']; == this was the culprit $body = Form data: Name: .$_POST['field_1'].

[PHP] Newbie question about sending email

2008-04-16 Thread Pete Holsberg
I wanted a form for people in my community to use to subscribe to a yahoo group that I run. Not being a PHP programmer, I created the form with phpFormGenerator from SourceForge. It works fine except that the email that gets sent to yahoo appears to come from my web host's domain! How can

Re: [PHP] Newbie question about sending email

2008-04-16 Thread Pete Holsberg
Daniel Brown has written on 4/16/2008 4:04 PM: On Wed, Apr 16, 2008 at 3:53 PM, Pete Holsberg [EMAIL PROTECTED] wrote: I wanted a form for people in my community to use to subscribe to a yahoo group that I run. Not being a PHP programmer, I created the form with phpFormGenerator from

Re: [PHP] Newbie question about sending email

2008-04-16 Thread Pete Holsberg
Daniel Brown has written on 4/16/2008 4:56 PM: On Wed, Apr 16, 2008 at 4:39 PM, Pete Holsberg [EMAIL PROTECTED] wrote: The entire processor.php file is: ?php $where_form_is=http://.$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),/)); mail([EMAIL PROTECTED],[EMAIL

[PHP] php ajax

2006-02-15 Thread pete
ello all, Im a beginner at php. but I was able to get this script to work. Now I am looking to have it automatically refresh itself using ajax every 10 seconds. Can somebody explain or show me how to do this. Thank you. PHP Code: | | |?php $httpfile =

[PHP] Devenix Live CD PHP4 and PHP5 project needs help

2006-01-22 Thread Pete Savage
Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: array diff with both values returned

2005-05-06 Thread pete M
http://uk2.php.net/manual/en/function.array-diff.php http://uk2.php.net/manual/en/function.array-diff-assoc.php Blackwater Dev wrote: Hello, Is there a good way to get the difference in two arrays and have both values returned? I know I can use array_dif to see what is in one and not the other

[PHP] is_numeric

2005-05-04 Thread pete M
.. any ideas.. need to validate anything without 0-9 and a dot within tia Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Check for doubleposts

2005-05-04 Thread pete M
set a $_SESSION['var'] at the end of the first post and check for this the second time around pete Fredrik Arild Takle wrote: Hi, what is the easiest way to check if a person i registered twice in a mysql-table. Lets assume that I only check if the last name is in the table more than once

[PHP] Re: Templating engines

2005-04-29 Thread pete M
Hi clive I tried all of them and I must admit smarty comes out on top by a mile I use it on a very busy virtual host and have had NO problems with slow script etc, highly recommended http://smarty.php.net pete Clive Zagno wrote: Hi all, What templating engines do you use with php and why? Ive

[PHP] Re: POP access to gmail

2005-04-29 Thread pete M
http://phpmailer.sourceforge.net/ excellent and easy to use class Malcolm Mill wrote: Does anyone know of a PHP script to access gmail's POP services? Thanks, Malcolm. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] .htaccess

2005-04-19 Thread pete M
I'm trying to figure out out to put a directive in .htaccess to make the session timeout in 4 hours .. tried php_flag session.cookie_lifetime 240 and a few others can someone help ! tia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] email through PHP

2005-04-19 Thread pete M
check out phpmailer http://phpmailer.sourceforge.net/ use it all the time - its brilliant !!! Balwant Singh wrote: hi, I am using FEDORA 3 and PHP. I want to send email to outside by my above mentioned linux machine through PHP. For this i want to use my SMTP sever, which is on a WINDOWS machine

Re: [PHP] email through PHP

2005-04-19 Thread pete M
http://phpmailer.sourceforge.net/extending.html Balwant Singh wrote: hi, I am using FEDORA 3 and PHP. I want to send email to outside by my above mentioned linux machine through PHP. For this i want to use my SMTP sever, which is on a WINDOWS machine Please inform what setting to be done in

[PHP] Re: mailing lists

2005-04-19 Thread pete M
check out hotscripts.com Clive Zagno wrote: Hi does anyone use any cool php mailing list software. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] reducing array size

2005-04-16 Thread pete M
Is there an easy way to trim an array ? I'm using array_unshift to push elemnts onto the front of an array but I want to limit the size to 20 ?? Is there an easy way to do this without looping and unsetting the elements ?? tia Pete -- PHP General Mailing List (http://www.php.net

[PHP] query error

2005-04-16 Thread pete M
\freeserve\help\images\' tia Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] regular expressions

2005-04-14 Thread pete M
,'',$txt); What I'm trying to do is match the font-size: and replace everything up to the ; with '' ie nothing dont work Feel I'm so close ;-( tia Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regular expressions

2005-04-14 Thread pete M
The pattern $pattern = 'font\-size:.*?\;'; throwns the error eregi_replace(): REG_BADRPT Erwin Kerk wrote: pete M wrote: I've been messing about with this for a while to no avail.. so help would be appreciates I'm new to regular expressions and tried this with preg_replace, now I'm using

Re: [PHP] regular expressions

2005-04-14 Thread pete M
Thankyou Diolch danka There seems to be a big difference between eregi_replace() and preg_replace Am reding teh Sams - Regular Expressions in 10 mins bu the syntax seems ot be different. !! regards pete Erwin Kerk wrote: pete M wrote: The pattern $pattern = 'font\-size:.*?\;'; throwns the error

[PHP] Re: Ad software

2005-03-16 Thread pete M
check www.hotscripts.com Ryan A wrote: Hey, I am looking for a software that just lists adverts... eg: Like ebay but without the bidding Requirements are simple, so simple that i am sure something like this exists and i dont have to write it myself: 0.They must register first then... 1.offer the

[PHP] Re: PHP and Access

2005-02-26 Thread pete M
Check this out http://adodb.sourceforge.net/ http://phplens.com/adodb/code.initialization.html#init have fun Pete Bruno Santos wrote: Hello. I need to to an application in PHP with graphics creation. The database where i need to go and fetch the values is access. is possible for PHP to fecth

[PHP] Re: help with adding

2005-02-26 Thread pete M
Jay Fitzgerald wrote: I have messed with this for a couple of days and cant get it right. Maybe I need sleep :-) The code below is echoing the qty correctly (10, 5, 25) $total = 0; for ($i = 1; $i = $sendnum; $i++) { $qty = $_POST['qty'.$i]; echo $qty . 'br /'; $total

[PHP] Re: Destroying the Session Object

2005-02-19 Thread pete M
here's the way I do it logout.php ?php session_start(); $_SESSION = array(); session_destroy(); header('Location: login.php'); ? Jacques wrote: I am developing an application. When the user signs in a Session ID is created (for argument sake: 123). I have a sign out page that has the script

[PHP] Re: Missing $GLOBALS SCRIPT_URI

2005-02-19 Thread pete M
try $_SERVER['SCRIPT_URI']; Gary C. New wrote: I am writing some php code that requires the $GLOBALS['SCRIPT_URI'] variable. When I access the code under its encrypted (https) location it is available without issue. However, when I try to access the code under its unencrypted (http) location it

[PHP] Re: retrieve single field from database without while loop

2005-02-16 Thread pete M
Check out abstraction layers I use adodb http://adodb.sourceforge.net/ makes coding much much easier ;-)) eg - mysql example $sql = insert into table (col, col2)values('$this','$that'); $db-execute $sql; // get last id $new_id = $db-getOne('select last_insert_id()'); have fun Pete [EMAIL

[PHP] fsockopen

2005-02-01 Thread pete M
that this server could not understand. Client sent malformed Host header Am I missing the obvious as I cannot thing of any other options ;-(( tia pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: sending attachment by email - can't find a bug?

2005-01-15 Thread pete M
You need to post some code #are you using phpMailer - makes emails a doddle http://phpmailer.sourceforge.net/ Afan Pasalic wrote: I have a form and once the form is submitted, php code build csv file with entered information and store it on server in temp file. Then send this file as an

Re: [PHP] help with html through php

2004-11-21 Thread Pete
you have. Todd A further point (since you are newbie G) is to remember that abc.html will not normally be a complete page on it's own - it will only have the parts of the final page that you actually want to include, not all the HEAD... BODY stuff... -- Pete Clark http://www.hotcosta.com http

[PHP] Re: Unsetting vars when not needed?

2004-11-12 Thread pete M
Unsetting class objects does take time and is really of no benefit unless there are memory problems as for freeing resuslts - the same applies pete Jordi Canals wrote: Hi all, I was working now in a new site developed with PHP 5.0.2 and a wonder came to me: Is usefull and recommended to unset

[PHP] Re: Current URL?

2004-11-12 Thread pete M
$_SERVER['REQUEST_URI']; Matthew Weier O'Phinney wrote: * Jason Paschal [EMAIL PROTECTED]: Trying to get the current viewed page's URL (query string intact). this works, but infrequently: $url = $_SERVER['URI']; and this ignores the query string: $url = $_SERVER['HTTP_HOST'] .

[PHP] Problems with mail function

2004-11-08 Thread Pete
. The client has PHP Version 4.3.1 on Windows NT localhost 5.2 build 3790 -- Pete Clark http://www.hotcosta.com http://www.spanishholidaybookings.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php sessions question

2004-10-21 Thread Pete
that this method is better? -- Pete Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Send variable in include()

2004-10-20 Thread Pete
/guestbook.php?option=viewoffset=$offset'; - guestbook.php - $offset gets value $offset instead of 0 $option has correct value, view How do I write my include so it works? Would appriciate som help. Regards, Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] mod-rewrite

2004-10-17 Thread Pete
? And if absolute is absolutely necessary, should I include the domain name? -- Pete Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mod-rewrite

2004-10-17 Thread Pete
Wow - this is *really* spooky! When I wrote that, with RewriteRule relative URLS within that page no longer work correctly, I had not realised that those within PHP worked ok, whereas those in raw HTML didn't... -- Pete Clark -- PHP General Mailing List (http://www.php.net

[PHP] Re: Knowledgebase/Troubleshooter

2004-10-14 Thread pete M
goto sourceforge.net there's tons of stuff there.. No need to reinvent the wheel ;-))) pete Lee Standen wrote: Hi Guys, I was wondering if anyone knows of a project for creating a troubleshooting wizard, much like in the Microsoft help. I've managed to make something which kind of works myself

[PHP] Generating MySQL Tables

2004-10-04 Thread Pete
are 'a paragraph full'), and work from there. Of course, it doesn't need to be fast to run. -- Pete Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Setcookie doenn't work

2004-09-24 Thread pete M
I've got this function in a class object, however the cookie does not set even though £ok returns true !!! I've got cookies enables on all my borswers (firefox, mozilla, opera , IE).. any ideas !! function updateClient($arr){ extract($arr); //print_r($arr); $sql = update clients set

Re: [PHP] Setcookie doenn't work

2004-09-24 Thread pete M
doh!! ta ;-) S ilvio Porcellana wrote: $ok = setcookie(client_id, argh, 259300); //* expire in a month ish Nope, it expired a long time ago... :-) Read the manual for setcookie: http://php.libero.it/manual/en/function.setcookie.php (mainly the part about the expire parameter) HTH, cheers Silvio --

[PHP] Re: Assign null value using php

2004-09-02 Thread pete M
T Umashankari wrote: Hello, Can any one tell me how to assign a null value to a php string?. I tried assigning empty single quote,backslash with zero,double quotes also. but nothing works.. Regards, Uma $str = NULL; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Error message

2004-08-23 Thread Pete
Hi List, I am getting a strange error notice for the following config file: ?php /** * Database */ $dsn = array( 'phptype' = 'mysql', 'username' = 'root', 'password' = 'secretpass', 'hostspec' = 'localhost', 'database' = 'mydb', ); $options = array( 'debug' = 2,

[PHP] Re: SQL Functions

2004-08-11 Thread pete M
This might be slightly off the topic but I would recommend you use a database abstraction layer which will do what you want to achieve Check out Pear DB http://pear.php.net/manual/en/package.database.db.php and adodb http://adodb.sourceforge.net/ pete Dan Joseph wrote: Hi Everyone

[PHP] Re: sessions not working when page redirects

2004-08-10 Thread pete M
u need to start the session at the top of each page sesion_start(); Angelo Zanetti wrote: Hi all, Im having a slightly weird problem with my session variables. when on a certain page call it A, I register a session variable and assign it a value. I then test if it is registered successfully and

[PHP] Re: Image and variable

2004-08-10 Thread pete M
$myimage = 'hi.gif'; echo img src='$myimage'; Henri marc wrote: Hello, I would like to use a variable instead of an image file name in a html page with this instruction: ?php echo 'img src=$myimage'; ? I tried but the image doesn't show up. Is it impossible or do I do something wrong? My goal is

[PHP] phpmyadmin and UTF

2004-07-27 Thread Pete
Guten Morgen habe gerade im Apache den Default Zeichensatz auf UTF-8 gesetzt und in der phpmyadmin ebenfalls. In der phpadmin GUI habe ich de-utf-8 ausgewählt. Nun kommt folgende Fehlermeldung von phpmyadmin: Die PHP-Erweiterungen iconv und recode, welche für die Zeichensatzkonvertierung

[PHP] Re: phpmyadmin and UTF

2004-07-27 Thread Pete
Sorry, here is the English version: I have just set the Apache Default Char Set to UTF-8. Same thing in the phpmyadmin config file. I chose de-utf-8 in the phpmyadmin GUI. When I try to look at a particular database the following error comes up. Can not load iconv or recode extension needed

[PHP] mod_rewrite

2004-07-01 Thread pete M
Know this is off topic bu can anyone help with a tuotial of something - been looking everywhere All I want is a rule to rewrite www.example.com?page=mypageid=20this=that to www.example.com/mypage/20/this tia Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Re: Best external app from php

2004-06-30 Thread pete M
I had a similar scenario recently the way I tackled the problem was to set a cron to trigger a cli script every minute the script first checked a database to see if there was any jobs queued then processed in the background works a treat pete C.F. Scheidecker Antunes wrote: Hello all, I need

  1   2   3   4   >