RE: Re[2]: [PHP] End slash, small problem.

2004-01-02 Thread Chris
You forgot to double slash the windows slash like: '\\' I would write that same functionality as follows: $sep = (PHP_OS == 'Windows')? '\\':'/'; if(substr($template_path,-1) == $sep)) $template_path .= $sep; -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED] Sent: Friday, Jan

[PHP] Strange counter behavior

2004-01-02 Thread Cesar Aracena
Hi all, I know most of you doesn't have the time() for this kind of things, but I have a problem with this beautifull counter script I found on hotscripts. I read it over and over again but I can't find where the problem is. As the code is way too long to write (several .php pages) I uploaded it t

php-general Digest 3 Jan 2004 06:40:20 -0000 Issue 2509

2004-01-02 Thread php-general-digest-help
php-general Digest 3 Jan 2004 06:40:20 - Issue 2509 Topics (messages 173646 through 173673): Re: No cookie is being set? 173646 by: Matt Grimm 173651 by: Chris Shiflett 173652 by: Chris Shiflett 173673 by: Cesar Aracena Happy New Year | PHP Look Back 2003

Re: [PHP] No cookie is being set?

2004-01-02 Thread Cesar Aracena
Hi all, and thanks for all your kind hel. I found the problem although I don't know what was causing it. I simply moved the setcookie() function to another page (standalone to say) and it worked perfectly... my "Cookies" folder started to show/delete the cookie on each request, and also the site c

[PHP] Redirection to a named frame

2004-01-02 Thread Geoffrey Thompson
I was only able to find one reference to targeting a named frame on a redirection, in the "MySQL Cookbook" by O'Reilly. According to the book, this should work: header('Window-target: main'); header('Location: http://localhost/phase1/report.php'); But, alas, it seems to only load up the curren

Re: [PHP] example of posting board or shoutbox

2004-01-02 Thread Aidan Lister
Austin, We're not here to write scripts for you, I suggest you start by reading the manual at php.net. After you have a basic idea of how to use PHP, try looking at a couple of examples online. Use google, and search for "Database driven websites". Another option is to use a pre-made shoutbox, ag

[PHP] Production Websites (error loggin)

2004-01-02 Thread Aidan Lister
If anyone has successfully got php error logging working on a production website, could you please reply with the steps taken? I'm using RH7.3, Apache1.3x, PHP4.3x My php.ini has: log_errors = On error_log = /var/log/httpd/php/error_log However the errorlog is never created. Thanks for any hel

[PHP] RE: [sqlite] sqlite_encode_binary problems

