Re: [PHP] Session cookies in firefox

2005-05-10 Thread Richard Lynch
On Tue, May 10, 2005 7:04 pm, Kirsten said: > I'm using php sessions with cookies. > I realized that Firefox shared cookies between different instances (unlike > IE that when someone open a new bank window a new session is created). That's because IE stupidly creates a whole new program/process on

Re: [PHP] fgets fails after fopen succeeds

2005-05-10 Thread Richard Lynch
On Tue, May 10, 2005 7:42 pm, Thomas Powell said: > Printing $fh printed a 1. > > My original file mode was just "r", I changed to "r+" to see if I'd get > permissions problems. The file handle seems to be fine. fgets just doesn't > like it. > > This is an adaptation of the following code, which wo

[PHP] Inner Join or 2nd Query...?

2005-05-10 Thread Mark Sargent
Hi All, with wanting to show both product types(Switch, Router etc) and Makers(Cisco, Avaya, etc) on the one page in select boxes, I was wondering, do you use 2 seperate queries to the database or do you inner join to get all in 1..? I have set up different tables with related id's etc. So, to

[PHP] Strange characters

2005-05-10 Thread Carl Furst
I have a question about an odd phenomenon. It doesn't have much to do with PHP except that I used strtr to solve it, and it maybe that the problem is being caused by a setting in PHP, but I would like to get some more background info as to why this is happening. On a typical Windows system, mos

[PHP] protect your CSS files, and possibly other extenstions as well...

2005-05-10 Thread Kit DeKat
I recently discovered a php method to hide text-based files from remote users while allowing access to your internal pages and scripts. You can take advantage of this technique as well to protect your artistic rights: There are two variants: one for php scriptss and their included counterparts and

[PHP] base64_encode in URLs

2005-05-10 Thread Joe Harman
Hey just curious if it's okay to encode variables that are passed in URLs with base64_encode??? since, I am going to pass a email address in the URL, I would like to protect the email address from typical people -- Joe Harman - Do not go where the path may lead, go instead where there is

Re: [PHP] Exec don't work

2005-05-10 Thread Greg Donald
On 5/10/05, Richard Lynch <[EMAIL PROTECTED]> wrote: > I use exec() instead of system() > > I find it's rare that I don't want to capture the resulting output (arg 2) > and do something intelligent if the OS returns an error (arg 3) For some reason I always thought exec() only took a single argum

Re: [PHP] Templating systems for single developers?

2005-05-10 Thread Robert Cummings
On Tue, 2005-05-10 at 17:17, Murray @ PlanetThoughtful wrote: > Hi All, > > So, if anyone out there uses a templating system (ie Smarty, PHPSavant etc) > and they don't work in a team environment, I'd love to hear what benefits > you derive from so doing. I do for as many projects as possible. No

Re: [PHP] String manipulation out of the box solution?

2005-05-10 Thread Richard Lynch
On Tue, May 10, 2005 5:58 am, Merlin said: > I am writing an internal full text search engine and do have trouble in > outputting the text in an apropriate way. > > Problem is that if there is more than one word I cant handle the text > cropping. > > For example: > Search term: php germany > Text f

Re: [PHP] include remote class

2005-05-10 Thread Richard Lynch
On Tue, May 10, 2005 10:10 am, Andy Sandvik said: > > im doing include('http://www.mysite.com/class.php'); > and then i create new instance but i get error - cannot instantiate > non-existant class > how can i get this remotely hosted class file to be defined? If you surf to that URL, do you see P

Re: [PHP] number format?

