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:
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',
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 doesn't
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 =
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
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
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?
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.
?php
class Output {
var $Text;
function PrintOutput($Text){
echo $Text;
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
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
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 2345
DC
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 [
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
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?
I have a
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
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 is
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
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 AM
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:
--
Searchable archives for this list are available at
http://www.listsearch.com/phplist.lasso
--
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 PROTECTED]
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]
*
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:
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
Is there a way to make a variable of a function optional?
Thank You,
Jason Williard
--- 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 session.
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
--- 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:
?
--- 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
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/)
--- 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:
?
function myfunc($foo = 'bar')
{
echo $foo\n;
}
myfunc('foo');
myfunc();
?
Hope that helps.
Chris
=
Chris Shiflett -
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 =
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:
Hello
I have a folder full of html pages that I need to extract the content from.
They all have !-- content start -- and !--content end -- 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
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 seem
hm.. attachement didn't work.
here is the script:
?php
echo pre;
// 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 =
books
book id='22'
title
I have a folder full of html pages that I need to extract the content
from. They all have !-- content start -- and !--content end --
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
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( !--[a-z ]--, fread(
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.
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
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 code
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 ]
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
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,
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.
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 -Ryan
I
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]
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
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,
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 current
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
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
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
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,
54 matches
Mail list logo