Re: [PHP] session and mysql connection identifier

2004-07-21 Thread Jason Wong
On Wednesday 21 July 2004 13:47, mukta telang wrote: I want to use mysql persistent connection to connect to mysql and use the connection identifier or handle in subsequent pages/scripts. So in script1.php I have session_start(); session_register('conn');

[PHP] How to use reflection API?

2004-07-21 Thread Andreas Goetz
I'm trying to use theh reflection API but can't seem to start: $func= new Reflection_Function('counter'); Fatal error: Class 'Reflection_Function' not found in C:\htdocs\reflection.php on line 34 According to

[PHP] what is difference between php and perl

2004-07-21 Thread Syed Ghouse
Hi all (B (Bwill anybody tell me the difference between perl and php (B (BRegards (BSyed

Re: [PHP] session and mysql connection identifier

2004-07-21 Thread Justin Patrin
On Tue, 20 Jul 2004 22:47:43 -0700 (PDT), mukta telang [EMAIL PROTECTED] wrote: Hi, I want to use mysql persistent connection to connect to mysql and use the connection identifier or handle in subsequent pages/scripts. So in script1.php I have session_start(); session_register('conn');

RE: [PHP] textarea/display question...

2004-07-21 Thread Dennis Gearon
Make sure to remove tags via: $var_that_will_be_displayed = strip_tags( $var_from_user_input_via_POST_or_GET_or_COOKIE ); if you are going to display or mail it as part of a link(email or URL), you might do this instead: $var_that_will_be_part_of_a_link = strip_tags(

[PHP] Re: Money format

2004-07-21 Thread Luk Moravec - PTV Servis
I got it.thankx to all. Lukas

Re: [PHP] what is difference between php and perl

2004-07-21 Thread Justin Patrin
On Wed, 21 Jul 2004 12:35:46 +0530, Syed Ghouse [EMAIL PROTECTED] wrote: Hi all will anybody tell me the difference between perl and php I'm giving you way too much hereyou should just search the web, I'm sure you can find much more in depth explanations. Perl is an old, old,

[PHP] Re: string filtering

2004-07-21 Thread Mr. Bogomil Shopov
Hello http://bg2.php.net/manual/en/function.preg-match.php Regards Bogomil http://spisanie.com/indexen.php - WebDevMagazine C.F. Scheidecker Antunes wrote: Hello all, I need to filter some strings. They can only contain characters like a...z or A..Z and 0..9. Some strings have blank spaces,

[PHP] Re: How to use reflection API?

2004-07-21 Thread Jason Barnett
Andreas Goetz wrote: I'm trying to use theh reflection API but can't seem to start: $func= new Reflection_Function('counter'); This was changed, manuals haven't caught up yet. This should be $func = new ReflectionFunction('counter'); You can also just use the static method export, if you intend

Re: [PHP] what is difference between php and perl

2004-07-21 Thread Jason Davidson
they are 2 seperate languages, completely. I dont beleive the 2 languages have any relation to eachother, possibly you can relate the 2 as serverside scripting languages.. but.. its still a stretch :) see www.perl.org or php.net for history of the two. Jason On Wed, 21 Jul 2004 12:35:46 +0530,

Re: [PHP] session and mysql connection identifier

2004-07-21 Thread Dennis Gearon
What he is really looking for is connection pooling. Do a google and see if you can find 'mysql connection pooling php'. It is persistent connections across page accesses, which PHP does not do natively AFAIK. Jason Wong [EMAIL PROTECTED] wrote:

[PHP] PHP-5 book

2004-07-21 Thread Nadim Attari
Hello friends, Can someone advise me of a very good PHP-5 book. Most probably i'll buy it from eyrolles.com Thanks, ~ nadim attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP-5 book

2004-07-21 Thread Philip Olson
Can someone advise me of a very good PHP-5 book. Hands down the best: Advanced PHP Programming by George Schlossnagle Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Fw: [PHP] what is difference between php and perl

2004-07-21 Thread Syed Ghouse
Thanks for help (B (B Regards (B Syed (B - Original Message - (B From: "Syed Ghouse" [EMAIL PROTECTED] (B To: "php mailinglists" [EMAIL PROTECTED] (B Sent: Wednesday, July 21, 2004 PM 12:35 (B Subject: [PHP] what is difference between php and perl (B (B (B Hi all (B (B

Re: [PHP] PHP-5 book

2004-07-21 Thread Paul Kain
Wiley Publishing. PHP5 for dummies - Janet Valade. not very advanced, but its in plain english with hints and tips and technical stuff thats easy to understand. For the serious beginner though. On Wed, 21 Jul 2004 12:30:13 +0400, Nadim Attari [EMAIL PROTECTED] wrote: Hello friends, Can

Re: [PHP] PHP5, XPath and count()

2004-07-21 Thread Christian Stocker
On Tue, 20 Jul 2004 22:57:20 +0200, Victor Boivie [EMAIL PROTECTED] wrote: Assume an XML file that looks like: catalog cd .. /cd cd .. /cd .. /catalog ... and that I would like to know the number of CDs. An xpath expression would look like count(/catalog/cd), but

Re: [PHP] PHP-5 book

2004-07-21 Thread Jurgen Stroo
And then there is Learning PHP5 (from O'Reilly), which I should go for. This one time, at band camp, Paul Kain said: Wiley Publishing. PHP5 for dummies - Janet Valade. not very advanced, but its in plain english with hints and tips and technical stuff thats easy to understand. For the

[PHP] HTML numeric string

2004-07-21 Thread Koriun A. Margarian
Hello how to convert HTML numeric string like #1394;#1377;#1378;#1377;#13 to original text ? -- Best regards, Koriunmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP-5 book

2004-07-21 Thread Nadim Attari
1. http://www.eyrolles.com/Informatique/Livre/9780672325618/livre-advanced-php-programming.php 2. http://www.eyrolles.com/Informatique/Livre/9782212113235/livre-php-5-avance.php two interesting books i found. Which one would you suggest ? thanks ~ nadim attari -- PHP General Mailing List

Re: [PHP] PHP-5 book

2004-07-21 Thread Jason Barnett
Philip Olson wrote: Can someone advise me of a very good PHP-5 book. Hands down the best: Advanced PHP Programming by George Schlossnagle Regards, Philip I've also read this book (*almost* cover to cover) and it is quite excellent. However, it definitely assumes that you understand the basics

Re: [PHP] PHP5, XPath and count()

2004-07-21 Thread Jason Barnett
this doesn't work yet in DOM. The returned value has to be a nodeset. Will be fixed some day ;) see victors answer for the work around chregu I was wondering about that. So is there someplace online where we can find out what does / does not yet work for XPath? I've been looking but google

Re: [PHP] Re: PHP-5 book

2004-07-21 Thread Denis Fingonnet
I have bought the second one : PHP5 avancé (in french). And it is a very good book. Denis Fingonnet Nadim Attari a écrit : 1. http://www.eyrolles.com/Informatique/Livre/9780672325618/livre-advanced-php-programming.php 2.

[PHP] Re: template and file read

2004-07-21 Thread rush
Ee [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Would this slow down the site? yes, but in most cases this is not important since bandwith to the client, and database queries have usually orders of magnitude larger bottlenecks. rush -- http://www.templatetamer.com/ -- PHP General

Re: [PHP] HTML numeric string

2004-07-21 Thread Torsten Roehr
Koriun A. Margarian [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello how to convert HTML numeric string like #1394;#1377;#1378;#1377;#13 to original text ? -- Best regards, Koriun Try this: http://de.php.net/manual/de/function.html-entity-decode.php Regards, Torsten

[PHP] PHP5 Bug with DOMDocument-xinclude

2004-07-21 Thread Siddharth Hegde
Hi, Can anyone tell me if they faced a similar problem. When I manually save the following line into an file, it works xi:include href=xml_file.xml parse=xml/ But if I remove this line, and add it dynamically using the following code, and only after that call $xml_file-xinclude(); it does not

Re: [PHP] HTML numeric string

2004-07-21 Thread Marcus Strube
Am Mittwoch, 21. Juli 2004 11:36 schrieb Koriun A. Margarian: Hello how to convert HTML numeric string like #1394;#1377;#1378;#1377;#13 to original text ? -- Best regards, Koriunmailto:[EMAIL PROTECTED] $dirty_data $search4[0] = /,/; $search4[1] = /A/;

[PHP] hide elements on page based on cookie

2004-07-21 Thread msa
I have three td tags that I need to either hide or show, based on access level defined in a cookie. the three buttons are: secure (to show when accessLevel = 1) sales (to show when accessLevel = 2) login (to show when there is no cookie) I have had some success with to following code:

Re: [PHP] textarea/display question...

2004-07-21 Thread John W. Holmes
Dennis Gearon wrote: Make sure to remove tags via: $var_that_will_be_displayed = strip_tags( $var_from_user_input_via_POST_or_GET_or_COOKIE ); if you are going to display or mail it as part of a link(email or URL), you might do this instead: $var_that_will_be_part_of_a_link =

Re: [PHP] Problem of a beginner with Array

2004-07-21 Thread Henri Marc
Hello, Thank you very much for all the people who replied me so fast. Unfortunately I still have a problem with that part. Matt M. [EMAIL PROTECTED] wrote: Now, I want to know which numbers have been checked by the player. I have a : input name=Grid1 type=checkbox for the first grid. Grid2

[PHP] Preventing static method calls in PHP4

2004-07-21 Thread Marcus Bointon
If I want to prevent a method from being called statically in PHP4, how can I do it? So far I've tried these techniques: ?php class A { var $Anotstatic; function A() { $this-Anotstatic = true; } function dynamic() { if (!isset($this) or !is_a($this, 'A') or !(isset($this-Anotstatic)

Re: [PHP] PHP5 Bug with DOMDocument-xinclude

2004-07-21 Thread Siddharth Hegde
Cool that worked :-) Thanks. BTW your presentation on your site was very useful. - Sid On Wed, 21 Jul 2004 13:25:11 +0200, Christian Stocker [EMAIL PROTECTED] wrote: On Wed, 21 Jul 2004 16:02:54 +0530, Siddharth Hegde [EMAIL PROTECTED] wrote: Hi, Can anyone tell me if they faced a

RE: [PHP] Problem of a beginner with Array[Scanned]

2004-07-21 Thread Michael Egan
Henri, Try: if($HTTP_POST_VARS['submit']) { for($i = 1; $i 51; $i ++) { if (${lottery_number.$i} == 'on') echo Number selected is $i; } } else { echo form action='.$PHP_SELF.' method='post'; for($i = 1; $i 51; $i ++) {

[PHP] Re: hide elements on page based on cookie

2004-07-21 Thread Torsten Roehr
Msa [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have three td tags that I need to either hide or show, based on access level defined in a cookie. the three buttons are: secure (to show when accessLevel = 1) sales (to show when accessLevel = 2) login (to show when there is no

[PHP] Re: hide elements on page based on cookie

2004-07-21 Thread msa
no, I am not sure of that.I played with that code snippet from someone else. how do I check for the value instead? would the reason why they aren't working be because of checking for length and not value? Are you sure you want to check the string length of the cookie instead of its

Re: [PHP] Problem of a beginner with Array

2004-07-21 Thread Torsten Roehr
Henri marc [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Thank you very much for all the people who replied me so fast. Unfortunately I still have a problem with that part. Matt M. [EMAIL PROTECTED] wrote: Now, I want to know which numbers have been checked by the

[PHP] Re: hide elements on page based on cookie

2004-07-21 Thread Torsten Roehr
Msa [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] no, I am not sure of that.I played with that code snippet from someone else. how do I check for the value instead? would the reason why they aren't working be because of checking for length and not value? Are you sure you

[PHP] Test Results

2004-07-21 Thread Ray Hayes
My test results from my build on a Cobalt RAQ550 seem to be in line with other test results postings. Any ideas where these open items affect processing? = FAILED TEST SUMMARY

[PHP] htmlArea look-a-like

2004-07-21 Thread Robb Kerr
I am developing an app in which my visitors must be able to enter text and do some minimal HTML formatting including making some of the text hyperlinks. I like the looks of htmlArea, but can't get either available version to work in any Mac browsers. I've also found EditLive! and am intrigued by

Re: [PHP] Problem of a beginner with Array

2004-07-21 Thread Henri Marc
Hello Torsten, try this: input name=Grid1[1] typecheckbox file://1st grid, 1st checkbox input name=Grid1[2] typecheckbox file://1st grid, 2nd checkbox... Seems I can't do another way than this. Not possible to do just Grid1[]. After submit you will receive $_POST['Grid1'] as an ARRAY

Re: [PHP] Problem of a beginner with Array

2004-07-21 Thread Torsten Roehr
Henri marc [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Torsten, try this: input name=Grid1[1] typecheckbox file://1st grid, 1st checkbox input name=Grid1[2] typecheckbox file://1st grid, 2nd checkbox... Seems I can't do another way than this. Not possible to do

RE: [PHP] Problem of a beginner with Array[Scanned]

2004-07-21 Thread Michael Egan
Henri, I think you will need to give some sort of number to each of the checkboxes, e.g. for($i = 1; $i 51; $i++) { echo input type='checkbox' name='lotterynumber.$i.'; } As you are finding, with checkboxes the value returned is either 'on' or null. So without giving specific

Re: [PHP] htmlArea look-a-like

2004-07-21 Thread Matt M.
I am developing an app in which my visitors must be able to enter text and do some minimal HTML formatting including making some of the text hyperlinks. I like the looks of htmlArea, but can't get either available version to work in any Mac browsers. I've also found EditLive! and am intrigued

[PHP] Re: htmlArea look-a-like

2004-07-21 Thread Tim Van Wassenhove
In article [EMAIL PROTECTED], Robb Kerr wrote: I am developing an app in which my visitors must be able to enter text and do some minimal HTML formatting including making some of the text hyperlinks. I like the looks of htmlArea, but can't get either available version to work in any Mac

Re: [PHP] Problem of a beginner with Array

2004-07-21 Thread Matt M.
I would prefer to have if possible: input name=Grid1[] typecheckbox //1st grid, 1st checkbox input name=Grid1[] typecheckbox //1st grid, 2nd checkbox... That's what Matt M proposed. If I do: echo $_POST['Grid1']; I have on as a result and not a value. I also tried with echo

Re: [PHP] PHP-5 book

2004-07-21 Thread Matthew Sims
Can someone advise me of a very good PHP-5 book. Hands down the best: Advanced PHP Programming by George Schlossnagle Regards, Philip I also recommend this book. It covers the new OO model of PHP5 very well. --Matthew Sims --http://killermookie.org -- PHP General Mailing List

Re: [PHP] Update mysql.so problems

2004-07-21 Thread Jough P
Posted this yesterday, still having problems. I've used various combinations with --with-mysql. I removed all the old mysql binaries and libs from /usr/lib, /usr/include and /usr/bin. I removed the old mysql.so from /usr/lib/php4/ I even went as far as upgrading to PHP5. It is still using

[PHP] echo and html_decode

2004-07-21 Thread Karl-Heinz Schulz
I'm trying to use html_decode with the echo function but failed so far. ? echo mysql_result($product, 0,1) ? What would be the correct syntax? TIA Tracking #: 2F5B92054B5DBF4C990F63F9BA3F99A0558671EB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] How to use reflection API?

2004-07-21 Thread Curt Zirzow
* Thus wrote Andreas Goetz: I'm trying to use theh reflection API but can't seem to start: $func= new Reflection_Function('counter'); Fatal error: Class 'Reflection_Function' not found in C:\htdocs\reflection.php on line 34 According to

Re: [PHP] PHP-5 book

2004-07-21 Thread Stephen Sadowski
Can someone advise me of a very good PHP-5 book. [snip] I've been using Zeev Leon Atkinson's _Core_PHP_Programming_ since 5beta1 was out. It was extremely helpful, and I still refer to it on a regular basis. Just ignore the section on namespace support, if they haven't had a revised printing

[PHP] Coding Advice

2004-07-21 Thread Aaron Axelsen
Hello, I am writing an app and right now im working on code that will display x number of items on one page, and if there is overflow, provide a link to the next. The url coming into the page looks something like: projects.php?action=viewcompleted=nostart=0 My code so far, i just took the

[PHP] URL

2004-07-21 Thread Bruno Santos
Hello All. Im developing a couple of pages and i need to do some redirecting to another page depending on the choice of a user. The problem is, to go to another page, i need to send some parameters in the URL that are alredy present, but i need to make the redirecting independent of the page.

RE: [PHP] URL

2004-07-21 Thread Robert Sossomon
SNIP -Original Message- From: Bruno Santos [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 21, 2004 11:05 AM To: [EMAIL PROTECTED] Subject: [PHP] URL Hello All. Im developing a couple of pages and i need to do some redirecting to another page depending on the choice of a user. /SNIP

[PHP] Re: URL

2004-07-21 Thread Torsten Roehr
Bruno Santos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello All. Im developing a couple of pages and i need to do some redirecting to another page depending on the choice of a user. The problem is, to go to another page, i need to send some parameters in the URL that are

Re: [PHP] URL

2004-07-21 Thread Matt M.
Since you are getting the information from the page anyways, just simply do: $_SERVER[PHP_SELF]?parameter1=$_GET[parameter1]parameter2=$_GET[paramet er2]parameter3=$_GET[parameter3] etc... should also make sure to urlencode the data here is another thrread about it

[PHP] URL

2004-07-21 Thread Bruno Santos
Thx Robert. How could i miss that !! =:) by the way, is any function in PHP that i can use to capture the current URL thx Original Message Subject:RE: [PHP] URL Date: Wed, 21 Jul 2004 11:12:33 -0400 From: Robert Sossomon [EMAIL PROTECTED] To: [EMAIL

[PHP] Zend Enc and 0T Q

2004-07-21 Thread PHP Gen
Hi all, Our company has decided to encrypt the php programs that we sell, I have to choose which encryption package to buy. After a lot of seaching (on this list(archives), google, forums etc) I saw a quite a few products like ioncube, zend, codesecure, blender, mmCache encryptor etc etc

Re: [PHP] Coding Advice

2004-07-21 Thread Matt M.
I am writing an app and right now im working on code that will display x number of items on one page, and if there is overflow, provide a link to the next. The url coming into the page looks something like: projects.php?action=viewcompleted=nostart=0 My code so far, i just took the

Re: [PHP] URL

2004-07-21 Thread John W. Holmes
Bruno Santos wrote: Im developing a couple of pages and i need to do some redirecting to another page depending on the choice of a user. The problem is, to go to another page, i need to send some parameters in the URL that are alredy present, but i need to make the redirecting independent of

Re: [PHP] echo and html_decode

2004-07-21 Thread John W. Holmes
Karl-Heinz Schulz wrote: I'm trying to use html_decode with the echo function but failed so far. ? echo mysql_result($product, 0,1) ? What would be the correct syntax? Huh? I don't see html_decode anywhere and the function is html_entity_decode(), anyhow. If you want to run the above through

Re: [PHP] Zend Enc and 0T Q

2004-07-21 Thread raditha dissanayake
PHP Gen wrote: Hi all, unfortunatly blender is not yet ready for stable production use and althought I was leaning towards mmcache as its free, not every host will be too happy to install mmCache And the loss is entirely theirs. MMache really can take a load of your webserver. I just wanted

Re: [PHP] URL

2004-07-21 Thread zareef ahmed
Hi You can user $_SERVER['REQUEST_URI']; Thanks Zareef Ahmed --- John W. Holmes [EMAIL PROTECTED] wrote: Bruno Santos wrote: Im developing a couple of pages and i need to do some redirecting to another page depending on the choice of a user. The problem is, to go to another

Re: [PHP] Zend Enc and 0T Q

2004-07-21 Thread Jason Wong
On Wednesday 21 July 2004 23:37, raditha dissanayake wrote: Please start your signature with the '--' sequence and not '' as you have used. The signature separator should be '-- ' so that competent mail clients will automatically strip the signature. -- Jason Wong - Gremlins Associates

Re: [PHP] 'echo' and 'html_decode'

2004-07-21 Thread Matthew Sims
I'm trying to use html_decode with the echo function but failed so far. ? echo mysql_result($product, 0,1) ? What would be the correct syntax? TIA You should read up on how to use mysql_result properly. Read through the user comments for tips.

Re: [PHP] Zend Enc and 0T Q

2004-07-21 Thread PHP Gen
Hi, Thanks for replying. And the loss is entirely theirs. MMache really can take a load of your webserver. True, but its easier to tell a webhosting company to install a Zend product as they are the maker of PHP blah blah than to tell them to install an untrusted 3rd party app like mmCache.

Re: [PHP] Re: template and file read

2004-07-21 Thread EE
On Tue, 2004-07-20 at 23:08, Jason Barnett wrote: Ee wrote: Dears, In one of the tutorials I read about templates, the writer is diving the code into multiple files. He put the menu, main, left, right, footer each in a separate file. He is using foreach to go through an array and

Re: [PHP] PHP-5 book

2004-07-21 Thread Chris Shiflett
--- Nadim Attari [EMAIL PROTECTED] wrote: Can someone advise me of a very good PHP-5 book. http://www.oreilly.com/catalog/upgradephp5/ Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming Fall 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/

[PHP] how to use session?

2004-07-21 Thread Sheawh
I have started a session using session_start(); but it returns : Warning: Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\diary\index.php:7) in c:\inetpub\wwwroot\diary\reg_session.php on line 11 Warning: Cannot send session cache limiter - headers

[PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
Hey all... I have a new one I haven't encounter before. I need to send the output of a web page to a printer on a schedule (obviously I'll use a cron job for scheduling) and am wondering if I can do this through php. I know you can use the command line lpr in SSH but can I use PHP do do it?

[PHP] Re: how to use session?

2004-07-21 Thread Torsten Roehr
Sheawh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have started a session using session_start(); but it returns : Warning: Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\diary\index.php:7) in

[PHP] trim() white space from record set

2004-07-21 Thread msa
I created a search form with multiple search parameters. It returns nothing if there is a space after their text entry or if they hit return in the text area. $coltitle_rsResults = 0; if (isset($_GET['Title'])) { $coltitle_rsResults = (get_magic_quotes_gpc()) ? $_GET['Title'] :

Re: [PHP] Zend Enc and 0T Q

2004-07-21 Thread Marcus Bointon
on 21/7/04 16:59, PHP Gen at [EMAIL PROTECTED] wrote: News to me, I thought each encryptor has its own style of encrypting the phpwill check up but I think thats true. Mmcache says explicitly that its output is compatible with Zend encoder. Also note that encryption is not the same as

[PHP] Re: Zend Enc and 0T Q

2004-07-21 Thread Richard Davey
Php Gen wrote: After a lot of seaching (on this list(archives), google, forums etc) I saw a quite a few products like ioncube, zend, codesecure, blender, mmCache encryptor etc etc I think it depends on the scale of your product. If it is something that a company is going to deploy on their own

Re: [PHP] trim() white space from record set

2004-07-21 Thread John W. Holmes
msa wrote: I created a search form with multiple search parameters. It returns nothing if there is a space after their text entry or if they hit return in the text area. $coltitle_rsResults = 0; if (isset($_GET['Title'])) { $_GET['title'] = trim($_GET['title']); $coltitle_rsResults =

[PHP] Re: how to use session?

2004-07-21 Thread Sheawh
even Example: page1.php I got the same result, and what if i set session auto start ?? is that means it starts a new session when accessing a HTML? HTML ?php // page1.php session_start(); echo 'Welcome to page #1'; $_SESSION['favcolor'] = 'green'; $_SESSION['animal'] = 'cat';

Re: [PHP] how to use session?

2004-07-21 Thread Matt M.
If I don't want to use session cookie , how to set it? thanks. ini_set('session.use_cookies','0'); before all of your session_start() calls. or set it in the php.ini, .htaccess or httpd.conf file -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Ron Stiemer
Hi there, AFAIK a printer via PHP can only be used on a Windows Platform and not under a Unix System... But when you just want so send a Command via PHP than maybe exec(); or system(); might fit your needs... Regards, -Ron -Ursprüngliche Nachricht- Von: Vern [mailto:[EMAIL PROTECTED]

[PHP] Error when using HTTP Location header

2004-07-21 Thread Arnout Boks
Hi, I'm building a login page that redirects the user to the login form when an incorrect password is entered. An error message is passed as an URL parameter. Something like: if(!$pwd == $correctPwd){ header('Location: ' . urlencode('loginForm.php?error=Incorrect password')); exit; }

[PHP] exec/system question..

2004-07-21 Thread bruce
hey... looking at initiating a perl app from inside a php web app. basically, the user will hit a button/start the app...the perl script will take awhile to complete, so i'd like to run the app and then continue on with the php process... so my question boils down to what's the best approach.

Re: [PHP] 'echo' and 'html_decode'

2004-07-21 Thread Daniel Kullik
Matthew Sims wrote: I'm trying to use html_decode with the echo function but failed so far. ? echo mysql_result($product, 0,1) ? What would be the correct syntax? TIA You should read up on how to use mysql_result properly. Read through the user comments for tips.

Re: [PHP] trim() white space from record set

2004-07-21 Thread Justin Patrin
On Wed, 21 Jul 2004 12:41:55 -0400, John W. Holmes [EMAIL PROTECTED] wrote: msa wrote: I created a search form with multiple search parameters. It returns nothing if there is a space after their text entry or if they hit return in the text area. $coltitle_rsResults = 0; if

Re: [PHP] Re: how to use session?

2004-07-21 Thread Josh Close
you have to have the session_start before ANY output, including html, so do this ? session_start() ? html On Thu, 22 Jul 2004 00:56:44 +0800, Sheawh [EMAIL PROTECTED] wrote: even Example: page1.php I got the same result, and what if i set session auto start ?? is that means it starts a

Re: [PHP] how to use session?

2004-07-21 Thread Justin Patrin
On Thu, 22 Jul 2004 00:12:36 +0800, Sheawh [EMAIL PROTECTED] wrote: I have started a session using session_start(); but it returns : Warning: Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\diary\index.php:7) in

Re: [PHP] Error when using HTTP Location header

2004-07-21 Thread Marek Kilimajer
Arnout Boks wrote: Hi, I'm building a login page that redirects the user to the login form when an incorrect password is entered. An error message is passed as an URL parameter. Something like: if(!$pwd == $correctPwd){ header('Location: ' . urlencode('loginForm.php?error=Incorrect

Re: [PHP] Re: how to use session?

2004-07-21 Thread Matthew Sims
even Example: page1.php I got the same result, and what if i set session auto start ?? is that means it starts a new session when accessing a HTML? HTML ?php // page1.php session_start(); echo 'Welcome to page #1'; $_SESSION['favcolor'] = 'green'; $_SESSION['animal'] =

Re: [PHP] Error when using HTTP Location header

2004-07-21 Thread Jason Wong
On Thursday 22 July 2004 01:00, Arnout Boks wrote: if(!$pwd == $correctPwd){ header('Location: ' . urlencode('loginForm.php?error=Incorrect You only urlencode() the values of each individual parameter and NOT the whole url. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open

Re: [PHP] Error when using HTTP Location header

2004-07-21 Thread Matthew Sims
Hi, I'm building a login page that redirects the user to the login form when an incorrect password is entered. An error message is passed as an URL parameter. Something like: if(!$pwd == $correctPwd){ header('Location: ' . urlencode('loginForm.php?error=Incorrect password'));

Re: [PHP] 'echo' and 'html_decode'

2004-07-21 Thread Matthew Sims
Matthew Sims wrote: I'm trying to use html_decode with the echo function but failed so far. ? echo mysql_result($product, 0,1) ? What would be the correct syntax? TIA You should read up on how to use mysql_result properly. Read through the user comments for tips.

Re: [PHP] Error when using HTTP Location header

2004-07-21 Thread Justin Patrin
On Wed, 21 Jul 2004 19:00:06 +0200, Arnout Boks [EMAIL PROTECTED] wrote: Hi, I'm building a login page that redirects the user to the login form when an incorrect password is entered. An error message is passed as an URL parameter. Something like: if(!$pwd == $correctPwd){

Re: [PHP] exec/system question..

2004-07-21 Thread Justin Patrin
On Wed, 21 Jul 2004 10:09:52 -0700, bruce [EMAIL PROTECTED] wrote: hey... looking at initiating a perl app from inside a php web app. basically, the user will hit a button/start the app...the perl script will take awhile to complete, so i'd like to run the app and then continue on with the

Re: [PHP] Error when using HTTP Location header

2004-07-21 Thread Arnout Boks
Ok, thnx, problem solved. But about the XSS attacks: what is a XSS attack, and is there a way I can let users still use some HTML tags (like B and BR)? TIA, Arnout Marek Kilimajer [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Arnout Boks wrote: Hi, I'm building a login page

Re: [PHP] exec/system question..

2004-07-21 Thread Justin Patrin
Please reply to the list so that others can see the conversation. Search for cron on Google to learn more about it. You can also type man cron and man crontab on the command-line. I would suggest writing a simple PHP wrapper script that checks the DB, runs the Perl script if it needs to, and

Re: [PHP] how to use session?

2004-07-21 Thread Chris Shiflett
--- Sheawh [EMAIL PROTECTED] wrote: I have started a session using session_start(); but it returns : Warning: Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\diary\index.php:7) in c:\inetpub\wwwroot\diary\reg_session.php on line 11 Warning:

[PHP] Re: exec/system question..

2004-07-21 Thread Kevin Martin
Bruce wrote: hey... looking at initiating a perl app from inside a php web app. basically, the user will hit a button/start the app...the perl script will take awhile to complete, so i'd like to run the app and then continue on with the php process... so my question boils down to what's the best

Re: [PHP] Error when using HTTP Location header

2004-07-21 Thread Chris Shiflett
--- Arnout Boks [EMAIL PROTECTED] wrote: header('Location: ' . urlencode('loginForm.php?error=Incorrect password')); The Location header requires an absolute URL. Also, this is the header you are sending: Location: loginForm.php%3Ferror%3DIncorrect+password I doubt that's the URL you meant.

Re: [PHP] trim() white space from record set

2004-07-21 Thread msa
thanks for the helpthe syntax is wrong somewhereparentasis.colonsI don't know where the error is $coltitle_rsResults = 0; if (isset($_GET['Title'])) { $_GET['title'] = trim($_GET['title']); $coltitle_rsResults = (get_magic_quotes_gpc()) ? $_GET['Title'] :

[PHP] Project-browser-function / required/included

2004-07-21 Thread Frank Munch
Hello, it would be nice to get a list of all required/included-files in a project. Would anyone know of such a tool, e.g. a PHP-function that would take a filename as input and then recursively scan for the tree of required/included files? Also HTML-links (A HREF...) and similar would be nice

Re: [PHP] trim() white space from record set

2004-07-21 Thread melissa atchley
thanks guys...but with all of the in the message, the syntax is not coming through. I have tried adding the trim() line in several ways and it isn't working. can you help me with the exact syntax? - Original Message - From: Justin Patrin [EMAIL PROTECTED] To: John W. Holmes [EMAIL

Re: [PHP] trim() white space from record set

2004-07-21 Thread Justin Patrin
What exactly are you trying to do? trim() only rmeoves whitespace from the beginning and end of a string. It doesn't work on a record / array and it doesn't pull all whitespace from the string. $str = 'whitespace before and after'; $trimmedStr = trim($str); $noWhitespaceStr =

Re: [PHP] Error when using HTTP Location header

2004-07-21 Thread Chris Shiflett
--- Arnout Boks [EMAIL PROTECTED] wrote: But about the XSS attacks: what is a XSS attack, and is there a way I can let users still use some HTML tags (like B and BR)? You might find this article helpful: http://shiflett.org/articles/foiling-cross-site-attacks One easy way to mitigate most of

Re: [PHP] exec/system question..

2004-07-21 Thread Frank Munch
On Wed, 21 Jul 2004 10:09:52 -0700, bruce [EMAIL PROTECTED] wrote: 2) i could run the perl script, and have it somehow run in the background this would ba good, if there's a way to essentially run the php script in the background such that it doesn't hang apache. Do you mean ...to

  1   2   3   >