[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 but

[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. This

[PHP] is_numeric

2005-05-04 Thread pete M
not a php expert but have filed this bug report re validating is_numeric('3e0'); http://bugs.php.net/bug.php?id=32943 Now tried function isnumeric($n) { if (ereg("^[0-9]{1,50}.?[0-9]{0,50}$", $n)) { return true; } else { return false; } } and that doent seem to work either.

[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] 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 bee

[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

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.ini

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 Pl

[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

[PHP] query error

2005-04-16 Thread pete M
I've got a database table with a whole list of "windows" file paths. eg Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Excel.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Office Setup.lnk Advent Tower

[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/) To unsubs

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

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_rep

[PHP] regular expressions

2005-04-14 Thread pete M
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 eregi_replace ! here's the text $txt = 'It blahh blahhh blahhh of '; what I want to do it take the font-size and font-family a

[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 pe

[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 . ''; $total += $

[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 values

[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 i

[PHP] Re: Destroying the Session Object

2005-02-19 Thread pete M
here's the way I do it logout.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 session_destroy() on it. This page directs me to the sign in page. When I sign the same or any oth

[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 PROTE

[PHP] fsockopen

2005-02-01 Thread pete M
am not having a lot of success with opening a socket to a secure domain (php 4.3.8 - apache - openSSL) $fp = fsockopen($url , 443 ,$errno, $errstr, 30); have tried the following $urls --- $url = 'domain.net'; Bad Request Your browser sent a request that this server could not u

[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 atta

[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'] . $_SERVER['PHP_SEL

[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 a c

[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,

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 Silv

[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 n

[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: http:/

[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: Image and variable

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

[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] 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=mypage&id=20&this=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

[PHP] Re: mail program

2004-06-28 Thread pete M
http://phpmailer.sourceforge.net/ check the tutorials Syed Ghouse wrote: > Hi all > > i want to send more than 1000 mails from php program at a time.how can i send it and > will the execution of program become slow. > > pls reply to the above ASAP > > syed > -- PHP General Mailing List (h

[PHP] Re: Date Select

2004-06-25 Thread pete M
select * from table where week(date_field) = ( week(now()) -1 ) Tom Chubb wrote: How can I query a MySQL table to get the latest results from a date field? Basically, I am inserting several records at a time at the end of each week. I want to have a page that displays the results for the last week

[PHP] Re: Please Send MIME Script

2004-06-22 Thread pete M
http://phpmailer.sourceforge.net/ Ryan Schefke wrote: Could someone please send me a function for MIME mail. I've been searching for the past 3 hours and haven't come across anything that is solid and works for me. I need the following: 1 - send MULTIPLE attachments 2 - send message in html an

[PHP] Re: Sending email with php

2004-06-16 Thread pete M
I use phpMailer http://phpmailer.sourceforge.net/ makes mailing a doddle pete Phpu wrote: Hi, How can i send email in php usig the smtp server? I'm looking for a tutorial or a good script. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Refresh a frame?

2004-06-10 Thread pete M
in Javascript frame_name.reload() Robert Sossomon wrote: I am in need of a way to reload a page within a frame as the other frames are used to modify the information. I have a 3-frame site now that I am using 1 frame as a list, another frame to add the information, and the 3rd frame to show the res

[PHP] Re: Text Box question

2004-04-21 Thread pete M
Brent Clark wrote: Hi all I have a problem where, when I click on a link and when the page is finish loading I would like for the cursor to ready in the correct html text box. I cant seem to find a solution If anyone could help, that would be most appreciated Kind Regards Brent Clark Stick this i

Re: AW: [PHP] smarty

2004-04-16 Thread pete M
I don't see why you keep persisting this thread. Smarty is a cool tool and lots of people use it. You have decided NOT to use it. So why keep going on; you not like Smarty; are you encouraging users not to use Smarty. I don't see your point at all !!! There's more than one way of skinning a ca

[PHP] session timeout

2004-04-16 Thread pete M
Am trying to increae the session lifetime to 8 hours ish using this code ini_set('session.gc_maxlifetime',28800); does not work ? any ideas Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Bar/Line Graph Tool

2004-04-16 Thread pete M
http://www.aditus.nu/jpgraph/ By far the best I've seen is jpgraph, does Gantt too as well as 3d pie et all.. Easy to code 2 and the manual is cvomprehensive pedro Richard Hawkes wrote: Good morning gang, I'm looking for a snazzy line/bar graph class. I've got GD running, with just the bas

Re: [PHP] Re: PHP editor

2004-04-15 Thread pete M
>> Unfortunately most of the $ signs usually get messed up... Because I'm in the UK I use £ instead of $ and do a global search and replace Richard Harb wrote: Finally somebody else who does it that way Unfortunately most of the $ signs usually get messed up... So ... which ocr program do you u

[PHP] Re: PHP editor

2004-04-15 Thread pete M
I code with pencil and paper then scan it with OCR ;-)) Arthur Radulescu wrote: Hello! This might sound like a stupid question but could anyone recommand a good PHP editor... I have used some editors until now but each one has some problems... Right now I am using PHPed which is pretty good but

[PHP] Re: PHP editor

2004-04-15 Thread pete M
I use dreameaver. Arthur Radulescu wrote: Hello! This might sound like a stupid question but could anyone recommand a good PHP editor... I have used some editors until now but each one has some problems... Right now I am using PHPed which is pretty good but oine of the major problems is that it d

Re: [PHP] smarty

2004-04-14 Thread pete M
Curt Zirzow wrote: :0 * ^Subject: Re: smarty /dev/null Curt agreed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: smarty

2004-04-14 Thread pete M
>> + bound to the php-interpreter and cannot be used w/ other languages. this point is completely invalid... Haame me any other templating system that can be used across diffeerent languages ?? + content rendering process cannot be separated from the application > server. ITS NOT AN APPLICATION

Re: [PHP] Re: smarty

2004-04-14 Thread pete M
Actually where it =really speeds thing up is the prototype/research/planning etc We sit in front of a PC and mock up the forms/ pages/ nav bar etc.. That stuff then gets coded. Doddle Pete Vicente Werner wrote: El Wednesday 14 April 2004 13:33, Chris de Vidal escribió: pete M said: Moving

Re: [PHP] Re: smarty

2004-04-14 Thread pete M
Hallman wrote: Apr 14 at 9:33am, Chris de Vidal wrote: pete M said: Moving our sites to smarty is the best thing we've done at our company. Just a few weeks ago, I'd have agreed wit' yah, but now I see Smarty as mostly (not always) redundant. see my post where

Re: [PHP] Re: smarty

2004-04-14 Thread pete M
logic. Vicente Werner wrote: El Wednesday 14 April 2004 13:33, Chris de Vidal escribió: pete M said: Moving our sites to smarty is the best thing we've done at our company... Just a few weeks ago, I'd have agreed wit' yah, but now I see Smarty as mostly (not always) redundant. See my

Re: [PHP] Re: smarty

2004-04-14 Thread pete M
code that lot and remember its ALL to do with presentation ? pete Chris De Vidal wrote: pete M said: Moving our sites to smarty is the best thing we've done at our company... Just a few weeks ago, I'd have agreed wit' yah, but now I see Smarty as mostly (not always) redundan

[PHP] Re: smarty

2004-04-14 Thread pete M
Moving our sites to smarty is the best thing we've done at our company... I do the php/database coding (logic) the html designer does the templates/css and the graphic designer does his bit. What's fantastic is that we never ever tread on each other files whilst working on a project, unlike derea

[PHP] Re: Executing PHP shell script in PHP

2004-04-06 Thread pete M
Brent Clark wrote: Hi Does anyone know of how to execute a php shell script in a php file. Kind Regards Brent Clark assuming *nix php myscript.php or stick at the beginning of the file #!/bin/php and then run ./myscript.php hope it helps pete -- PHP General Mailing List (http://www.php.net

[PHP] Re: Sessions and PHP

2004-03-31 Thread pete M
THis does the same http://0x00.org/php/phpApplication/ pete Patrik Fomin wrote: Hi,, is there anyway to get the number of people connected to the site? in asp you just use Application and session_terminate to accomplish this is there anyway to do this in PHP ? regards patrick -- PHP General Ma

[PHP] preg_guru

2004-02-23 Thread pete M
I'm trying to group matches.. the string is (all one line) :2002020720020208: [EMAIL PROTECTED]://www.azlyrics.com __ continued... /s/springsteen.html?dsd=sadsa&etc=tec here the first bit I'm trying to match :2002020720020208: preg_match("(:[0-9]{16}:)", $contents, $match); and then the default@ w

[PHP] Re: Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread pete M
Brian Dunning wrote: This inserts nothing into the database, but returns no error that I can see. How come? What's wrong with it? $dbname = "my_database"; $dbconnection = mysql_connect("mysql05.powweb.com","my_user","my_pass"); mysql_select_db($dbname, $dbconnection); $query = "INSERT INTO invoi

[PHP] preg guru again.....

2004-02-23 Thread pete M
Am trying to do a strange thing with php.. Extract the urls from the Internet Explorer index.dat history files (dont ask why!) Here is a snippet ð­ :2002020720020208:[EMAIL PROTECTED]://www.lyricsworld.com/cgi-bin/search.cgi?q=Bruce +Springsteen&m=phrase&ps=20&o=0&wm=wrd&ul=&wf=1ð­ð­ð­ð­ it

[PHP] Re: sending reply, the continuing

2004-02-20 Thread pete M
Does this mean the end of the script termination does NOT need to be sent back to the browser ? This smacks of something I needed recentyle with sending reports The way I got around it was to Create a flatfile database table with the job entries in it Create a crontab that executed and cheked

Re: [PHP] Finding orphan functions

2004-02-18 Thread pete M
Wicked - that's the best tip I've seen for a long time... TA Gareth Williams wrote: Well if you are a unix/linux/os x user, drop to the command line, go to the directory with all the php files, and type in: grep php or if your php files are scattered around a load of sub-directories, then go

[PHP] Re: DCOM , PHP on Linux

2004-02-18 Thread pete M
Which EntireX pete onrad Strydom wrote: Hi there guys, We have a PHP application on a remote linux machine that needs to interoperate with a COM based interface on a windows machine. If both where on the same win32 machine things would have been easy , but unfortunately they aren't. What are

[PHP] regular expressions

2004-02-17 Thread pete M
Getting completely confused how this stuff works !!! Anyone recommend a book for a regex newbie ? pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] preg guru question

2004-02-13 Thread pete M
Im trying to scan a file and lift the image name from the ie where there could be ' or " I messed around but am 2 embarassed to post code cos it dont work ;-( thanks in advance pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: array data

2004-02-11 Thread pete M
Think this is what u want Imran Asghar wrote: Hi, Is not working, is it correct way File1.php $v { ?> File2.php echo $colors[1]; echo $colors[2]; echo $colors[4]; ?> imee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

[PHP] Re: COM objects

2004-01-27 Thread pete M
I personally abandoned using any com object a few months ago as maintaining and identifying similar problems took mmore time that writing effective code to make the system steady... C C wrote: Hi, I am running PHP 4.3.4 on Windows 2000 server with Apache 2.0.48. I am using COM objects in some o

[PHP] Re: limit mysql connections

2004-01-09 Thread pete M
check out the mssql.max_links setting in php.ini There's a dew other settings in there 200 pete Diana Castillo wrote: Is there any way to limit the connections so that this error never happens? Warning: mysql_connect(): Too many connections at /home/local/global/php/libraries/dblayer_mysql.php li

[PHP] Re: deamon / server

2004-01-09 Thread pete M
What you trying to achieve... Decapode Azur wrote: hello, Is it possible to make php scripts working like deamons and build something like a server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Newbie with sorting problem

2004-01-06 Thread pete M
Just add order by to the sql query instead eg "SELECT id, name, surname, address FROM addresses order by name asc"; or descending on surname eg "SELECT id, name, surname, address FROM addresses order by surname desc"; hope this helps Pete Bart Koppe wrote: Hi all, I'm quite a newbie ot php/mys

[PHP] Re: How can i build e-commerce site with php?

2003-12-22 Thread pete M
go and check out www.hotscripts.com - there's load of ecomerecce scripts there. regards Pete Pehepe Php wrote: Hello. How can i build e-commerce site with php. Do you know any source,documentation,e-book. Please help me. if you use msn messenger, please add me your contact list. messenger : [E

[PHP] Re: php special permissions

2003-12-18 Thread pete M
Have u looked at "sudo" and "sudoers" http://www.courtesan.com/sudo/ http://www.courtesan.com/sudo/man/sudoers.html regards pete Mat Harris wrote: Hi, I am building a web interface to the vacation autoresponder program on linux. I let users login, edit their message and enable the autoresponde

[PHP] Re: Age from birthdate?

2003-12-11 Thread pete M
have you looked at to_days() and to_years() in the mysql manual Dvdmandt wrote: How would I get the age of someone if I store the birthdate in a date field? I just realized FLOOR((UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(birthdate))/60/60/24/365.25) wont work for persons born before 1970... :p I m

[PHP] preg_match

2003-12-05 Thread pete M
could someone explain what this bit of code does please... if (!preg_match("/^".$thumbname."/",$item)) { } tia PEte -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Completely Daft Question

2003-12-03 Thread pete M
For the exe part, check this list or > the internet for [PHP commandline]. Didn't think calling that from VB - ta - problem solved Pete Chris Hayes wrote: At 15:27 3-12-03, you wrote: I have written and applicaiton in VB (yuck but that's what the client wants) and part of the application involv

[PHP] Re: Need help

2003-12-03 Thread pete M
Mba wrote: How could I use this php code, in order to show the ip in a web page? thanks - Do you Yahoo!? Free Pop-Up Blocker - Get it now -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Completely Daft Question

2003-12-03 Thread pete M
I have written and applicaiton in VB (yuck but that's what the client wants) and part of the application involves importing and processing text files. For that I turned to php;-) for all its processing power as a shell script. Now here is the daft question. How would I go about embedding the p

[PHP] preg_replace Guru question

2003-11-27 Thread pete M
What Preg_replace code would I need to highlight all the code within the "

[PHP] Re: IE download problem

2003-11-26 Thread pete M
thsi si a nighmare area. and loast days on same problem This works for me.. hope it does for you $file = $_GET['file']; $path = '/www/cgi-bin/docu/personal/'.$file; //force download dialog header("Content-type: application/octet-stream\n"); header("Content-disposition: attachm

Re: [PHP] Locking mysql tables with PHP

2003-11-25 Thread pete M
UPDATE tblfoo SET value= (value+1) WHERE conditions Tony Crockford wrote: On Tue, 25 Nov 2003 07:15:10 -0600, Jay Blanchard <[EMAIL PROTECTED]> wrote: [snip] is there a way I can get a number and increment it all in one query then? [/snip] UPDATE tblFoo SET value = (value+1) WHERE conditions

[PHP] Re: Locking mysql tables with PHP

2003-11-25 Thread pete M
Another idea would ne to use an "application" variable.. This is like a Session variable but is site wide http://0x00.org/php/phpApplication/ regards Pete Tony Crockford wrote: Hi bit confused! here's what I want to do: get a numeric value from a MySQL table, do a calculation, then on anoth

[PHP] Re: Locking mysql tables with PHP

2003-11-25 Thread pete M
On way to do it would be to create a table called flags and update the value in that psuedo code update flags set locked =1 get value to calculate otheruesrs would check the page select locked from flags if NOT locked then do query on the update page update table set calculation = result update

[PHP] whaw

2003-11-24 Thread pete M
Even the pros systems crash sometimes http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Setting counter in variable name within foreach loop

2003-11-24 Thread pete M
Jake McHenry wrote: Is this possible? I've been messing with this for about an hour now, searching on google for about half hour. Here is what I want to do: foreach ($array as $key => $value) { $value = explode("|", $value); $counter = 0; if ($value[7] == "Yes") { $counter++; $date

[PHP] Re: Usort an array.

2003-11-20 Thread pete M
array_reverse() Vincent M. wrote: Hello, I have an array like that: $return[0]["photo"] = monuments_01.jpg $return[1]["photo"] = monuments_00.jpg $return[2]["photo"] = monuments_03.jpg $return[3]["photo"] = monuments_02.jpg $return[4]["photo"] = monuments_04.jpg If I use the

[PHP] Re: Avoiding duplicate orders?

2003-11-20 Thread pete M
psuedo code session_start() if (incoming POST and $_SESSION['in_database'] != 1) { insert to DB $_SESSION['in_database'] = 1 } pete J J wrote: What is the simplest way to avoid duplicate order entry on a form? Some people aren't patient enough to wait for the SSL/credit card pr

[PHP] Re: Session vars not echoing?

2003-11-20 Thread pete M
need to issue a session_start() at top of page Pete Jas wrote: Not sure why this is happening but I think it has something to do with an include statement... [Server environment] Apache/2.0.47 (Unix) DAV/2 PHP/4.3.3 register_globalsOnOn report_memleaksOnOn safe_modeOffO

[PHP] Re: HTTP Authentication thru PHP

2003-11-19 Thread pete M
its probably because its possible to authenticate with an url ? eg http://name:[EMAIL PROTECTED] Chandu Nannapaneni wrote: hello all , I'm able to get successfully http authenticated from my php scripts Ex : $header = "POST /myscript.php HTTP/1.0\r\nAuthorization: Basic "; $header .=

[PHP] Re: MS SQL Connectivity from Linux

2003-11-19 Thread pete M
I use PEAR db http://pear.php.net/manual/en/package.database.php http://pear.php.net/manual/en/package.database.db.intro-dsn.php this is included with the php distibution and makes swapping databases a doddle pete Fernando Melo wrote: Hi everyone, What is the quickest and easiest way to enable

[PHP] Re: [Q] Development Best Practices

2003-11-18 Thread pete M
definately take a look at smarty.php.net Might take a day or so to get used to the concept bit it makes maintaing and creating large sites (and small) a doddle. Main thing is that it seperated php code from html can't imagine not using it on any site anymore.. pete Adam wrote: All, I'm not

[PHP] Re: Headers Sent Message

2003-11-14 Thread pete M
If the files are included then one of the "catch me's" is when theres a space before or after the tags pete Mark Roberts wrote: Could someone help me out with this. I had this problem about a year ago with another site and I can't for the life of me remember what I had to do to fix it. I am in

[PHP] session timeout

2003-11-13 Thread pete M
How do I set the session timeout - eg someone leaves a broweser for say half an hour then have to log in again.. As I'm on an intranet I want to increase ro 3 hours Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Remove HTML TAGS

2003-11-13 Thread pete M
strip_tags() function ;-) D. Jame wrote: HI, Is ther any way to remove HTML tags from Source File with PHP jame -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: wiki

2003-11-13 Thread pete M
tikiwiki.org me love it Pete Dennis Gearon wrote: I need a wiki, VERY simple. BUT OTOH, it'd be nice if it had the ability to display, or attache a picture to a topic. Any good stuff known to exist? MySQL background. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

[PHP] Re: index.php4 broken

2003-11-12 Thread pete M
Why not save the file as index.php Michael Seely wrote: HI -- I just broke something simple and I'm stuck. I've been using index.php3 as the start file in each directory for a long time. I just set up a new site using php4 and the index.php4 pages are not displayed as the default page for the

[PHP] Re: Show total records based on criteria

2003-11-12 Thread pete M
Tim Winters wrote: select EyeColor, count(eyeColor) from males group by eyecolor ;-) Hello, Sorry for the probably newbie question. Is there a way to show the number of records in a recordset based on a specific criteria? For example, if I create a record set of all male employees regardle

[PHP] Re: newbie question about scope

2003-11-12 Thread pete M
things to check.. check the register_globals flag in php.ini - you can also set this using ini_set() Check the short_open_tags are either on/off - again this chan be changes in ini_set() pete News.Comcast.Giganews.Com wrote: I am an experienced web developer who is just getting into php. I h

[PHP] Re: single quotes in database

2003-11-07 Thread pete M
also check magic_quotes_runtime in php.ini. This add's slashes to incoming Post/get variables You can change this at tun time with the ini_set() function pete Steve Buehler wrote: I am using PHP/MySQL and am having a problem. We have some names and addresses in the database that have single

[PHP] Re: Send data Header Response

2003-11-07 Thread pete M
psuedo code index.php code to process form if(no_errors) redirect to another page ?> " > YOur submitting the form to itself so the $_POST variable is available in the form hope it help Pete Jonathan Villa wrote: I would like submit a form to a page, do some processing on that page, then

[PHP] Re: PHP 4.3.2, HTML and MSSQL2000

2003-11-07 Thread pete M
echo ""; Rique Gresham wrote: Hi All, I'm having trouble with a input box disappearing when using php to generate the input box. I tested this script in a test.htm and worked fine. Does it have something to do with the script being inside the statement? Any help would be appreciated. Thanks

[PHP] Re: trouble with forcing output to be cached

2003-11-07 Thread pete M
This posting has made me think.. Problem is server side because the script executes to create the image and the script runs every time.. Try writing out the image to a file and then send that to the browser >>psuedo code if image NOT exists create it write to file embed file pete Ilja Polivanov

[PHP] Re: How can i run DOS command from browser

2003-11-07 Thread pete M
from the manual '; // Outputs all the result of shellcommand "ls", and returns // the last output line into $last_line. Stores the return value // of the shell command in $retval. $last_line = system('ls', $retval); // Printing additional info echo ' Last line of the output: '.$last_line.' Return

[PHP] binary or text file

2003-11-06 Thread pete M
I'm doing a bit of data recovery using php as the scripting language.. Is there a way to determine is a file is binary or text ? all the files are recovered but the file names do not have extensions ! eg chkdsk.exe would be dgfhgj5767363874 as a file name pete -- PHP General Mailing List (http:/

  1   2   >