2005-05-10 Thread Tom Rogers
Hi, Wednesday, May 11, 2005, 1:34:10 AM, you wrote: DW> I have a number like -56.98 DW> I need to convert it to -5698. I tried DW> --- DW> Outgoing mail is certified Virus Free. DW> Checked by AVG anti-virus system (http://www.grisoft.com). DW> Version: 6.0.859 / Virus Database: 585 - Release

Re: [PHP] fgets fails after fopen succeeds

2005-05-10 Thread Richard Lynch
On Tue, May 10, 2005 1:34 pm, Thomas Powell said: > Summary: > fopen returns a file handle, yet fgets doesn't want to read it. I've > scoured > google, php.net , phpfreaks, usenet, etc. It seems to work > elsewhere. > > My setup: > Apache 2.0.47 > PHP/5.0.4 > Windows 2000 > > The ca

Re: [PHP] fgets fails after fopen succeeds

2005-05-10 Thread Thomas Powell
Printing $fh printed a 1. My original file mode was just "r", I changed to "r+" to see if I'd get permissions problems. The file handle seems to be fine. fgets just doesn't like it. The 0 && !feof() was a "commenting out" of the for loop to prevent the fgets from running so that I so print the

Re: [PHP] Exec don't work

2005-05-10 Thread Richard Lynch
On Tue, May 10, 2005 1:42 pm, Greg Donald said: > I use system() instead of exec(), I find it's rare than I don't want > to capture the resulting output of my commands. I use exec() instead of system() I find it's rare that I don't want to capture the resulting output (arg 2) and do something int

[PHP] Session cookies in firefox

2005-05-10 Thread Kirsten
I'm using php sessions with cookies. I realized that Firefox shared cookies between different instances (unlike IE that when someone open a new bank window a new session is created). Has anyone found a solution to this problem? Maybe detecting the new instance and generating a new session id. Tha

[PHP] Session cookies in firefox

2005-05-10 Thread Kirsten
I'm using php sessions with cookies. I realized that Firefox shared cookies between different instances (unlike IE that when someone open a new bank window a new session is created). Has anyone found a solution to this problem? Maybe detecting the new instance and generating a new session id. Tha

Re: [PHP] Question about acessing databases and formatting output

2005-05-10 Thread The Doctor
On Mon, May 09, 2005 at 10:41:22PM +0530, bala chandar wrote: > On 5/9/05, The Doctor <[EMAIL PROTECTED]> wrote: > > On Mon, May 09, 2005 at 08:19:47PM +0530, bala chandar wrote: > > > Hi, > > > > > > On 5/9/05, The Doctor <[EMAIL PROTECTED]> wrote: > > > > On Mon, May 09, 2005 at 08:29:34AM +0530,

Re: [PHP] Templating systems for single developers?

2005-05-10 Thread Ligaya Turmelle
I use Smarty and am the lone developer. Why - Easiest to give an example that I did. I have my site with 7 pages. Each page has a minimum of 4 templates for it (though 6 is the average). Time goes on and I decided I wanted to completely change the look of my site (currently can't handle the

[PHP] fgets fails after fopen succeeds

2005-05-10 Thread Thomas Powell
Summary: fopen returns a file handle, yet fgets doesn't want to read it. I've scoured google, php.net , phpfreaks, usenet, etc. It seems to work elsewhere. My setup: Apache 2.0.47 PHP/5.0.4 Windows 2000 The call: make_link_list("index"); (the file exists for fopen(), and actual

Re: [PHP] Re: A couple questions about templating

2005-05-10 Thread James Williams
Okay well I see I have reopened the can of worms lol. > This has all been done before, and I'm assuming that the James knows, > and has seen that before, since he used the same common method names, > as is in many php templating systems. $class->assign has been used in > any templating system I've

Re: [PHP] Re: A couple questions about templating

2005-05-10 Thread Ryan A
On 5/10/2005 11:15:47 PM, [EMAIL PROTECTED] wrote: > > Yep, the last medium I found could communicate with the spirits fine... > but > she > was real unhappy with life in general > > > LOL! ... now that's not PHP talk =P Strange, from the time I joined this list I keep hearing about "PHP".

[PHP] Header Location redirection parameters fail to redirect

2005-05-10 Thread Olav Drageset
I want url mysite.no to redirect to mysite.com with parameters lang=no and ctry=no, but the parameters do not follow the redirection. mysite.no/index.php is http://mysite.com/index.php?lang=no&ctry=no' ) ; exit; ?> mysite.com/index.php is mysite.com Homepage "; $lang = $_REQUEST['lang']; $ctry

Re: [PHP] numbers as strings

2005-05-10 Thread Jon Aston
Just as a note I had a bit to test and your version works $str = "$c$a$b"; does return 012 all I was getting was 12 after looking at the manual I see that PHP was evaluating each piece as a number so it expected that the built variable would be a number. "Rory Browne" <[EMAIL PROTECTED]> wrote in

Re: [PHP] Editing PDF

2005-05-10 Thread Sam Smith
> Sam Smith wrote: >> I have an existing PDF file that I want to add text to or make changes to >> text with data from an HTML form via PHP. >> >> The PDF looks like this: >> 20 0 obj<>stream >> 8;X-DgMYb:(An746bc%oU,Mo*S> -$2%Ipq]A >> aoW>]"SN?epNo... >> >> That is, not in plain text. >> >> If

[PHP] Templating systems for single developers?

2005-05-10 Thread Murray @ PlanetThoughtful
Hi All, Given that templating seems to be a hot topic at the moment, I'm wondering if anyone here uses templating in a single developer environment, and why if so? I've looked at various template systems from time-to-time but I've always come away thinking, 'yep, I can see the point in a team env

Re: [PHP] include remote class

2005-05-10 Thread Greg Donald
On 5/10/05, Andy Sandvik <[EMAIL PROTECTED]> wrote: > im doing include('http://www.mysite.com/class.php'); > and then i create new instance but i get error - cannot instantiate > non-existant class > how can i get this remotely hosted class file to be defined? If it's a PHP file sitting on a web s

Re: [PHP] Editing PDF

2005-05-10 Thread tg-php
Also keep in mind that any graphics in the PDF, even an uncompressed one, will show up encoded... Base64 or UTF or whatever PDFs use. I also remember reading once that there's data at the end of the PDF that gives a pointer to where in the PDF certain data is. That if you add/remove stuff from

Re: [PHP] Exec don't work

2005-05-10 Thread Greg Donald
On 5/10/05, Juan Pablo Herrera <[EMAIL PROTECTED]> wrote: > Hi! > I using php version 4.3.10. I have a script that used the exec > function. Well it script only work from shell, but not work form web > browser. > My php.ini: > safe_mode Off Off > safe_mode_exec_dir no valueno

[PHP] dio_read timeout?

2005-05-10 Thread AC
I'm using dio_read to read data from a serial port via a php cli script, this works great. However I'm unable to get dio_read to timeout if there's no data to read. No matter how I formulate the while loop, set_time_out, etc I can't seem to get it to stop reading and move on. Anyone have a work

Re: [PHP] numbers as strings

2005-05-10 Thread Jon Aston
Normally it truncates the leading zeros if there are any. I will try your method when I get a moment. got switched on project. "Rory Browne" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] For the most part you can simply treat them as strings. What is happening that shouldn't be hap

Re: [PHP] Re: A couple questions about templating

2005-05-10 Thread Ryan A
Templating is tricky. It adds overhead on the processing end, but increases developer/designer efficiency. Finding a happy medium is the challenge. Yep, the last medium I found could communicate with the spirits fine...but she was real unhappy with life in general :-p Cheers, Ryan -- N

Re: [PHP] yet another php templating question

2005-05-10 Thread Ryan A
Hey, > You are quite welcome to have a look at my template processor, there > is the start of some documentation at http://kwiktemplates.com/ Thanks Tom, will have a look at it, very gererious of you. Cheers, Ryan -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version

Re: [PHP] Re: A couple questions about templating

2005-05-10 Thread M Saleh EG
What is the purpose of your templating system? And what does it solve? These questions are the ones I'd ask myself if I was creating one. However, there are a lot of them out there so does your templating system solve a problem and is a solution? or just "yet another templating class"? As its

Re: [PHP] how to know whether web server of a remote machine is running or not

2005-05-10 Thread Greg Donald
On 5/10/05, Blair Lowe <[EMAIL PROTECTED]> wrote: > Crackers will typically knock out php Did you have some statistics or is this just your own experience/assumption? I may as well switch to mod_ruby if they attack mod_php more often than not. -- Greg Donald Zend Certified Engineer http://dest

Re: [PHP] Editing PDF

2005-05-10 Thread Marek Kilimajer
Sam Smith wrote: I have an existing PDF file that I want to add text to or make changes to text with data from an HTML form via PHP. The PDF looks like this: 20 0 obj<>stream 8;X-DgMYb:(An746bc%oU,Mo*S]"SN?epNo... That is, not in plain text. If I wanted to add text to the PDF, e.g., Mr. Jones, wher

[PHP] Exec don't work

2005-05-10 Thread Juan Pablo Herrera
Hi! I using php version 4.3.10. I have a script that used the exec function. Well it script only work from shell, but not work form web browser. My php.ini: safe_mode Off Off safe_mode_exec_dir no valueno value Have somebody experience in this problem? Regards, JP -- PHP Gen

Re: [PHP] how to know whether web server of a remote machine is running or not

2005-05-10 Thread Blair Lowe
On Tue, 2005-05-10 at 08:33, Greg Donald wrote: > On 5/10/05, balwant singh <[EMAIL PROTECTED]> wrote: > > is there any method to know whether the other webserver is running or not. > > There are lots of methods: > > system( 'telnet hostname 80' ); > > fopen(); > > fsockopen(); > > Curl. Hi,

RE: [PHP] Help with regex: breaking strings down to 'words' and 'phrases'

2005-05-10 Thread Murray @ PlanetThoughtful
> On Wed, 11 May 2005, Murray @ PlanetThoughtful wrote: > > > Hi All, > > > > I'd very much appreciate some help building a regular expression for > > preg_match_all that can differentiate between 'words' and 'phrases'. > > > > For example, say I have a string that contains: 'this is an "example o

Re: [PHP] Help with regex: breaking strings down to 'words' and 'phrases'

2005-05-10 Thread Philip Hallstrom
On Wed, 11 May 2005, Murray @ PlanetThoughtful wrote: Hi All, I'd very much appreciate some help building a regular expression for preg_match_all that can differentiate between 'words' and 'phrases'. For example, say I have a string that contains: 'this is an "example of a phrase"' I'd like to be a

[PHP] include remote class

2005-05-10 Thread Andy Sandvik
im doing include('http://www.mysite.com/class.php'); and then i create new instance but i get error - cannot instantiate non-existant class how can i get this remotely hosted class file to be defined? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

Re: [PHP] number format?

2005-05-10 Thread John Nichel
Dustin Wish wrote: I have a number like -56.98 I need to convert it to -5698. I tried You tried what? Multiplying it by 100? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

[PHP] Re: number format?

2005-05-10 Thread Jason Barnett
Dustin Wish wrote: I have a number like -56.98 I need to convert it to -5698. I tried -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] number format?

2005-05-10 Thread Leif Gregory
Hello Dustin, Tuesday, May 10, 2005, 9:34:10 AM, you wrote: D> I have a number like -56.98 D> I need to convert it to -5698. I tried Add50 = " . $add50; $sub50 = $newNum -50; echo "Sub50 = " . $sub50; ?> If you still need to do math on it, just remember you don't have a decimal anymore. See ex

[PHP] Help with regex: breaking strings down to 'words' and 'phrases'

2005-05-10 Thread Murray @ PlanetThoughtful
Hi All, I'd very much appreciate some help building a regular expression for preg_match_all that can differentiate between 'words' and 'phrases'. For example, say I have a string that contains: 'this is an "example of a phrase"' I'd like to be able to break that down to: this is a

[PHP] Re: Password encryption and password retrieval

2005-05-10 Thread Satyam
Usually passwords are encrypted using one-way algorithms. Of course, there are two-way algorithms which can be reversed, but time and experience has shown that not to be necessary for user passwords. A one-way algorithm is much like the modulus operation: 15 % 4 gives you 3 but even if you kn

Re: [PHP] Editing PDF

2005-05-10 Thread hitek
This isn't *quite* editing, but I have had success using FPDF (http://www.fpdf.org/) for PDF generation. There is an extension class called FPDI (http://fpdi.setasign.de/) that allows you to import an existing PDF as a template, and you could add text over it. Hope this helps. Keith > > From:

Re: [PHP] Re: A couple questions about templating

2005-05-10 Thread Matthew Weier O'Phinney
* Rory Browne <[EMAIL PROTECTED]>: > > This has all been done before, and in a number of ways. If you really > > *must* build your own templating class, go and thoroughly review the > > code of those that already exist: Smarty, Savant, paTemplate, > > FastTemplate, etc. Figure out how each solved t

[PHP] Re: yet another php templating question

2005-05-10 Thread Matthew Weier O'Phinney
* Ryan A <[EMAIL PROTECTED]>: > Since we are caught up in the templating season, I think its time for this > one; > > We have just finished designing the software blueprint for a new PHP > product, we usually used the "include() method" :-) to "template" > U/I's for the clients but this one seems a

[PHP] number format?

2005-05-10 Thread Dustin Wish
I have a number like -56.98 I need to convert it to -5698. I tried --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005 -- PHP General Mailing List (http://www.php.net/) To unsu

[PHP] apache2/php file manager: security suggestions

2005-05-10 Thread brett
Hi, I've written a web based file manager using PHP and running on an apache 2 server. Before putting it on a live webserver i'd like to get some security suggestions. Desired Goals: 1. Read, write text files from a web browser. 2. Files should be owned by me so as not to be readable\writable to

Re: [PHP] yet another php templating question

2005-05-10 Thread Tom Rogers
Hi Ryan, Tuesday, May 10, 2005, 11:48:39 PM, you wrote: RA> Hey, RA> Since we are caught up in the templating season, I think its time for this RA> one; RA> We have just finished designing the software blueprint for a new PHP RA> product, RA> we usually used the "include() method" :-) to "templat

RE: [PHP] how to know whether web server of a remote machine is running or not

2005-05-10 Thread Mark Rees
In addition to the valid suggestions thus far, another option which may suit your purpose is to display an image from webserver2 in the page on webserver1. You can put a JavaScript redirection in the image's onload event. -Original Message- From: Brent Baisley [mailto:[EMAIL PROTECTED] Se

[PHP] Miami PHP Prorgammer Needed!

2005-05-10 Thread Joey
You or someone you know maybe interested in the programming position we have available. We have the need for a part time / possibly contract PHP programmer, with full time potential. We are looking for people that can work in our Miami office (even contractors), so please do not try and sell us y

Re: [PHP] Editing PDF

2005-05-10 Thread Joe Wollard
Sam, I'm not an expert in the area but from what I've seen in the past you might want to look into using LaTex or something similar from the command line. There might be a way to edit the PDF directly from PHP but I wouldn't know where to tell you to start. For that matter I'm not even certain

Re: [PHP] how to know whether web server of a remote machine is running or not

2005-05-10 Thread Leif Gregory
Hello balwant, Tuesday, May 10, 2005, 5:59:15 AM, you wrote: b> is there any method to know whether the other webserver is running b> or not. http://us2.php.net/fsockopen You'll be doing what's termed an HTTP Ping. You make a socket connection to the other server, perform a GET request on a page

Re: [PHP] how to know whether web server of a remote machine is running or not

2005-05-10 Thread Petar Nedyalkov
On Tuesday 10 May 2005 14:59, balwant singh wrote: > Hi, > > I want to make a page (on a webserver) which will be redirected to > another page on another webserver and hence i want to know whether the > another webserver is running or not so that if the webserver is not > running it do something e

Re: [PHP] Password encryption and password retrieval

2005-05-10 Thread Petar Nedyalkov
On Tuesday 10 May 2005 16:05, Deep wrote: > Hi evryone, > > I want to implement a site where i would like to > encrypt the password of the users and store it into > mysql > database. My question is that , In case if the user > has forgotten the password how can he retrieve the > password(which is

Re: [PHP] Password encryption and password retrieval

2005-05-10 Thread Philip Hallstrom
I want to implement a site where i would like to encrypt the password of the users and store it into mysql database. My question is that , In case if the user has forgotten the password how can he retrieve the password(which is already encrypted and stored...the user should be able to get the decr

Re: [PHP] how to know whether web server of a remote machine is running or not

2005-05-10 Thread Brent Baisley
Try connecting to it on port 80, the default for web servers. You can actually play around by connecting to a webserver (or mail server) through telnet. On the command line just type "telnet website.com 80". If the server is up, you should be able to interact with the webserver. Type something

Re: [PHP] how to know whether web server of a remote machine is running or not

2005-05-10 Thread Greg Donald
On 5/10/05, balwant singh <[EMAIL PROTECTED]> wrote: > is there any method to know whether the other webserver is running or not. There are lots of methods: system( 'telnet hostname 80' ); fopen(); fsockopen(); Curl. -- Greg Donald Zend Certified Engineer http://destiney.com/ -- PHP Genera

Re: [PHP] Password encryption and password retrieval

2005-05-10 Thread Andy Pieters
Hi You are doing the right thing storing passwords encrypted! You may use any of the one way digest like secure hash 1 (sha1) or md5 or a combination to generate a hash. In case your user forgets his password, there is no way to reconstruct it. You need to provide an interface where the user

RE: [PHP] Accessible HTML - OT

2005-05-10 Thread Mikey
Thanks to everybody for their comments, I now have more than enough ammo to justify our decisions. Regards, Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] yet another php templating question

2005-05-10 Thread Ryan A
Hey, Since we are caught up in the templating season, I think its time for this one; We have just finished designing the software blueprint for a new PHP product, we usually used the "include() method" :-) to "template" U/I's for the clients but this one seems a bit bigger... I really like Smarty

[PHP] how to know whether web server of a remote machine is running or not

2005-05-10 Thread balwant singh
Hi, I want to make a page (on a webserver) which will be redirected to another page on another webserver and hence i want to know whether the another webserver is running or not so that if the webserver is not running it do something else. is there any method to know whether the other webserve

RE: [PHP] While and echoing HTML

2005-05-10 Thread Jared Williams
> > I guess it is the missing semicolon. > > > And you can write: > > echo "" > > as simply > > echo "$product_type" > I prefer echo '', $product_type, ''; No string concatenation, or variable replacement required. Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] strpos with array?

2005-05-10 Thread Merlin
Burhan Khalid wrote: Merlin wrote: Hi there, I am wondering if there is a function (I could not find) which does the same thing like strpos does, but with an array. For example: $replace = array("picture", "pics"); $pos = strpos ($term, $replace); //if ($pos !== false) { if (in_

[PHP] Password encryption and password retrieval

2005-05-10 Thread Deep
Hi evryone, I want to implement a site where i would like to encrypt the password of the users and store it into mysql database. My question is that , In case if the user has forgotten the password how can he retrieve the password(which is already encrypted and stored...the user should be able

[PHP] String manipulation out of the box solution?

2005-05-10 Thread Merlin
Hi there, I am writing an internal full text search engine and do have trouble in outputting the text in an apropriate way. Problem is that if there is more than one word I cant handle the text cropping. For example: Search term: php germany Text from database: There is no such great language tha

Re: [PHP] strpos with array?

2005-05-10 Thread Merlin
Burhan Khalid wrote: Merlin wrote: Hi there, I am wondering if there is a function (I could not find) which does the same thing like strpos does, but with an array. For example: $replace = array("picture", "pics"); $pos = strpos ($term, $replace); //if ($pos !== false) { if (in_

[PHP] Editing PDF

2005-05-10 Thread Sam Smith
I have an existing PDF file that I want to add text to or make changes to text with data from an HTML form via PHP. The PDF looks like this: 20 0 obj<>stream 8;X-DgMYb:(An746bc%oU,Mo*S]"SN?epNo... That is, not in plain text. If I wanted to add text to the PDF, e.g., Mr. Jones, where the heck wo

Re: [PHP] Accessible HTML - OT

2005-05-10 Thread Leif Gregory
Hello Mary-Anne, Monday, May 9, 2005, 5:15:27 PM, you wrote: MAN> Check out Joe Clarkes website: http://joeclark.org. Joe is an MAN> expert in web accessibility issues. I'm not claiming to be even remotely as good as Joe, but looking at his site, I didn't see much in the way of helpful examples (

Re: [PHP] Re: A couple questions about templating

2005-05-10 Thread Rory Browne
> This has all been done before, and in a number of ways. If you really > *must* build your own templating class, go and thoroughly review the > code of those that already exist: Smarty, Savant, paTemplate, > FastTemplate, etc. Figure out how each solved the problems. Then > determine if you can im

Re: [PHP] strpos with array?

2005-05-10 Thread Burhan Khalid
Merlin wrote: Hi there, I am wondering if there is a function (I could not find) which does the same thing like strpos does, but with an array. For example: $replace = array("picture", "pics"); $pos = strpos ($term, $replace); //if ($pos !== false) { if (in_array($term,$replace)

Re: [PHP] using header ('Location:) to pass varaiables

2005-05-10 Thread Angelo Zanetti
try this header("Location: email_confirm.php?email=".$email); exit(); Angelo Zanetti Z Logic www.zlogic.co.za [c] +27 72 441 3355 [t] +27 21 469 1052 Ross wrote: >Is it possible to send variables using header() ? > >I have tried variations on the theme > >header ('Location: email_confirm.php?

RE: [PHP] strpos with array?

2005-05-10 Thread Shaw, Chris - Accenture
Hello, Have you tried using array_keys or array_search for finding an occurrence in an array? HTH. Chris. -Original Message- From: Merlin [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 11:11 To: php-general@lists.php.net Subject: [PHP] strpos with array?

Re: [PHP] strpos with array?

2005-05-10 Thread Marek Kilimajer
Merlin wrote: Hi there, I am wondering if there is a function (I could not find) which does the same thing like strpos does, but with an array. For example: $replace = array("picture", "pics"); $pos = strpos ($term, $replace); if ($pos !== false) { $term = str_replace($replace,

Re: [PHP] using header ('Location:) to pass varaiables

2005-05-10 Thread Marek Kilimajer
Ross wrote: Is it possible to send variables using header() ? I have tried variations on the theme header ('Location: email_confirm.php?email=$email); but nothing seems to work. I don't know what you tried, but the above results in parse error. Try: header ("Location: email_confirm.php?email=$email

[PHP] strpos with array?

2005-05-10 Thread Merlin
Hi there, I am wondering if there is a function (I could not find) which does the same thing like strpos does, but with an array. For example: $replace = array("picture", "pics"); $pos = strpos ($term, $replace); if ($pos !== false) { $term = str_replace($replac

[PHP] using header ('Location:) to pass varaiables

2005-05-10 Thread Ross
Is it possible to send variables using header() ? I have tried variations on the theme header ('Location: email_confirm.php?email=$email); but nothing seems to work. Ta, Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Header location, redirection loses parameters,

2005-05-10 Thread Prathaban Mookiah
Are you trying to assign the value "value1" to var1 or are you trying to assign the value of the variable value1 to var1? Prathap -- Original Message --- From: "Olav Draageset" <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Tue, 10 May 2005 00:16:33 +0200 Subject: [PHP]

Re: [PHP] Wash with SOAP

2005-05-10 Thread Burhan Khalid
Jay Blanchard wrote: It has come to a point where a vendor is requiring that we use SOAP to access a service that they provide, so I need some recommendations... a. Do I build my own request/receipt functions. 2. Do I use something like nusoap or Pears' SOAP classes? Would those of you who are expe

Re: [PHP] While and echoing HTML

2005-05-10 Thread Burhan Khalid
Mary-Anne Nayler wrote: Hi Mark, As far as I can see the only problem is that you have forgotten to add a semicolon after the i++ Mark: Since you are not displaying the counter, you really don't need to mess with $i. You can reduce your code to just : $db = mysql_connect("localhost", "r

Re: [PHP] While and echoing HTML

2005-05-10 Thread Richard Lynch
On Mon, May 9, 2005 10:57 pm, Mark Sargent said: > Thanx. I saw the extra echo and removed it. Problem with that code, > though. It displays only the 1st record, repeatedly, causing the browser > to hang. Can anyone see what is wrong..? Cheers. Everybody else has told you to move the $i++; inside

Re: [PHP] Header location, redirection loses parameters,

2005-05-10 Thread Richard Lynch
On Mon, May 9, 2005 3:16 pm, Olav Draageset said: > I have several URLs that I want to point to the same site with a different > parameter. I try to do this by redirecting all to the same location, by > > hader ("Location: http://mysite.com/index.php?var1=value1&var2=value2";); > exit; > ?> I wou

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mark Sargent
Mary-Anne Nayler wrote: oh, and the i++ should be inside the while loop and there is also a missing semi colon after the echo, ie; $i=0; while ($i < $num){ $product_type=mysql_result($result,$i,"product_type_detail"); echo ""; $i++ ; } Mark Sargent wrote, On 10/05/05 02:23 PM: Hi All, this page,

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mary-Anne Nayler
Hi Mark, As far as I can see the only problem is that you have forgotten to add a semicolon after the i++ Cheers, Mary-Anne Mark Sargent wrote, On 10/05/05 02:23 PM: Hi All, this page, http://www.freewebmasterhelp.com/tutorials/phpmysql/5 has the below code, $first=mysql_result($result,$i,"fir

Re: [PHP] While and echoing HTML

2005-05-10 Thread darren kirby
quoth the Mark Sargent: > > > Jumbo Status > $db = mysql_connect("localhost", "root", "grunger"); > mysql_select_db("status",$db); > $result = mysql_query("SELECT ProductTypes.product_type_detail FROM > ProductTypes",$db); > $myrow = mysql_fetch_array($result); > $num = mysql_num_rows($result);

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mary-Anne Nayler
oh, and the i++ should be inside the while loop and there is also a missing semi colon after the echo, ie; $i=0; while ($i < $num){ $product_type=mysql_result($result,$i,"product_type_detail"); echo ""; $i++ ; } Mark Sargent wrote, On 10/05/05 02:23 PM: Hi All, this page, http://www.freewebmaster

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mark Sargent
Prathaban Mookiah wrote: I guess it is the missing semicolon. And you can write: echo "" as simply echo "$product_type" Prathap -- Original Message --- From: Mark Sargent <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Tue, 10 May 2005 13:23:51 +0900 Subject: [PHP] While and