2004-01-02 Thread Bronislav Klu?ka
I do not know solution to your problem, but is it possible for u to use BASE64 coding to convert binary file into text file and save it as test field? Brona > -Original Message- > From: John Scott [mailto:[EMAIL PROTECTED] > Sent: Friday, January 02, 2004 2:35 PM > To: [EMAIL PROTECTED]

Re[2]: [PHP] End slash, small problem.

2004-01-02 Thread Tom Rogers
Hi, Saturday, January 3, 2004, 11:23:00 AM, you wrote: RA> Hi, RA> Thanks for replying. RA> Basically after that path I am adding a file "ryanFile.php" so I need that RA> ending slash to always be in the path RA> My question was exactly that...how do I "grab" the last character? RA> Thanks, RA>

RE: [PHP] End slash, small problem.

2004-01-02 Thread Mike Brum
substr() http://us2.php.net/manual/en/function.substr.php Regards -M -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004 8:23 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] End slash, small problem. Hi, Thanks for replying. Basi

Re: [PHP] example of posting board or shoutbox

2004-01-02 Thread Austin
ya, i want to do it in php with a submit, altho i dont know how =\. can u send me examples of what the code would look like and explain it, Thank you! Vail, Warren wrote: Not sure I fully understand your problem, but if you are trying to simply move information from one area of a form to another,

RE: [PHP] example of posting board or shoutbox

2004-01-02 Thread Vail, Warren
Not sure I fully understand your problem, but if you are trying to simply move information from one area of a form to another, without doing a form post, then you might consider a javascript solution. This will happen almost instantaneously, since it all occurs on the browser machine. In order to

[PHP] example of posting board or shoutbox

2004-01-02 Thread Austin
how do i make something where some1 enters text, a name, and email address, etc. and can post it onto a textarea or something, in a format of Name Email(mailto link) Message here [If admin: link here to delete post] Ending line that seperates each post- [ admin login at bottom ] i

RE: [PHP] End slash, small problem.

2004-01-02 Thread Ryan A
Hi, Thanks for replying. Basically after that path I am adding a file "ryanFile.php" so I need that ending slash to always be in the path My question was exactly that...how do I "grab" the last character? Thanks, -Ryan On 1/3/2004 2:14:10 AM, Mike Brum ([EMAIL PROTECTED]) wrote: > Do you want

RE: [PHP] End slash, small problem.

2004-01-02 Thread Mike Brum
Do you want code to be handled differently if it's there or do you want it to be a certain way (e.g. always with trailing slash or never w/ trailing slash)? If you want it to always be a certain way, why not grab the last character of the path, check if it's a slash and then if it's not how you wa

[PHP] End slash, small problem.

2004-01-02 Thread Ryan A
Hi, Small problem, I am asking my users to enter a path for something in a textbox.. eg: /home/blah/something am confused as to how I can see if the entered path has an ending slash, if it has a end slash: $hasSlash=1 else $hasSlash=0 then i can carry on with my output... Thanks in advance. Ch

[PHP] Re: extract/replace the content of html pages

2004-01-02 Thread Martin Helie
Not sure I understand, but it sounds like you'd want to do something like: $dir = "yourdir/"; $d = dir( $dir ); while (false !== ($file = $d->read())) { if( substr( $file, 0, 1 ) == "." ) { continue; } $fp = fopen( $dir . $file, "r" ); $contentArray = split( "", fread( $fp

Re: [PHP] extract/replace the content of html pages

2004-01-02 Thread Mike Migurski
>I have a folder full of html pages that I need to extract the content >from. They all have and >comment tags surrounding the content. I need an easy way (not one at a >time) to extract that content and place it in a new template. > >Any ideas are appreciated. Im assuming it will have to be some

[PHP] Re: SimpleXML and documentation

2004-01-02 Thread Tobias Bradtke
hm.. attachement didn't work. here is the script: "; // at first: // sorry for my bad english! =) // i'm using php5beta3 on win32 // some interessting links: // // http://www.w3.org/TR/DOM-Level-2-Core/core.html // $xml_string = " The Grapes of Wrath John Steinb

[PHP] Re: SimpleXML and documentation

2004-01-02 Thread Tobias Bradtke
Hi! > [SimpleXML] but cannot find > any real documentation. > Is there any docs somewhere ? where ? I couldn't find any documentation either.. Only quite simple examples. > If not, does someone can answer a few questions ? I have a php-testscript with the things i found out. But some things see

[PHP] extract/replace the content of html pages

2004-01-02 Thread JLake
Hello I have a folder full of html pages that I need to extract the content from. They all have and comment tags surrounding the content. I need an easy way (not one at a time) to extract that content and place it in a new template. Any ideas are appreciated. Im assuming it will have to be some

Re: [PHP] Session logic question

2004-01-02 Thread Al
Thanks for the reply. i just found the bug in my code. I had a statement in the second script: $_SESSION = $array; that obviously, completely replaced everything in the $_ SESSION buffer. These little I gotchas can be fun. Chris Shiflett wrote: --- Al <[EMAIL PROTECTED]> wrote: Everyt

Re: [PHP] Optional Vars in Functions

2004-01-02 Thread Eugene Lee
On Fri, Jan 02, 2004 at 01:20:50PM -0800, Chris wrote: : Jason Williard asked: : > : > Is there a way to make a variable of a function optional? : : http://www.php.net/functions More specifically: http://www.php.net/manual/en/functions.arguments.php e.g. function puke ($stuff

Re: [PHP] Optional Vars in Functions

2004-01-02 Thread Chris Shiflett
--- Jason Williard <[EMAIL PROTECTED]> wrote: > Is there a way to make a variable of a function optional? Just give it a default value. Try this example: Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook

RE: [PHP] No cookie is being set?

2004-01-02 Thread Chris Shiflett
--- Larry Brown <[EMAIL PROTECTED]> wrote: > when I find a function doesn't work right and I am using variables > in its execution I run an echo/die combination immediately before > the function to verify the data being fed to it is as it should be. This is a very good suggestion, although your ex

Re: [PHP] No cookie is being set?

2004-01-02 Thread Chris Shiflett
--- Cesar Aracena <[EMAIL PROTECTED]> wrote: > I have the following code to first start a session and then write a > cookie... is that so hard? Not hard at all. However, when trying to identify a problem, it is much easier to try to isolate it. Forget the session, and see if you can set a cookie:

RE: [PHP] Optional Vars in Functions

2004-01-02 Thread Chris
http://www.php.net/functions -Original Message- From: Jason Williard [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004 1:11 PM To: [EMAIL PROTECTED] Subject: [PHP] Optional Vars in Functions Is there a way to make a variable of a function optional? Thank You, Jason Williard

Re: [PHP] Session logic question

2004-01-02 Thread Chris Shiflett
--- Al <[EMAIL PROTECTED]> wrote: > Everything works fine, except when I include another script file that > also uses the $_SESSION buffer. > > What appears to be happening is that start_session() on the second > script reinitializes the session buffer and I lose the data from the > first sessi

[PHP] Optional Vars in Functions

2004-01-02 Thread Jason Williard
Is there a way to make a variable of a function optional? Thank You, Jason Williard

[PHP] Happy New Year | PHP Look Back 2003

2004-01-02 Thread Derick Rethans
Hello! I would like to wish you all a happy new year. In tradition with last year I wrote a look back on the past year of PHP development again which you can find here: http://www.derickrethans.nl/20040101.php Have fun reading! regards, Derick -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] No cookie is being set?

2004-01-02 Thread Matt Grimm
Why not just echo the ID var separately? Less confusing with the escaped quotes and all. If you're not getting an ID var, it might be because you didn't use the array quotes ($row['member_id']) as Larry mentioned. Also be aware: "If setcookie() successfully runs, it will return TRUE. This does n

php-general Digest 2 Jan 2004 18:19:08 -0000 Issue 2508

2004-01-02 Thread php-general-digest-help
php-general Digest 2 Jan 2004 18:19:08 - Issue 2508 Topics (messages 173623 through 173645): Re: A simple instruction 173623 by: Justin French Array into $_SESSION 173624 by: Cesar Aracena 173625 by: Gerard Samuel 173626 by: Cesar Aracena 173641 by: L

[PHP] Session logic question

2004-01-02 Thread Al
I use the $_SESSION buffer extensively on my site without a problem, except one. Maybe someone can help me understand the problem. I have a simple page counter with a test to see if the page has been counted for the user. start_session(); * * [additional code] * if($_SESSION['ct

Re: [PHP] No cookie is being set?

2004-01-02 Thread Cesar Aracena
As extrange as can be, the echo function simply returns the following: 31536000); but not the setcookie, $varname and $value parts... What's this? Do I havve a missconfiguration in php.ini file? Thanks, Cesar Aracena "Larry Brown" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTE

[PHP] [Stats] PHP Net List: December 2003

2004-01-02 Thread Bill Doerrfeld
-- Searchable archives for this list are available at --

RE: [PHP] Array into $_SESSION

2004-01-02 Thread Larry Brown
Sorry, my bad. This is the Register Globals on version... with RegisterGlobals off you would simply use.. $_SESSION['user'] = $userDataFromForm; $_SESSION['authLevel'] -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004 11:33 AM To: Cesar

RE: [PHP] Array into $_SESSION

2004-01-02 Thread Larry Brown
session_register("user"); session_register("authLevel"); session_register("sessionExpire"); $user=$userDataFromForm; $authLevel = $authLevelFromDB; $sessionExpire = time() + 3600; etc... -Original Message- From: Cesar Aracena [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004 2:11

RE: [PHP] No cookie is being set?

2004-01-02 Thread Larry Brown
shouldn't $row[member_id] be $row['member_id']. In case anyone can profit from this, when I find a function doesn't work right and I am using variables in its execution I run an echo/die combination immediately before the function to verify the data being fed to it is as it should be. In this exa

[PHP] Re: Using -> operator for declarations?

2004-01-02 Thread Greg Beaver
Hi Marco, This is and has always been possible, php is not a strongly typed language. Regards, Greg -- phpDocumentor http://www.phpdoc.org Marco Skulschus wrote: Maybe, it was "correct" even in the past, but I am astonished that the following special "variable declaration" works. Although there i

[PHP] SimpleXML and documentation

2004-01-02 Thread Eric Daspet
Hi I'm working on a PHP5 project with some simple XML. I've seen examples of SimpleXML in CVS ("tests" and "examples" directories) but cannot find any real documentation. Is there any docs somewhere ? where ? If not, does someone can answer a few questions ? - how do I add an element ? - can I

[PHP] Re: Sort a while loop ?

2004-01-02 Thread Martin Helie
Since you mention mysql, why not just add "ORDER BY number DESC" to your query? The database will do the work for you. "Dave Carrera" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi List, > > How can I sort a while loop or do something before it to achieve the > following? > >

RE: [PHP] Sort a while loop ?

2004-01-02 Thread Dave Carrera
Thanks Tom, I had a complicated sql line and used my count(var) for the order by statement and bingo. Just sometimes you forget the obvious an need a kick up the :-) Dave C -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED] Sent: 02 January 2004 15:22 To: Dave Carrera Cc

Re: [PHP] ereg + performance problem

2004-01-02 Thread Martin Helie
Hi Mirek, thanks for pointing this out. This looks like a great site -- although, as you say, will require some [longer term] study. I'll have closer look at Smarty as well... "Mirek Novak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I think that smarty [ http://smarty

Re: [PHP] Sort a while loop ?

2004-01-02 Thread Tom Rogers
Hi, Saturday, January 3, 2004, 1:12:49 AM, you wrote: DC> Hi List, DC> How can I sort a while loop or do something before it to achieve the DC> following? DC> I have a MySql result fetching something like this: DC> Id Name Number DC> 1 Bob 34567 DC> 2 Ben 234 DC> 3 Jeff 4567 DC> 4 Dave 23

[PHP] Sort a while loop ?

2004-01-02 Thread Dave Carrera
Hi List, How can I sort a while loop or do something before it to achieve the following? I have a MySql result fetching something like this: Id Name Number 1 Bob 34567 2 Ben 234 3 Jeff 4567 4 Dave 2345 But I want to sort the while loop by Number Highest first so the result looks like this

[PHP] Setting timeout for fopen

2004-01-02 Thread Boaz Yahav
Hi I can see that socket_set_timeout() will set the timeout for fsockopen(). What would do the same for fopen? Sincerely berber Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!! To see where PHP might take you tomorrow. Share your code : http://addexample.weberdev.com Search

[PHP] Using -> operator for declarations?

2004-01-02 Thread Marco Skulschus
Maybe, it was "correct" even in the past, but I am astonished that the following special "variable declaration" works. Although there is not var $MissingText in the class, one can fill it with data and pass it to the object. Text = "Hello World"; $Message -> PrintOutput($Message -> Text); // seco

[PHP] Re: which Bugtracker for a PHP-project?

2004-01-02 Thread Andreas Korthaus
Andreas Korthaus wrote: > Suche nen netten/einfachen Bugtracker für ein PHP-Projekt. > > Welchen könnt Ihr empfehlen? Oh sorry, I it wasn't the german list ;-) But perhaps it's also a question for this group: I am looking for a nice/easy Bug-Tracker for my PHP-Project. What would you recommend?

Re: [PHP] ereg + performance problem

2004-01-02 Thread Mirek Novak
Hi, I think that smarty [ http://smarty.php.net ] can do this for u. It has tag nesting and, of course, you can define your own tag as a plugin. As for performance problem - this is known "feature" of regexp. Solution is not simple. You, IMHO, have to rethink your approach. For parsing larger

[PHP] Welcher Bugtracker in/für PHP?

2004-01-02 Thread Andreas Korthaus
Hi! Suche nen netten/einfachen Bugtracker für ein PHP-Projekt. Welchen könnt Ihr empfehlen? Grüße Andreas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] No cookie is being set?

2004-01-02 Thread Cesar Aracena
Hi again, I have the following code to first start a session and then write a cookie... is that so hard? Well it is starting the session but the cookie is not being set. see: $row = mysql_fetch_array($result); $_SESSION["user"] = $row[member_id]; if ($_POST["autologin"] == "yes") { $id = $_SESSI

Re: [PHP] Array into $_SESSION

2004-01-02 Thread Cesar Aracena
Thanks a lot :) "Gerard Samuel" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > On Friday 02 January 2004 02:11 am, Cesar Aracena wrote: > > Hi all, > > > > can somebody remind me how to propperly insert not just one but many > > variables into a $_SESSION handle? php manual do

Re: [PHP] Array into $_SESSION

2004-01-02 Thread Gerard Samuel
On Friday 02 January 2004 02:11 am, Cesar Aracena wrote: > Hi all, > > can somebody remind me how to propperly insert not just one but many > variables into a $_SESSION handle? php manual doesn't explain it very well. > It just says that it can be done. > $_SESSION['foo'] = array('a', 'b', 'c', 'd

[PHP] Array into $_SESSION

2004-01-02 Thread Cesar Aracena
Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't explain it very well. It just says that it can be done. Thanks in advanced, Cesar Aracena -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: