[PHP] setcookie

2005-03-04 Thread Randy Johnson
setcookie( sess_key,$key,0,/,. . str_replace( 
www,,$_SERVER[SERVER_NAME] ),0 );

Does that look right?
Thanks!
Randy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] setcookie

2005-03-04 Thread Randy Johnson
ok I see how that could be an issue.
Here is my big problem that I have not been able to figure out.
I have a client website that I am trying to fix
1.  it has sessions in database, and uses set cookie
2.  I can login with firefox/netscape/mozilla just fine
3.  I cannot login with any version of IE
4.  this is also by going to domain.com  or www.domain.com, neither work
any ideas?
Randy

Marek Kilimajer wrote:
Randy Johnson wrote:
setcookie( sess_key,$key,0,/,. . str_replace( 
www,,$_SERVER[SERVER_NAME] ),0 );

Does that look right?

No.
if $_SERVER[SERVER_NAME] == 'www.domain.com'
. . str_replace(www,,$_SERVER[SERVER_NAME] )
will give you ..domain.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] setcookie

2005-03-04 Thread Randy Johnson
The period was the issue all together,  i took the extra out and it 
worked.  Thanks for your help

Randy
Randy Johnson wrote:
ok I see how that could be an issue.
Here is my big problem that I have not been able to figure out.
I have a client website that I am trying to fix
1.  it has sessions in database, and uses set cookie
2.  I can login with firefox/netscape/mozilla just fine
3.  I cannot login with any version of IE
4.  this is also by going to domain.com  or www.domain.com, neither work
any ideas?
Randy

Marek Kilimajer wrote:
Randy Johnson wrote:
setcookie( sess_key,$key,0,/,. . str_replace( 
www,,$_SERVER[SERVER_NAME] ),0 );

Does that look right?

No.
if $_SERVER[SERVER_NAME] == 'www.domain.com'
. . str_replace(www,,$_SERVER[SERVER_NAME] )
will give you ..domain.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP slowness

2005-02-26 Thread Randy Johnson
Did you try rotating your logs so your logs are fresh?
Randy
Gerard wrote:
--snip--
I'm no expert on this stuff, but I'd be checking my swap space usage and
RAM usage with 'top' or any other tools available...  I suppose you
probably already did that, but...

Top shows that there's still normal non-swap memory available, so I don't
think that's it.
- Gerard
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Identifying a user who previously created a profile

2005-02-25 Thread Randy Johnson
You could do a few things here.
I would not banned people from signing up again if the ipaddress is in 
the database.

You could make it so no email could be in the database more than once.
What I did before was:
if a user's ipaddress matches an ipaddress in the database I have the 
script email me to investigate, then I can decide and delete accordingly.

You could do the same thing for similar email addresses, similar cities 
etc depending on paranoid you are about it.

Using Ipaddress is a bad idea because ISP recycle ipaddresses all the time.
Randy
Jacques wrote:
How can I ensure that a user is prevented from creating a second profile 
after he has registered a second time with different registration details?

I thought of capturing his IP Address and checking this value against my 
users table in my database where I have captured IP Addresses of users who 
have previously registered.

Jacques 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Capturing user's IP Address

2005-02-25 Thread Randy Johnson
I use:
$ipaddress = getenv(REMOTE_ADDR);
Jacques wrote:
Which function can I use to capture a user's IP Address when he registers on 
my site. I would like to store this value in a database.

Regards
Jacques 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP slowness

2005-02-25 Thread Randy Johnson
I think I have heard that your system can get really bogged down if your 
log files are HUGE.  So you probably are right.  I dread the size of the 
log files if he has a rather busy site and is logging everything...

Randy
Brent Baisley wrote:
I noticed  you have your error_reporting level set really high (2039), 
which is pretty close to everything. That may be fine on a development 
server, but I wouldn't set it that high on a production server. I'd be 
curious what you log looks like. Perhaps this is causing your slowness, 
perhaps not.

Also, you seem to use the short open tag style '?'. Not that it's 
causing your problem, but for compatibility you should probably use the 
long style '?php'.

On Feb 24, 2005, at 4:54 AM, Gerard wrote:
Hello people,
Recently, one of my webservers became rather slow. At first we thought it
was the MySQL backend, but when logged in on MySQL using the command line
tool over SSH, it runs as smooth as ever.
Static content (normal html pages) also load without delay. It seems that
the bottleneck is PHP itself.
For the sake of comparison, I created 2 test pages:
http://www.debuginc.com/test.html
http://www.debuginc.com/test.php
Everyone I asked says that the PHP page takes over 5 seconds to load 
while
the HTML one instantly displays. The only code in the PHP page is ? echo
'hello world'; ?. No MySQL stuff, so that eliminates the initial idea of
MySQL causing the slowness.

Nevertheless, it IS slow and I have no idea why or where to start 
looking.
The phpinfo() can be found on www.debuginc.com/info.php. Any help or 
hints
are highly appreciated.

Another interesting note; this problem started a couple of days ago 
without
any changes in the config or anything. At first I upped the amount of
connections Apache would accept, but it soon turned out that was not the
problem.

Thanks,
- Gerard
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP Wiki

2005-02-25 Thread Randy Johnson
Is there a Wiki site for PHP?   Is there a need for one?
-Randy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] help with adding

2005-02-25 Thread Randy Johnson
Try this:
$num=0;
 for ($i = 1; $i = $sendnum; $i++)
 {
 $qty = $_POST['qty'.$i];
 $num=$num+ $qty ;
 }
  echo $num;

Jay Fitzgerald wrote:
I have messed with this for a couple of days and cant get it right. Maybe I
need sleep :-)
 

The code below is echoing the qty correctly (10, 5, 25)
 

for ($i = 1; $i = $sendnum; $i++)
{
$qty = $_POST['qty'.$i];
echo $qty . 'br /';
}
 

The question is, how would I take add each of these numbers (10+5+25)?
 

Any help is appreciated.
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Wiki

2005-02-25 Thread Randy Johnson
Nope I had not been there.  Thanks for the link
Randy
Chris W. Parker wrote:
Randy Johnson mailto:[EMAIL PROTECTED]
on Thursday, February 24, 2005 2:50 PM said:

Is there a Wiki site for PHP?   Is there a need for one?

Been to http://phpcommunity.org/wiki/?
Chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Wiki

2005-02-25 Thread Randy Johnson
yea I just thought maybe a php-wiki would be neat, not one programmed in 
php but a wiki for everything php :-)

Randy
Robby Russell wrote:
On Thu, 2005-02-24 at 17:49 -0500, Randy Johnson wrote:
Is there a Wiki site for PHP?   Is there a need for one?
-Randy

The php.net site doesn't really need a wiki.
or did you mean is there a php-based wiki?
http://www.google.com/search?q=php+wiki
-Robby
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] weird mail function problem

2005-02-21 Thread Randy Johnson
You should have this at the top of your for loop
$body=;

Ahmed Abdel-Aliem wrote:
hi
i use this code to send email from mysite
but when it sends to some accounts it repeats the body part twice in
the same email while to other accounts it sends the body one time only
can anyone help in that plz ?
if ($email_to != ) {
$to = array();
$to = explode (,, $email_to);
$to_mum = count($email_to);
for ($i=0; $i$to_mum ; $i++){
$to_email = $to[$i];
$subject = $email_subject;
$body .= $HTTP_POST_VARS['message'];
$body .= \n---\n;
$body .= Article Name :;
$body .= \n---\n;
$body .= $Article_Name;
$body .= \n---\n\n; 
$body .= \nStory :\n\n;
$body .= $TheStory; 
$body .= \n\n\n---\n;
$body .= Sent By:  . $HTTP_POST_VARS['email_address'] . 
\n;
$header = From:  . $HTTP_POST_VARS['email_address'] .  
 .
$HTTP_POST_VARS['email_address'] . \n;
$header .= Reply-To:  . $HTTP_POST_VARS['email_address'] .  
 .
$HTTP_POST_VARS['email_address'] . \n;
$header .= X-Mailer: PHP/ . phpversion() . \n;
$header .= X-Priority: 1;
mail($to_email, $subject, $body, $header);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread Randy Johnson
try $HTTP_POST_VARS   maybe it is an older version of PHP
Randy
eatc7402 wrote:
Thanks for the input. However it does no good if the variables are empty,
which is my problem. The darn $_POST thing does not work at all
for me, and I am trying to find out why.
-Original Message-
From: b1nary Developement Team [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 20, 2005 3:40 PM
To: David Freedman; php
Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work

What's up David... This script *should* work... I don't see any errors, 
but try this anyways.  In your change your print command to this:

print(Hello,  . $name . !  You are  . $age .  years old!);
What those periods do is simply append them to each other, so in this 
case, you have the string, then you're appending the variable, then 
appending another string, then another variable, then the last string.  
Instead of having it all bunched up.

David Freedman wrote:

I have this simple form file:
html
head
/head
body
form action=test.php method=post
Name: input type=text name=name value=your name /br/
Age: input type=text name=age value=your age /br/ input 
type=submit name=submit value=submit / /form
/body
/html
Which passes (I wish!) data to this script:

?php
$name = $_POST['name'] ;
$age = $_POST['age'] ;
print(Hello, $name! You are $age years old!);
?
It does not work unless I turn register_globals ON  in the php.ini 
file. The php documentation leads me to believe this script SHOULD work 
with register_globals
OFF.

This a NEW instasllation of the Windows IIS Server also. Is there 
perhaps some configuration on the WINDOWS SERVER that must be set for 
general global data to be passed from a 'form' type page?

David F.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread Randy Johnson
Why do you need the ID?  I never use that in my forms.
Randy
The Disguised Jedi wrote:
i think you have to use the ID parameter in the input tag in your HTML
Name: input type=text name=name value=your name id=name /br/
Age: input type=text name=age value=your age id=age /br/
try that and see how it goes
On Sun, 20 Feb 2005 17:52:26 -0500, Randy Johnson [EMAIL PROTECTED] wrote:
try $HTTP_POST_VARS   maybe it is an older version of PHP
Randy
eatc7402 wrote:
Thanks for the input. However it does no good if the variables are empty,
which is my problem. The darn $_POST thing does not work at all
for me, and I am trying to find out why.
-Original Message-
From: b1nary Developement Team [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 20, 2005 3:40 PM
To: David Freedman; php
Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work
What's up David... This script *should* work... I don't see any errors,
but try this anyways.  In your change your print command to this:
   print(Hello,  . $name . !  You are  . $age .  years old!);
What those periods do is simply append them to each other, so in this
case, you have the string, then you're appending the variable, then
appending another string, then another variable, then the last string.
Instead of having it all bunched up.
David Freedman wrote:

I have this simple form file:
html
head
/head
body
form action=test.php method=post
Name: input type=text name=name value=your name /br/
Age: input type=text name=age value=your age /br/ input
type=submit name=submit value=submit / /form
/body
/html
Which passes (I wish!) data to this script:
?php
$name = $_POST['name'] ;
$age = $_POST['age'] ;
print(Hello, $name! You are $age years old!);
?
It does not work unless I turn register_globals ON  in the php.ini
file. The php documentation leads me to believe this script SHOULD work
with register_globals
OFF.
This a NEW instasllation of the Windows IIS Server also. Is there
perhaps some configuration on the WINDOWS SERVER that must be set for
general global data to be passed from a 'form' type page?
David F.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Creating a varable with a name held in a string

2005-02-10 Thread Randy Johnson
I like to do this:
foreach( $row as $key=$val) {
  $$key = $row[$key];

}
John Holmes wrote:
Ben Edwards (lists) wrote:
I have the following code;_
$sql = select * from  text where id= '$id' ;
   
$row = fetch_row_row( $sql, $db );

$img_loc= $row[img_loc];
$text_type= $row[text_type];
$seq= $row[seq];
$rec_type= $row[rec_type];
$section= $row[section];
$code= $row[code];
$repeat= $row[repeat];

$description= $row[description] );
$text = $row[text] );

Was wondering if there was a clever way of doing this with foreach on
$row.  something like
foreach( $row as $index = value ) {
create_var( $index, $value );
}
So the question is is there a function like create_var which takes a
string and a value and creates a variable?

I think extract() is what you're after. Just note that the quickest way 
to do things isn't always the best.

Is $description going to be shown to the users? How are you protecting 
it so that it doesn't contain HTML/JavaScript code? Is any of this going 
into form elements? How are you preparing it so that a double/single 
quote doesn't end the form element?

Just pointing out that although you can quickly create the variables 
you're after with extract(), there may still be other things you should 
do before you use them.

Also, why are you wasting processing time creating $text instead of just 
using $row['text'] in whatever output you have? It's a few more 
characters to type, but it takes away one level of possible confusion 
when you come back to this code later.

Just my $0.02.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Creating a varable with a name held in a string

2005-02-10 Thread Randy Johnson
I will read over extract and change my ways ;-)
Randy

John Holmes wrote:
Randy Johnson wrote:
I like to do this:
foreach( $row as $key=$val) {
  $$key = $row[$key];
   }

You're just recreating a slower version of extract()...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] cron job style php...

2005-01-16 Thread Randy Johnson
Russel,
Yes you can run a cron job on php
You may have to add a line like this at the top, it has been awhile since I 
have done it]

#! /usr/local/php/sapi/cli/php
this line would be different for your system
-Randy
- Original Message - 
From: Russell P Jones [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Sunday, January 16, 2005 6:00 PM
Subject: [PHP] cron job style php...


I have written a simple script that when a date in an array matches todays
date, it sends an email (notifies me when bills are due). Any ideas on how
to make this run once a day? Can you do a cron job on a PHP prog?
Russ Jones
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Encoding problems using phpMyAdmin

2005-01-16 Thread Randy Johnson
I am just curious why you do not upgrade to the latest stable 2.6.0-pl3?
Randy
- Original Message - 
From: Lars B. Jensen [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Sunday, January 16, 2005 11:40 PM
Subject: Re: [PHP] Encoding problems using phpMyAdmin


Just a quick note, this seems to be a bug in phpMyAdmin since 2.5.7-pl1 - 
I submitted a bug report on the sourceforge website and awaits them to 
handle it.

/ Lars
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] AFter the URL in PHP

2004-01-23 Thread Randy Johnson
Hello,

I am not sure if this is a php thing or not but hope is...


I see some sites like this:

www.domain.com/tree

where tree is not a directory

for example 
www.domain.com/tree/   would not work


the word tree above is not really a directory but a username or id or whatever

Anybody know what I am talking about?

Thanks

Randy




[PHP] query_data

2003-12-06 Thread Randy Johnson
I have a query

$query=select a,b,c,d,e from table where id='z';
$result=mysql_query();

$query_data=mysql_fetch_array($result);

I normally would do this:

$a=$query_data[a];
etc..

is there a way to do this is in a loop so I do not have to do all that
typing?

Thanks

Randy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] query_data

2003-12-06 Thread Randy Johnson
oh my gosh, I have been coding php for 4 years now.  They way I did it
before I saw in numerous examples from the books that I had bought.

I think of all the code I have wrote and I did not even have to do it that
way.

Thanks a bunch,

Randy
- Original Message - 
From: John W. Holmes [EMAIL PROTECTED]
To: Randy Johnson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, December 06, 2003 10:04 AM
Subject: Re: [PHP] query_data


 Randy Johnson wrote:
  I have a query
 
  $query=select a,b,c,d,e from table where id='z';
  $result=mysql_query();
 
  $query_data=mysql_fetch_array($result);
 
  I normally would do this:
 
  $a=$query_data[a];
  etc..
 
  is there a way to do this is in a loop so I do not have to do all that
  typing?

 You already have a variable called $query_data['a']... why do you need
 to make another variable? You're just wasting time and memory. If you
 want it shorter, then assign the result to $r so you have $r['a'], or
 something similar.

 However, if you just _have_ do to this, then use extract().

 -- 
 ---John Holmes...

 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

 php|architect: The Magazine for PHP Professionals  www.phparch.com

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] entering in text data and losing the \n

2003-11-29 Thread Randy Johnson
I have a form with a text area.

When the user submits the data it is saved to a mysql database in a field of type text.

When I extract the data from the database and display it in php it loses the line 
return and the data is all crammed together.   Here is an example

This is line 1
This is line 2
This is line 3

Here is what it would be after I extracted it and displayed it to the screen

This is line 1 This is line 2 This is line 3
 
What do I need to do to get it to retain the line feeds?

Thanks

Randy

Re: [PHP] entering in text data and losing the \n

2003-11-29 Thread Randy Johnson
Yep that was it.  

Thank you very much.

Randy
- Original Message - 
From: Chris Shiflett [EMAIL PROTECTED]
To: Randy Johnson [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, November 30, 2003 1:17 AM
Subject: Re: [PHP] entering in text data and losing the \n


 --- Randy  Johnson [EMAIL PROTECTED] wrote:
  I have a form with a text area.
  
  When the user submits the data it is saved to a mysql database in a
  field of type text.
  
  When I extract the data from the database and display it in php it
  loses the line return and the data is all crammed together.
 
 It doesn't lose it. In HTML, a newline isn't rendered as a newline by a
 browser unless it is surrounded by pre tags. You probably want to use the
 br tag instead. PHP has a function to help with this:
 
 http://www.php.net/nl2br
 
 Hope that helps.
 
 Chris
 
 =
 Chris Shiflett - http://shiflett.org/
 
 PHP Security Handbook
  Coming mid-2004
 HTTP Developer's Handbook
  http://httphandbook.org/
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] client running

2003-07-09 Thread Randy Johnson
My sysadmin installed PHP as a client on my linux server.

I have a script that I developed that opens a socket to accept data feed.
This script works great if I run it off my windows pc using the cgi version
of php but when I get it to the server it runs and it doesn't do anything.

I did get an error message cause I had the mysql username wrong so it is
reading the script.  I checked the syntax with the -l command and I ran it
with -a as well and nothing

I created a test script that simply echoed my name and it worked great.

any ideas?

Thanks

Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] client running

2003-07-09 Thread Randy Johnson
All is well.  The site I was connecting to with the stream changed the
string format.  Once I figured that out it worked flawlessly :-)

Randy
- Original Message - 
From: Randy Johnson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Brenton Dobell [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 11:32 AM
Subject: [PHP] client running


 My sysadmin installed PHP as a client on my linux server.

 I have a script that I developed that opens a socket to accept data feed.
 This script works great if I run it off my windows pc using the cgi
version
 of php but when I get it to the server it runs and it doesn't do anything.

 I did get an error message cause I had the mysql username wrong so it is
 reading the script.  I checked the syntax with the -l command and I ran it
 with -a as well and nothing

 I created a test script that simply echoed my name and it worked great.

 any ideas?

 Thanks

 Randy



 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] array question

2003-05-30 Thread Randy Johnson
How do I access the data in $query_data after I go through the while loop,
here is an example

$result=mysql_query($query,$link);
while ($query_data=mysql_fetch_array($result) )
{
   $var1=$query_data[var1];
   $var1=$query_data[var1];
}

after the while is done,   How do I access the data in query data again . I
perform calculations the first time and the second time I need to display
the rows on the screen.


Randy




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] array question

2003-05-30 Thread Randy Johnson
I found this in the manual user comments and it worked great

mysql_data_seek($result,0);

Randy
- Original Message - 
From: Randy Johnson [EMAIL PROTECTED]
To: Brian Dunning [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 10:14 PM
Subject: [PHP] array question


 How do I access the data in $query_data after I go through the while loop,
 here is an example

 $result=mysql_query($query,$link);
 while ($query_data=mysql_fetch_array($result) )
 {
$var1=$query_data[var1];
$var1=$query_data[var1];
 }

 after the while is done,   How do I access the data in query data again .
I
 perform calculations the first time and the second time I need to display
 the rows on the screen.


 Randy




 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] command line

2003-04-03 Thread Randy Johnson
What would be the syntax for executing a command line php script from the
web.   and is there way to check the staus of the script via the web ie is
it stil running or not?

Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] email/time question

2003-01-10 Thread Randy Johnson
hello,

i am using php with mysql-innodb table support

Is there a command to find out if a commit was successful?

If not how do i go about it?

Thanks

Randy


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] email/time question

2003-01-02 Thread Randy Johnson
Here is what i need to do.

I have a form where a user will submit, email address, email text and a time
 like 11:15pm  and at 11:15pm the email is supposed to be sent out.   any
ideas on how i can make this happen automatically???


Randy


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] What does this error mean

2002-09-22 Thread Randy Johnson

What does this error mean?

Warning: Wrong parameter count for mysql_query() 


Thanks

Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] What does this error mean

2002-09-22 Thread Randy Johnson

I found out what it was:

I mispelled a column in the insert statement.  it actually had nothing to do
with the parameters passed to the function  i passed $query and $link and
once i spelled the column right it went through just fine.   why would it
not just tell me that the column did not exist?

Randy
- Original Message -
From: Daniel Kushner [EMAIL PROTECTED]
To: 'Randy Johnson' [EMAIL PROTECTED]; 'Paul Nicholson'
[EMAIL PROTECTED]; 'Bryan McLemore' [EMAIL PROTECTED]; 'PHP
GEN LIST' [EMAIL PROTECTED]
Sent: Sunday, September 22, 2002 2:34 PM
Subject: RE: [PHP] What does this error mean


 Hi Randy,

 It means that you are calling the function without the right amount of
 parameters. The function mysql_query expects at least 1 (one) paramter:
 the query String.
 http://www.php.net/manual/en/function.mysql-query.php

 Regards,
 Daniel Kushner
 
 Need hosting? http://thehostingcompany.us




 -Original Message-
 From: Randy Johnson [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, September 22, 2002 2:26 PM
 To: Paul Nicholson; Bryan McLemore; PHP GEN LIST
 Subject: [PHP] What does this error mean


 What does this error mean?

 Warning: Wrong parameter count for mysql_query()


 Thanks

 Randy



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] question about taking post to session

2002-09-21 Thread Randy Johnson

hello,

how could i take all the variables in $_POST[] and move them to
$_SESSION[]?

example

$_POST[name]=$_SESSION[name]


Thanks in advance


Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] SESSION ARRAY

2002-08-29 Thread Randy Johnson

What is the proper syntax for storing an array in a session?

is it $_SESSION[BILLARRAY]=$ARRAY?


Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] mysql upate return false?

2002-08-22 Thread Randy Johnson

I have a function


update_trans();


in a mysql_query() that processes an update,  what could i check for to see
if it was successful or not.  The update only updates 1 row.

Thanks

Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mysql upate return false?

2002-08-22 Thread Randy Johnson

Is this a proper way to see if an insert has failed?

$Query=insert blah into blah where blah=blah;
if (! mysql_query($Query,$link))
{
  $dberror= mysql_error()
}


Is there a better way to do it?

Randy


- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Randy Johnson [EMAIL PROTECTED]
Cc: Rodrigo Peres [EMAIL PROTECTED]; PHP [EMAIL PROTECTED]
Sent: Thursday, August 22, 2002 10:52 AM
Subject: Re: [PHP] mysql upate return false?


 mysql_affected_rows()

 On Thu, 22 Aug 2002, Randy Johnson wrote:

  I have a function
 
 
  update_trans();
 
 
  in a mysql_query() that processes an update,  what could i check for to
see
  if it was successful or not.  The update only updates 1 row.
 
  Thanks
 
  Randy
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] directory help

2002-08-21 Thread Randy Johnson

I need some help,

I need to go through a number of directories and rename each of the files
like this

img001
img002
img003

do dir 1 would have

img001
img002
img003

directory 2 might have
img004
img005

and directory 3 would have
img006
img007
img008


Thanks

Randy





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] php Transaction question

2002-08-20 Thread Randy Johnson

I know I saw this somewhere before but cannot find the answer

In a php/mysql script  how do a do a transaction

is it like this or is their a better way to do it? 

innodb table method

$query=set autocommitt=0;
mysql_query($query);

$query=select blah from blah;;
mysql_query($query);

$query=update blah where blah;;
mysql_query($query);

$query=committ;;
mysql_query($query);


Thanks

Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] User data validation

2002-08-19 Thread Randy Johnson

I have a proccess where a user submits the data, data is run through checks,
validation etc , then stored in a session.   then the user goes to
confirmation page where they hit submit to verify the details are correct.
when they hit submit they go to another script that pulls the session
variables.

My question is:  should i run the data through validation again or can i be
assured that the data is a ok because it was already validated ,stored in a
session and then pulled from a session.



Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] tracking visitors till registration?

2002-08-19 Thread Randy Johnson

How do I surpress php warnings from being displayed to the screen


Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] SQL Injection/Data Balidation

2002-08-16 Thread Randy Johnson

I didn't see that, what a waste of paper

Randy
- Original Message -
From: Edwin @ [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, August 16, 2002 1:14 PM
Subject: Re: [PHP] SQL Injection/Data Balidation


 Yeah, I'm scared...

 Please excuse me but may I say that it seems like you've sent some wrong
 info to the wrong mailing list?

 I use PHP NOT ASP, I use MySQL or PostgreSQL or Oracle but NOT M$ SQL
 Server. And IIS? Of course, some people use it (perhaps) because of some
 unavoidable circumstances but I don't--I use Apache NOT IIS.

 Of course, there's nothing bad about being cautious... However, please
send
 some links (or documents) that are more relevant...

 Thanks anyway, now *I* have something to scare my friends... ;)

 - E

 
 Please CC me as I'm on digest:
 --
 
 Are there any libraries for data validation available? If one reads
 papers like these:
 
  http://www.nextgenss.com/papers/advanced_sql_injection.pdf
  http://www.nextgenss.com/papers/more_advanced_sql_injection.pdf
 
 It becomes apparent that sites using databases are incredibly open to
 attack because of the ingenuity of the attackers. I think there should
 be a PHPGuardLib or something. After reading those articles, I plan on
 filtering ALL input for semi-cololons and 'chr(' character strings. In
 the cases where I want to accept apostrophes, I'm going to be very
 careful.
 
 Also, are there any attacks to email programs on linux that can be done
 through input forms?
 
 PS, for those who think escaping user input only on apostrophes, THINK
 AGAIN! And read the aticles above.
 --
 
 If You want to buy computer parts, see the reviews at:
 http://www.cnet.com/
 **OR EVEN BETTER COMPILATIONS**!!
 http://sysopt.earthweb.com/userreviews/products/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




 _
 MSN Hotmail è il provider email più grande al mondo. cosa aspetti a farti
un
 account? http://www.hotmail.it


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] question concerning php parsing

2002-08-13 Thread Randy Johnson

if i have functions.php with 10 functions in it and include the file in my
main php file and call  1 of the 10 functions in my program does the whole
functions.php have to be parsed or does it just include the function that is
needed.

I am just curious as  I plan to use the phpa on my scripts and if I don't
need all those functions to be in memory just the function that i call.

Hope i did not confuse anybody.

Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Sessions in a database?

2002-08-13 Thread Randy Johnson

When i started to learn php there was talk of storing session information in
a database rather than in a particular directory like /tmp

Is it better to store the session data in a database rather than a
directory?   Is it faster if it is stored in the database?

Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Win PHP Editor...

2002-08-10 Thread Randy Johnson

I noticed they have not come out with a new version in quite a long time and
do not answer their emails?   anybody else heard about any future releases
of editplus?


Randy
- Original Message -
From: Liam MacKenzie [EMAIL PROTECTED]
To: Dave at Sinewaves.net [EMAIL PROTECTED]; PHPlist
[EMAIL PROTECTED]
Sent: Friday, August 09, 2002 9:38 PM
Subject: Re: [PHP] Win PHP Editor...


 Well, I still believe the best editor for windows is Editplus
 (www.editplus.com)

 Small, fast, stable, tonnes of features and it supports a lot of file
type.
 If it doesn't give you colour coding for a particular language, say Cold
 Fusion, go to the homepage and download the plugin.

 It's only 800K to download, give it a shot.  It's uninstall program
actually
 gets rid of it aswell, completely.  so if you don't like it, no sweat  :-P

 Just my 2 cents...

 Liam



 - Original Message -
 From: Dave at Sinewaves.net [EMAIL PROTECTED]
 To: PHPlist [EMAIL PROTECTED]
 Sent: Saturday, August 10, 2002 3:42 AM
 Subject: [PHP] Win PHP Editor...


  Just have to add one little fine piece of free software that nobody's
  mentioned yet, Crimson Editor (http://www.crimsoneditor.com )
 
  No code completion, but it's got every other feature of the big
commercial
  beasts... definitely check it out - I just switched over, and it's
great.
 
 
  From the site:
  --
  Edit multiple documents
 - switch between documents using file selection tab
 - pressing Ctrl+Tab brings the last accessed document to top
 
  Syntax highlighting
 - configurable via custom syntax files
 - preconfigured for more than 50 computer languages
 
  Multi-level undo / redo
 - all editing actions are recorded from the opening of a file
 - unlimited undo and redo buffers
 
  Find  Replace
 - replace specified text one by one, or as a whole
 - support regular expression
 
  Natural word wrapping
 - word wrapping does not affect syntax highlighting
 - configurable wrapping indentation (easer to understand the syntax)
 
  Spell checker
 - around 10 words were added in the dictionary
 - users can register new words in their own dictionary
  (InstallDir/user.dic)
 
  User tools and macros
 - execute external programs with proper arguments
 - compile, execute and test your code
 - ease your fingers with key stroke recording (record  replay)
 
  Directory tree view window
 - click to open documents
 - filter to display only selected file class
 
  Edit remote files directly using built-in FTP client
 - open, edit, and save documents in remote FTP servers
 - save account information (encoded) for automatic logon
 
  Print  Print preview
 - configurable page header and footer
 - print with line numbers
 - print with syntax highlighting (used in color printer)
 - true type font selection for printer
 
  Other useful features
 single instance / multiple instances, ability to detect changed
files,
 bookmark  go to, highlight active line, highlight matching pairs,
 multi-byte support with integrated IME (for eastern languages),
 auto indent, wheel mouse support, copy  paste, line numbers,
 configurable line spacing, option to save files in Unix format,
 option to set working directory
 
 
 
 
  Very nice little IDE, and the price is right! Nothing!
 
  Dave
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

- Original Message -
From: Liam MacKenzie [EMAIL PROTECTED]
To: Dave at Sinewaves.net [EMAIL PROTECTED]; PHPlist
[EMAIL PROTECTED]
Sent: Friday, August 09, 2002 9:38 PM
Subject: Re: [PHP] Win PHP Editor...


 Well, I still believe the best editor for windows is Editplus
 (www.editplus.com)

 Small, fast, stable, tonnes of features and it supports a lot of file
type.
 If it doesn't give you colour coding for a particular language, say Cold
 Fusion, go to the homepage and download the plugin.

 It's only 800K to download, give it a shot.  It's uninstall program
actually
 gets rid of it aswell, completely.  so if you don't like it, no sweat  :-P

 Just my 2 cents...

 Liam



 - Original Message -
 From: Dave at Sinewaves.net [EMAIL PROTECTED]
 To: PHPlist [EMAIL PROTECTED]
 Sent: Saturday, August 10, 2002 3:42 AM
 Subject: [PHP] Win PHP Editor...


  Just have to add one little fine piece of free software that nobody's
  mentioned yet, Crimson Editor (http://www.crimsoneditor.com )
 
  No code completion, but it's got every other feature of the big
commercial
  beasts... definitely check it out - I just switched over, and it's
great.
 
 
  From the site:
  --
  Edit multiple documents
 - switch between documents using file selection tab
 - pressing Ctrl+Tab brings the last accessed document to top
 
  Syntax highlighting
 - 

Re: [PHP] Re: Protect PHP coding

2002-08-02 Thread Randy Johnson

Does the bcompiler below improve performance?  

make scripts run  faster?

anybody have a testimonials on it's use??


Thanks,

Randy
- Original Message - 
From: Manuel Lemos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 01, 2002 9:14 PM
Subject: [PHP] Re: Protect PHP coding


 Hello,
 
 On 08/01/2002 01:58 PM, Yc Nyon wrote:
  Is there any method to encrypt PHP files.
 
 Use bcompiler which is free and is part of PEAR/PECL official PHP 
 extensions repository:
 
 http://pear.php.net/package-info.php?pacid=95
 
 -- 
 
 Regards,
 Manuel Lemos
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] mcrypt

2002-08-01 Thread Randy Johnson

I am looking into different password encryption solutions.

i started using crypt()

then changed to mcrypt()

which was not any good cause of the high ascii characters

then i read about converting the high ascii characters to hex .

Is this the ideal way to encrypt passwords or is their something better.

Thanks 

Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mcrypt

2002-08-01 Thread Randy Johnson

I found that the some of the high ascii characters would not store right in
the database or something cause when i went to compare them, the comparison
would fail.


Randy

- Original Message -
From: Danny Shepherd [EMAIL PROTECTED]
To: Randy Johnson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 01, 2002 11:31 AM
Subject: Re: [PHP] mcrypt


 Just base64 encode the mcrypt output if the non printable chars bother
you,
 though I don't really see what the problem is, unless you're pushing the
 output to a web page.

 Danny.


 - Original Message -
 From: Randy Johnson [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, August 01, 2002 4:24 PM
 Subject: [PHP] mcrypt


  I am looking into different password encryption solutions.
 
  i started using crypt()
 
  then changed to mcrypt()
 
  which was not any good cause of the high ascii characters
 
  then i read about converting the high ascii characters to hex .
 
  Is this the ideal way to encrypt passwords or is their something better.
 
  Thanks
 
  Randy
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] String Question

2002-07-31 Thread Randy Johnson

Hello,

I would like to be able to do the following but have not figured out a way to handle it

$string=abcdefghijklmnopqrstuvwxz;

I would like to divde the above string into separate strings 8 charactes long , example

$string1=abcdefgh
$string2=ijklmnop
$string3=qrstuvwx
$string4=yz

if the string were only 10 long

$string=abcdefghij

then

$string1=abcdefgh
$string2=ij

any suggestions would be greatly appreciated.

Thanks,


Randy



[PHP] date Question

2002-05-20 Thread Randy Johnson

Is their a way to retrieve the previous month using/altering  the code
below:

// get the current timestamp into an array
$timestamp =  time();
$date_time_array =  getdate($timestamp);
$month =  $date_time_array[mon];
$day =  $date_time_array[mday];
$year =  $date_time_array[year];
 $tmonth=  $date_time_array[month];

outputs

5202002 May

i need it to output
4/20/2002 April


Thanks

Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] virtual coin toss 55%

2002-05-17 Thread Randy Johnson

I was surfing the internet today and found a site that offered a coin toss game in 
PHP.The site claimed that it used the latest and most random computer algorithms 
to do the Coin Toss.

In the next line it said that you (the player) would win 45% of the time.

I would like opinions how somebody could offer a 50/50 coin toss game and gurantee a 
45%   win  ratio for the player

The idea of game programming is appealing,  but I have no idea how you would gurantee 
that the player wins 45% of the time and the operators win 55% of the time.


Thanks in advance

Randy







Re: [PHP] extracting a html file name

2002-04-23 Thread Randy Johnson

Matt,

Thanks  That worked perfectly!   I cannot believe I did not think of
explode, i have used it before :-)

Thanks again,

Randy
- Original Message -
From: Matt Williams [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Dave Sugar [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, April 23, 2002 10:02 AM
Subject: Re: [PHP] extracting a html file name


 On Tuesday 23 April 2002 6:59 pm, [EMAIL PROTECTED] wrote:

  ie bill, car, jack, moneypower etc...
 
  example
 
  http://www.mydomain.com/member.php/moneypower/test.html
 
 
  I have experimented with the php variables that come in , but the only
way
  I could figure out to get test.html out of there is If I captured the
  $PATH_INFO AND did a str_replace on all the html filenames on that site
  and did another one to get rid of the / . then I would have the member
  name and then i could do a string replace on the member name from the
path
  info, which works , for now but as I get more files etc, it's gonna be a
  pain in the butt, there has to be a better way to do it.

 Hi the function you need is explode.

 try

 $my_path = explode(/,$PATH_INFO);
 array_shift($my_path);

 so $my_path[0] will be moneypower using the above
 $my_path[1] will be test.html

 HTH

 matt

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] storing session variables in a database

2002-04-18 Thread Randy Johnson

anybody have a good tutorial/example of storing sessions in a database?


Randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] File Edit

2002-03-25 Thread Randy Johnson

Hello,


I want to be able to edit part of a file.  via a text box using php  how do i read a 
file and get the part i want to read and edit it and then write it back to that file 
here is an example:

.
case $1 in
  start)

100.123.456.789
321.654.987.231
123.45.456.789
123.456.789.12

;;



In this example I want to be able to be able to pull the ipaddresses out and edit them 
and add a new one on to the end and then write the data back to the file.


Thanks in advance


Randy





Re: [PHP] File Edit

2002-03-25 Thread Randy Johnson

How do I know what part of it to read in the array?
- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Randy Johnson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 9:03 PM
Subject: Re: [PHP] File Edit


 You read the entire file into memory (an array using file() perhaps) and
 then edit it in memory and write the entire new file back out.

 -Rasmus

 On Mon, 25 Mar 2002, Randy Johnson wrote:

  Hello,
 
 
  I want to be able to edit part of a file.  via a text box using php  how
do i read a file and get the part i want to read and edit it and then write
it back to that file here is an example:
 
  .
  case $1 in
start)
 
  100.123.456.789
  321.654.987.231
  123.45.456.789
  123.456.789.12
 
  ;;
 
  
 
  In this example I want to be able to be able to pull the ipaddresses out
and edit them and add a new one on to the end and then write the data back
to the file.
 
 
  Thanks in advance
 
 
  Randy
 
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] File Edit

2002-03-25 Thread Randy Johnson

ok i read all the file into an array,

now do i search each line in the array .

based on my example i do not know how to proceed
after reading it into the array



case $1 in
start)
100.123.456.789
321.654.987.231
123.45.456.789
123.456.789.12
;;

 
- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Randy Johnson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 9:11 PM
Subject: Re: [PHP] File Edit


 You read all of it

 On Mon, 25 Mar 2002, Randy Johnson wrote:

  How do I know what part of it to read in the array?
  - Original Message -
  From: Rasmus Lerdorf [EMAIL PROTECTED]
  To: Randy Johnson [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Monday, March 25, 2002 9:03 PM
  Subject: Re: [PHP] File Edit
 
 
   You read the entire file into memory (an array using file() perhaps)
and
   then edit it in memory and write the entire new file back out.
  
   -Rasmus
  
   On Mon, 25 Mar 2002, Randy Johnson wrote:
  
Hello,
   
   
I want to be able to edit part of a file.  via a text box using php
how
  do i read a file and get the part i want to read and edit it and then
write
  it back to that file here is an example:
   
.
case $1 in
  start)
   
100.123.456.789
321.654.987.231
123.45.456.789
123.456.789.12
   
;;
   

   
In this example I want to be able to be able to pull the ipaddresses
out
  and edit them and add a new one on to the end and then write the data
back
  to the file.
   
   
Thanks in advance
   
   
Randy
   
   
   
  
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Variable problem

2002-02-04 Thread Randy Johnson

I heard before that you can store session variables in a database rather
than using the tmp directory etc  etc..Does anybody have any links on
this?

Thanks


Randy
- Original Message -
From: Yoel Benitez Fonseca [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 18, 2002 2:26 PM
Subject: RE: [PHP] Variable problem


   Use an array !?, I mean :

   $result[$i] = test;

  How do I combine the following so it is treated as one variable
 
  $i=10
 
  $result$i=test;
 
 
  I want this to be:
 
 
  $result10=test;
 
 
  $i changes so I cannot just put in 10 instead of I.
 
 
  anybody know how i can do that?
 --
 Yoel Benitez Fonseca



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Logo proposal

2001-12-12 Thread Randy Johnson

How about the Rhino ?


- Original Message - 
From: Billy Harvey [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 8:30 AM
Subject: RE: [PHP] Logo proposal


 On Wed, 2001-12-12 at 08:11, Armin Hartinger wrote:
  Personally, I think it should be something f-based ... the f will then
  be replaced with the ph ... e.g. Phish etc...
  
  Also I think it should be something maritime ...
  Penguin, Dolphin
  
  After all, Linux, PHP  MySQL is the killer-combo, isn't it?
  
  -Armin
 
 H - killer - how about an Orca?  We'll pretend that they get along
 well with the MySQL dolphin, but PHP is definitely a killer app.
 
 Billy
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP/MySQl Consultation

2001-08-24 Thread Randy Johnson

I am in need of someone that is very good at PHP and MySQL to view my
scripts and discuss with me in detail on how to speed up my scripts and how
to speed up mysql some.   if you are interested please send me credentials
and rates ASAP  please send them to [EMAIL PROTECTED]


Thank you,


Randy
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/2001


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] FORCING A PHP OUTPUT TO BE CACHED

2001-07-27 Thread Randy Johnson

Is it possible to force a confirmation page that is displayed via a post
operation to be cached so it will not rerun the script when somebody hits
the refresh button?   I am hoping it is easy as using a header   thanks
in advance


Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] forms and IP numbers

2001-07-13 Thread Randy Johnson

I would like to pull the date and time of the creation of a file via a php
script and compare it to the current time.

How do I do this?

TIA

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Downloading Data from Database

2001-07-12 Thread Randy Johnson

Dave,

The code below gives me an error in IE 5.+

Here is the error:  

IE cannot download ..blah blah try again later

Do you use this code on your site or do i just need to tweak it

-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 6:30 PM
To: Randy Johnson; PHP General List
Subject: [PHP] Re: Downloading Data from Database


On Sat, 14 Jul 2001 00:40, Randy Johnson wrote:
 I am adding a feature to my site where members can download their
 information from the database.  What is the best way to accomplish
 this?

 Create a text file every time a member wants to download their info?   
 I thought about this ..how would I handle deleting the text files when
 I was finished and what would prevent others from downloading the file?


 I read somewhere that files can be created on the fly or dynamically
 anytime a download takes place.   This sounds like a good idea cause
 there wouldn't be any files on the server.   Any idea where I can get
 more info on that?

 Thanks

 Randy

try this:

header(Content-disposition: filename=maillist.dat);
header(Content-type: application/octetstream);
header(Pragma: no-cache);
header(Expires: 0);
//query database
//echo results required
//end
-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   [incredibly rude and childish comments deleted]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Downloading Data from Database

2001-07-11 Thread Randy Johnson

I am adding a feature to my site where members can download their
information from the database.  What is the best way to accomplish this?

Create a text file every time a member wants to download their info?I
thought about this ..how would I handle deleting the text files when I was
finished and what would prevent others from downloading the file?


I read somewhere that files can be created on the fly or dynamically anytime
a download takes place.   This sounds like a good idea cause there wouldn't
be any files on the server.   Any idea where I can get more info on that?

Thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] deletion of temp files

2001-07-11 Thread Randy Johnson

How do you associate a temp file with a session so PHP automatically deletes
it when garbage collection occurs

-Original Message-
From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 11:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] deletion of temp files


Sessions support garbage removal, where the temp files will be deleted at a
random time after the user has left.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Anurag Bhalla [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 09, 2001 3:14 AM
Subject: [PHP] deletion of temp files


Hi list

In my application,I need to generate some files for each
user who comes to my site.These files need to be deleted
once the user logs off. Pls suggest some way to delete these
files once the user logs off ; perhaps with the use of sessions

Regards

Anurag






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mkstemp

2001-07-11 Thread Randy Johnson

I see mkstemp()   mentioned in the tempnam page in the online manual but
cannot find it anywhere?   Where is the docs for this?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Rename a File?

2001-07-11 Thread Randy Johnson

How do I rename a file on Linux in PHP?

Thanks

Randy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Command Line

2001-04-30 Thread Randy Johnson

how do access arguments if I run a script from the command line 

example


php myscript.php  arg1, arg2


thanks

randy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mkstemp()

2001-04-26 Thread Randy Johnson

I cannot find any documentation on mkstemp() .  Can somebody point me in the
right place?


thanks

randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] FATAL ERROR

2001-04-25 Thread Randy Johnson

Several people got the following error today when accessing my site.  Does
anybody know what is going on?


They are PHP scripts accessing a mysql database if that helps.

I am not sure if this is a physical memory problem or what



Thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP FREE MEMORY

2001-04-25 Thread Randy Johnson

if I put the following piece of code in a forloop does it use more memory or
does it use the same memory since the same variable result is being used:

will it use up lots of memory if I execute it 1000 times or will it use the
same memory.


for (loop) {

$result = mysql_query (UPDATE A_TBL SET dog ='$var' WHERE type ='$var2');
$nr=mysql_affected_rows();
if ($nr==0) { process error}

}


thanks Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] random letters and numbers

2001-04-24 Thread Randy Johnson

Is there a way to generate a random set of characters ranging from 8 to 12
characters and numbers where it is crucial that the letters and numbers are
truly random because I need to create temporary files for people to download
information.

Any links/suggestions would be greatly appreciated

Thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mysql_free_result

2001-04-20 Thread Randy Johnson

Does php release the memory used by the result set when it is done
executing?

if so why should I use mysql_free_result()


Thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] mysql_free_result

2001-04-20 Thread Randy Johnson

Does the Mysql_free_result slow down the script at all?

Randy

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 8:49 PM
To: Randy Johnson
Cc: Php-General
Subject: Re: [PHP] mysql_free_result


 Does php release the memory used by the result set when it is done
 executing?

Correct

 if so why should I use mysql_free_result()

In case you are making multiple queries within the same script and want to
keep your runtime memory usage low.

-Rasmus



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] multiple connects

2001-04-19 Thread Randy Johnson

how do I make sure the right connection is being used when I have 2
persistent connections.   is there any documentation on this ?

thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] temp file part II

2001-04-18 Thread Randy Johnson

I have not managed to get IE to download my file on the fly as suggested.
so I was wondering if there are any other suggestions on how I can create a
temp file for download and after the download is complete the file is
deleted.

thanks

randy




Instead of:
header("Content-disposition: filename=backup.csv");
try
header('Content-Disposition: attachment; filename=backup.csv');

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] temp file help

2001-04-17 Thread Randy Johnson

The following code downloads information on the fly and saves it as a file
on the user's hard drive.  It works great in Netscape downloads data
properly but in Internet explorer it doesn't work.

Here is the error I get any ideas?

IE was not able to open this site the site is either unavailable or cannot
be found.

BUT

if I right click and says "The file cannot be written to cache".   I even
commented out the following:

header("Pragma: no-cache");

But it still did not work.  Please help !!!

Thanks

Randy


include "db.inc";
header("Content-disposition: filename=backup.csv");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");


// doing some DOS-CRLF magic...
$client=getenv("HTTP_USER_AGENT");
if (ereg('[^(]*\((.*)\)[^)]*',$client,$regs)):
$os = $regs[1];
// this looks better under WinX
if (eregi("Win",$os)):
  $crlf="\r\n";
else:
  $crlf="\n";
endif;  /* OS = WIN */
endif;  /* ereg $client */

# DB STATEMENT HERE
#
   $link_id = db_connect($default_dbname);
   if(!$link_id) error_message(sql_error());

   $result = mysql_query($query)or print "error".mysql_error();
   if(!$result) error_message(sql_error());
 while($query_data = mysql_fetch_array($result)) {
 Variable definition/and assignment here

echo "var1,var2,var3,var4,var5,var6";
 echo $crlf;
  }


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] temp file help

2001-04-17 Thread Randy Johnson

Nope This doesn't work either.   I am going to find header documentation and
see if I can find a work around

-Original Message-
From: Phil Driscoll [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 12:48 PM
To: Randy Johnson; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] temp file help


Instead of:
header("Content-disposition: filename=backup.csv");
try
header('Content-Disposition: attachment; filename=backup.csv');

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: [PUP] temp file help

2001-04-17 Thread Randy Johnson

ok this doesn't work either I get the same cache error.  anybody have any
other suggestions?

Randy

-Original Message-
From: Phil Driscoll [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 12:48 PM
To: Randy Johnson; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] temp file help


Instead of:
header("Content-disposition: filename=backup.csv");
try
header('Content-Disposition: attachment; filename=backup.csv');

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Last 10 rows

2001-04-17 Thread Randy Johnson

How do I get the last 10 rows in a table?

thanks

randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] TEmp File

2001-03-29 Thread Randy Johnson

Here is the scenario:

I want to let my users download their history of transactions from a mysql
database.  I have that part working...they click a link a csv file is
created for them to download.  now here is my question.

Is there a way to have the file delete after they have downloaded it?  Also
is there a way to have the file download as filename.csv but have the
actually file that is create named a random name of numbers and letters
i.e. 2s3d4f5g6h.csv

My concern is to have the file be deleted after download and/or make it so
no other users could guess the url and download someone else's history.

Any Advice is much appreciated.

thanks

randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] scrolling text box

2001-03-28 Thread Randy Johnson

in php how would I ready line by line from a scrolling text box


here are the values I would have in the scrolling text box


a,1
b,2
c,3


After the user hits the submit  button on the form how can I get php to read
the data line by line sort of like it was reading it line by line from a
file.


thanks

randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] random letters and numbers

2001-03-24 Thread Randy Johnson

Is there an easy way to create random numbers and letters for a file example


http://www.mydomain.com/1w2e3rff.txt  

and then after they download it have it be deleted off the server?


thanks

randy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Explode

2001-03-23 Thread Randy Johnson

How would I use to explode to extract the following

"name address city state zip"

I want to break that up and then do this



if (empty($name))

if (empty($address)



thanks


randy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Crypt problem

2001-03-22 Thread Randy Johnson

hello

I use crypt to crypt member's passwords and use the following verify


"$stored_password" is the encrypted, stored password.

"$password" is the plain text password you just got from the form.

## Check the passwords
$encrypted_password = crypt($password,$stored_password);

if ($encrypted_password = $stored_password) { $logged_in = 1; };


the problem I am having is that it is only comparing the first 8 characters
of the password

so if my password was randyrandy

i could get in with randyran

How do I fix this

the crypt password is stored in the database with enough room to store the
password so it isn't cutting it off when inserting to the database.

thanks

randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] security

2001-03-22 Thread Randy Johnson

In PHP how do I make it so a script cannot be called from somewhere else
other than from my server.

Example

http://domain.com/mail.php   is my mail script that is called by
http://domain.com/signup.html

How do I make it so

http://somebodyelsesdomain.com/signup.html cannot call the mail.php script.


thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Frames

2001-03-16 Thread Randy Johnson

is there a way in php if a page is supposed to be in frames and the user
tries to view it outside of the frame it automatically reloads the page into
the frame.

thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Frames

2001-03-16 Thread Randy Johnson

is there a way in php if a page is supposed to be in frames and the user
tries to view it outside of the frame it automatically reloads the page into
the frame.

thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] how fast is php

2001-03-15 Thread Randy Johnson

I have a question.  can a 1 php script access a mysql database more than 10
times a second  it's a simple updated statement?   if it can how many
times do you think it can access the database in a second?

thanks randy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Sessions

2001-03-09 Thread Randy Johnson

Is there a way to have a session end if they leave my site and go to
another?

thanks

randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Sessions Kill all

2001-03-08 Thread Randy Johnson

Does anybody know where I could get more info on storing session data in a
database rather than the default way?

thanks

randy

-Original Message-
From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 12:58 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Sessions Kill all


On Thursday 08 March 2001 03:45, you wrote:
 Is there a way as a server admin to kill all sessions to a site.  I
 need a way to logout all members to a site.

Well, usually you'd keep the session data in a database, so you can just
empty the sessioninfo table.

--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

...1000100011010101101010110100111010113...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Page not found error

2001-03-04 Thread Randy Johnson

if I leave my browser on a php and then I click a link after lets say 5 or
10 minutes that links to another php page it says page not found even though
the page is there.  has anybody else experienced this error?


thanks

randy

-Original Message-
From: Randy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 03, 2001 11:44 AM
To: Ernest E Vogelsinger; Randy Johnson
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Converting String to Variable


it may look weird but that is the way it needs to be done. here is a better
example

$str=myfunct()  this returns monday

then i want the monday to turn into this

$monday

so i can do this

$monday="BlaH";

thanks

randy

-Original Message-
From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 03, 2001 11:35 AM
To: Randy Johnson
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Converting String to Variable


At 17:09 03.03.2001, Randy Johnson said:
[snip]
Is there anyway to convert a string to a variable

example

$str="monday";

I would like to then do this:

$monday="blah";
[snip]

RTFM ;-

$$str = "blah";
print $monday;



 ...ebird

   O Ernest E. Vogelsinger
   (\)http://www.1-at-web.at/
^ ICQ#   13394035



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Converting String to Variable

2001-03-03 Thread Randy Johnson

Is there anyway to convert a string to a variable

example

$str="monday"; 

I would like to then do this:

$monday="blah";

thanks

randy





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Converting String to Variable

2001-03-03 Thread Randy Johnson

it may look weird but that is the way it needs to be done. here is a better
example

$str=myfunct()  this returns monday

then i want the monday to turn into this

$monday

so i can do this

$monday="BlaH";

thanks

randy

-Original Message-
From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 03, 2001 11:35 AM
To: Randy Johnson
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Converting String to Variable


At 17:09 03.03.2001, Randy Johnson said:
[snip]
Is there anyway to convert a string to a variable

example

$str="monday";

I would like to then do this:

$monday="blah";
[snip]

RTFM ;-

$$str = "blah";
print $monday;



 ...ebird

   O Ernest E. Vogelsinger
   (\)http://www.1-at-web.at/
^ ICQ#   13394035



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] offshore Dedicated Hosting

2001-02-22 Thread Randy Johnson

Anybody know of an offshore dedicated web server hosting companies?

randy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Paging results

2001-02-14 Thread Randy Johnson

Can somebody give me a url of an example  or an example of how to page
results so they can be view by clicking page 1  page 2   or back and next?

results obtained from mysql database.

Thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Stringing sql queries?

2001-02-03 Thread Randy Johnson

What about an insert or an update instead of a select?

thanks

randy

-Original Message-
From: Thomas Weber [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 03, 2001 8:37 PM
To: Sandeep Hundal
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Stringing sql queries?


Yep, try this:

SELECT a.col1, a.col2, b.col3, c.col4 FROM table1 a, table2 b, table3 c

This should give you an array [col1,col2,col3,col4]


Thomas Weber
---
EMail: [EMAIL PROTECTED]
Homepage: http://www.youngarts.org / http://www.visions-of-future.de

- Original Message - 
From: "Sandeep Hundal" [EMAIL PROTECTED]
To: "PHP General" [EMAIL PROTECTED]
Sent: Sunday, February 04, 2001 1:44 AM
Subject: [PHP] Stringing sql queries?


 All,
 can I string 2 sql queries one after the other? 
 like "select * from $table; select * from $table2;" ???
 
 If I can, does that mean if I use mysql_fetch_array then it'll
 convert results from both queries into variables?
 
 TIA
 
 
 __
 Get personalized email addresses from Yahoo! Mail - only $35 
 a year!  http://personal.mail.yahoo.com/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Unique Session Question

2001-01-20 Thread Randy Johnson

Hello,

I plan to use session variables to identify if a user is logged in...   I
know there is an option to set the life of the session but I am looking for
a way to end the session five minutes after they have did there last
"transaction" with my site...

I don't want people that are actively using my site to be logged out after 5
minutes just the folks that are sitting idle...


Any ideas,


Thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] date

2001-01-20 Thread Randy Johnson

I am wondering if it would be more efficient to store the integer value that
the php function time() returns when a transaction is inserted into the
database and then when querying the database to get certain transactions
just use basic math functions to get the certain transactions.

For example in I wanted to get all the transactions from the last 31 days

lets say there was 980026719 seconds since 1970 and the number of seconds
from the last 31 days is 2678400


select from   table where time_of_trans (980026719-2678400)



I know that the syntax isn't correct, I am just curious if this would be the
most efficient way to do this?

thanks

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] RE: Ethics question...

2001-01-18 Thread Randy Johnson

is there any benchmarks or proof that I should host a high traffic site on a
FREEBSD/APACHE instead of a redhat Linux/Apache server?

randy

-Original Message-
From: Ayan R. Kayal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 1:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] RE: Ethics question...


Before Microsoft bought it, Hotmail had a FreeBSD/Apache frontend and a
Sun/Solaris backend. Supposedly, corporate wanted MS to move Hotmail to NT,
but supposedly it failed so miserably at serving up 10 million users that
they had to nix those plans. I think Hotmail is running FreeBSD/Apache for
the most part, but 5-10% of the servers are Win2K...
As for Linux, from what I've heard (haven't tested this out myself or
anything), FreeBSD and Sun/Solaris are quite a bit more efficient for web
servers. Linux just can't take the number of hits that the other two can.
Linux is okay for development, but personally I'd rather run the same system
on my development machines as I do for my live machines...

O- ~ARK
CFO, Hmedicine.com, Inc.
I hope it feels so good to be right. There's nothing more exhilarating than
pointing out the shortcomings of others, is there?... ~Randal from "Clerks"

 -Original Message-
 From: jeremy brand [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 18, 2001 10:22 AM
 To: CC Zona
 Subject: Re: [PHP] Ethics question...

Why would Microsoft be using Solaris, or Linux even?
 (hint, the same
reason -- their stuff works less good).

 Www.microsoft.com used to be served off of Solaris (where else could
 you run a high performance installation of Oracle? ;).  Hotmail was
 (is) FreeBSD.  Anyone would be stupid to not be using linux in their
 interprise somewhere.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Sessions

2001-01-12 Thread Randy Johnson

Hello,

I was going to use sessions to save a logged in variable so if the user
logged in with a username and password I checked for the session variable
and if it existed then I could continue.

Is there a way for the loggedin session variable to automatically be
destroyed after 5 minutes for example?  If not what would be another way I
could implement the above.


thanks,

Randy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]