[PHP] how to know upload progress status

2002-07-10 Thread S.

Hello,
I'm beginning to use PHP, maybe my question is very simple...
Anyway, I want permit users to upload files using a form, and I would show 
them the upload progress status...
I don't know how to extract informations about upload progress status and how 
to show informations to users. For example I want the users can see 30% of 
upload completed, or the MByte just uploaded.


I had some difficulties to write to the list, so I send the mail (with some 
modifies in the address) several times;
I apologyze if many mails are sended to the list.



Thanks for help...!
S.





In th file "fileupload.php" I call a function named "uploadfile" as shown in 
the follow code:
 





uploadfile($g_dir_corrente);





if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name']))
{
$nomefile=$HTTP_POST_FILES['userfile']['name'];





if(($nomefile!=".htaccess")&&($nomefile!=".ftpaccess")&&($nomefile!=".quota"))
{  
copy($HTTP_POST_FILES['userfile']['tmp_name'],"$g_dir_corrente/$nomefile");
messaggio(12); // show a message to users
echo "";
}
else
{
messaggio(13); // show a message to users
}
}





**





function uploadfile($g_dir_corrente)
{
$Upload_file=messaggioX(11); // show a message to users 
echo
"


$Upload_file 


";
}



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




[PHP] Session, performance, timeout

2002-07-10 Thread Fredrik Nygren

I use PHP sessions for my sites. The session_set_save_handler() is set to 
"Files". I would like to increase the gc_maxlifetime to get longer 
sessions. Today my sites generate about 1500-2000 simultaneous sessions. 
The number of sessions will probably grow if I increase the gc_maxlifetime. 
My question is: how does increased sessions affect the performance?

Best regards
Fredrik Nygren

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




Re: [PHP] Table Making

2002-07-10 Thread Tyler Longren

I'm not sure if you can do that because you have to go row by row when
writing html, not column by column.  I could be mistaken though.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Wed, 10 Jul 2002 22:34:15 -0800
"Jason Soza" <[EMAIL PROTECTED]> wrote:

> Thanks for the code improvement, but that will still print results
> from left to right, top to bottom, i.e. the items ascend left to right
> in the rows. I'm not concerned with the actual order that they come
> out of MySQL in, just how they're displayed.
> 
> Basically, instead of this:
> 1  2  3  4  5
> 6  7  8  9  10
> 11  12  13  14  15
> 
> I want this:
> 1  6  11
> 2  7  12
> 3  8  13
> 4  9  14
> 5  10  15
> 
> Thanks again for the help, though.
> 
> Jason Soza
> 
> -Original Message-
> From: Analysis & Solutions [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 10, 2002 10:13 PM
> To: PHP List
> Subject: Re: [PHP] Table Making
> 
> 
> Jason:
> 
> On Wed, Jul 10, 2002 at 10:04:45PM -0800, Jason Soza wrote:
> >
> > I have this nice piece of code to take my SQL result and organize it
> > into
> a
> > nice 5 column table:
> 
> Nice is in the eye of the beholder...  Here's what I think is nice:
> 
>   echo "\n";
>   echo " \n";
> 
>   while ($row = mysql_fetch_array($sql, MYSQL_ASSOC)) {
>  echo '  ' . $row['grad_year'] .
>  "\n";
>   }
> 
>   echo " \n";
>   echo "\n\n";
> 
> If you want to reverse the order, use an ORDER BY clause in your query
> string.
> 
> --Dan
> 
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> 
> 
> -- 
> 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] php4apache.dll...

2002-07-10 Thread Tyler Longren

Use this file instead:
php4apache2.dll

It's supposedly in the sapi directory.  Did you search the internet for
this subject before you posted?  If not, you should have.  There's lots
of info on this "missing" file.  if you can't find a working version
anywhere, mail the php-dev mailing list, they can probably help you out
more.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Thu, 11 Jul 2002 16:22:27 +1000
"Peter" <[EMAIL PROTECTED]> wrote:

> Howdy
> 
> can any one remember where to get the apache2 ver of php4apache.dll?
> 
> Cheers 
> 
> Peter 
> "the only dumb question is the one that wasn't asked" 
>  

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




RE: [PHP] Table Making

2002-07-10 Thread Jason Soza

Thanks for the code improvement, but that will still print results from left
to right, top to bottom, i.e. the items ascend left to right in the rows.
I'm not concerned with the actual order that they come out of MySQL in, just
how they're displayed.

Basically, instead of this:
1  2  3  4  5
6  7  8  9  10
11  12  13  14  15

I want this:
1  6  11
2  7  12
3  8  13
4  9  14
5  10  15

Thanks again for the help, though.

Jason Soza

-Original Message-
From: Analysis & Solutions [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 10:13 PM
To: PHP List
Subject: Re: [PHP] Table Making


Jason:

On Wed, Jul 10, 2002 at 10:04:45PM -0800, Jason Soza wrote:
>
> I have this nice piece of code to take my SQL result and organize it into
a
> nice 5 column table:

Nice is in the eye of the beholder...  Here's what I think is nice:

  echo "\n";
  echo " \n";

  while ($row = mysql_fetch_array($sql, MYSQL_ASSOC)) {
 echo '  ' . $row['grad_year'] . "\n";
  }

  echo " \n";
  echo "\n\n";

If you want to reverse the order, use an ORDER BY clause in your query
string.

--Dan

--
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409


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




RE: [PHP] Table Making

2002-07-10 Thread Martin Towell

This is the logic I would use

count number of results
table rows = num results / 5(maybe floor() or ceil() it)
read results into a 2D array
  fill column 1 first
  when column 1 fills up, reset row count to 0 and inc. col count
whizz through your array and display the table as needed

HTH
Martin

-Original Message-
From: Jason Soza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 4:05 PM
To: PHP-General Mailing List
Subject: [PHP] Table Making


I'm driving myself crazy trying to visualize what I want to do, so I thought
I'd share the insanity and hope for some advice.

I have this nice piece of code to take my SQL result and organize it into a
nice 5 column table:

print "\n"; //start table

$i=0;   //define variable - avoid errors
$grad_year="";  //define variable - avoid errors

while ($row = mysql_fetch_array($sql)) {
extract($row);
$i++;

if($i=="1") {
print "\n"; //start table row on $i = 1
}

printf("%s\n", $grad_year, $grad_year);
//print links

if ($i=="5") {
print "\n"; //end table row on $i = 5 to get 5
columns
$i=0; //reset $i
}

$grad_year=""; //clear $grad_year

}

if ($i<5) print "\n"; //end any rows with less than 5 columns

print "\n"; //end table
---END

Now, this works great for most things - it takes my SQL results and puts
them in a table sequentially, from left to right, top to bottom. So in this
case, the top-left cell displays "1941", the top-right cell displays "1945",
the next row starts with "1946" on the left and goes to "1950" on the right,
and so on.

What I want is rather than sorting left to right, top to bottom, I want to
sort top to bottom, left to right. So the top-left would still be "1941",
but rather than increasing to the right, it would increase down, then
continue at the top of the next column.

I'm thinking this might be an easy thing to do with some creative use of $i
and print, but I just can't think it out. I'm guessing $i would be used to
limit the amount of items in a column... But, I'm in need of some guidance
to get it right. I can't even begin to think where to start. Any help would
be great - thanks!

Jason Soza


-- 
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] php4apache.dll...

2002-07-10 Thread Peter

Howdy

can any one remember where to get the apache2 ver of php4apache.dll?

Cheers 

Peter 
"the only dumb question is the one that wasn't asked" 
 


Re: [PHP] Table Making

2002-07-10 Thread Analysis & Solutions

Jason:

On Wed, Jul 10, 2002 at 10:04:45PM -0800, Jason Soza wrote:
> 
> I have this nice piece of code to take my SQL result and organize it into a
> nice 5 column table:

Nice is in the eye of the beholder...  Here's what I think is nice:

  echo "\n";
  echo " \n";

  while ($row = mysql_fetch_array($sql, MYSQL_ASSOC)) {
 echo '  ' . $row['grad_year'] . "\n";
  }

  echo " \n";
  echo "\n\n";

If you want to reverse the order, use an ORDER BY clause in your query 
string.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] Table Making

2002-07-10 Thread Jason Soza

I'm driving myself crazy trying to visualize what I want to do, so I thought
I'd share the insanity and hope for some advice.

I have this nice piece of code to take my SQL result and organize it into a
nice 5 column table:

print "\n"; //start table

$i=0;   //define variable - avoid errors
$grad_year="";  //define variable - avoid errors

while ($row = mysql_fetch_array($sql)) {
extract($row);
$i++;

if($i=="1") {
print "\n"; //start table row on $i = 1
}

printf("%s\n", $grad_year, $grad_year);
//print links

if ($i=="5") {
print "\n"; //end table row on $i = 5 to get 5 columns
$i=0; //reset $i
}

$grad_year=""; //clear $grad_year

}

if ($i<5) print "\n"; //end any rows with less than 5 columns

print "\n"; //end table
---END

Now, this works great for most things - it takes my SQL results and puts
them in a table sequentially, from left to right, top to bottom. So in this
case, the top-left cell displays "1941", the top-right cell displays "1945",
the next row starts with "1946" on the left and goes to "1950" on the right,
and so on.

What I want is rather than sorting left to right, top to bottom, I want to
sort top to bottom, left to right. So the top-left would still be "1941",
but rather than increasing to the right, it would increase down, then
continue at the top of the next column.

I'm thinking this might be an easy thing to do with some creative use of $i
and print, but I just can't think it out. I'm guessing $i would be used to
limit the amount of items in a column... But, I'm in need of some guidance
to get it right. I can't even begin to think where to start. Any help would
be great - thanks!

Jason Soza


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




Re: [PHP] rh 7.3

2002-07-10 Thread Yamin Prabudy

Thanks guysit's work now.

On Wednesday 10 July 2002 04:39 pm, Chris Hewitt wrote:
> Yamin,
>
> You probably chose not to install bison or flex when you installed
> RedHat. They are on your CDs.
>
> HTH
> Chris
>
> Yamin Prabudy wrote:
> >Hi guys,... In configure PHP 4.2.1 on RedHat 7.3 I found this problem
> >checking for ranlib... ranlib
> >checking whether ln -s works... yes
> >checking for gawk... (cached) gawk
> >checking for bison... no
> >checking for byacc... no
> >configure: warning: You will need bison if you want to regenerate the PHP
> >parsers.
> >checking for flex... lex
> >checking for yywrap in -ll... no
> >checking lex output file root... ./configure: lex: command not found
> >configure: error: cannot find output from lex; giving up
> >[yamin@dusak php-4.2.1]$
> >
> >what's wrong with it ???
> >
> >thanks in advance
> >
> >Yamin


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




Re: [PHP] Editing files by line

2002-07-10 Thread Analysis & Solutions

On Thu, Jul 11, 2002 at 02:11:30PM +1000, Martin Towell wrote:
>> From: Chris Earle [mailto:[EMAIL PROTECTED]]
>> 
>> I was wondering if there was a function that would allow me to "jump" 
>> to a certain line if a file and then write from there?  I'm searching 
>> php.net without any luck :(.
>
> I dodn't know of any single function that does what you want, but you can do
> this:
> 
> $contents = file($filename);  // each line has it's own array position
> $contents[$line] = $newline;

That's nice, except you could start overwriting existing data.

If you're only interested in appending to the end of a file, then use 
   $fp = fopen('filename', 'a+');
and fputs() all you want.

But, if you want to stick stuff into the middle...

   #  Real process uses file(),
   #  but for test, set Content manually.
   $Content[] = 'The start of the content array.';
   $Content[] = 'Some more stuff.';
   $Content[] = 'And yet more stuff.';

   $Location = array_search('Some more stuff.', $Content);

   $New[] = 'Why, here is some new stuff';

   $Final = array_merge(
  array_slice($Content, 0, $Location + 1),
  $New,
  array_slice($Content, 0 - (count($Content) - $Location - 1))
   );   

   #  In your process, you'll really want to insert
   #  implode('', $Final)  into the file with fputs(),
   #  but, hey, this is a demonstration.
   print_r($Final);


--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] need help about this

2002-07-10 Thread Anas Mughal


 How are you getting this error?
Are you trying to create the table?
 
  [EMAIL PROTECTED] wrote: MySQL Error : Database Error
Error Number: 1050 Table 'book_auth' already exists

what this meant?
what should i do for correct this
thaank you for your help

sincerly your
-- tjandra


==
This email is confidential and may also be privileged.
If you are not the intended recipient, please notify me immediately and
delete the original message. You should not copy or use it for any
other purpose, nor disclose its
contents to any other person. Thank you.




-
Do You Yahoo!?
New! SBC Yahoo! Dial - 1st Month Free & unlimited access


RE: [PHP] need help about this

2002-07-10 Thread Sachin Keshavan

You are creating a table which already exists. The easy way to get out of
this, is either create a table with a different name or drop the existing
table and re-create it.

Cheers,
Sachin.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 12:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] need help about this
Importance: High


MySQL Error : Database Error
Error Number: 1050 Table 'book_auth' already exists
  
what this meant?
what should i do for correct this
thaank you for your help

sincerly your
-- tjandra


==
This email is confidential and may also be privileged.
If you are not the intended recipient, please notify me immediately and
delete the original message.  You should not copy or use it for any
other purpose, nor disclose its
contents to any other person.  Thank you.


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




Re: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread Philip Olson


PHP tries very hard to remain BC, in fact, some 
will say too hard :)  The register_globals change 
was the biggest change in PHP history, can't 
think of any other change that comes close.  And, 
that only changed the default value for this 
directive, you can turn it on if you wish.

The PHP 4 book that you have has a typo, there 
simply is no php_info().

Regards,
Philip Olson


On Wed, 10 Jul 2002, George Hester wrote:

> Thanks that worked just fine.  But now I am irritated as hell.  Obviously there
> is no backwards compatibility with new releases.  Does this mean if I install a
> new version of PHP then all books published before that date are worthless?
> Seems so.
> 
> For example in a book discussing PHP 3 it says:
> 
>  phpinfo();
> ?>
> 
> This works just fine.  In a book that discusses PHP 4 it says:
> 
>  php_info()
> ?>
> 
> This gives "Fatal error: Call to undefined function: php_info() in
> c:\inetpub\wwwroot\php\phpinfo.php on line 2."
> 
> So it's not just backwards compatibility it is careless planning.  This is not
> good.  I will have to search hi and lo to determine if a failure is due to
> incorrect syntax because of version and not just careless typing on my part.
> 
> I remember when FORTRAN was being developed we were assurred that all previous
> commands from older versions would continue operative in the new.  FORTRAN 77
> to FORTRAN 90.  I think the developers of PHP ought to consider why the
> developers of FORTRAN thought that might be a good thing to do.  It is still
> used to this day.  Write a FORTRAN 77 prog and it will compile and run on a
> FORTRAN 90 compiler out of the box.  Thanks again.
> 
> --
> George Hester
> _
> "Justin French" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Try:
> >
> > 
> >
> > ... you might have a newer version of PHP (4.1+), which uses the global
> > arrays like:
> >
> > $_SERVER
> > $_POST
> > $_GET
> > $_SESSION
> > $_COOKIE
> >
> > ...
> >
> >
> > Justin French
> >
> >
> >
> >
> > on 11/07/02 12:32 PM, George Hester ([EMAIL PROTECTED]) wrote:
> >
> > > I have this in my web site not in an executable folder:
> > >
> > > 
> > > 
> > > My First PHP Program
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > No problem.  I then put this in the same folder:
> > >
> > > 
> > > 
> > > My Second PHP Program
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > Nothing appears.  What's wrong?
> > >
> > >
> > > --
> > > George Hester
> > > _
> > >
> > >
> >
> 
> 
> 
> -- 
> 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] Breaking Dynamic Content into Pages...

2002-07-10 Thread Monty

I'm trying to determine the best way to break dynamic content into pages
before flowing into a template (with "1|2|3" type paging icons at the bottom
of the page). I considered using a user-defined type code like "[pagebreak]"
that would allow content contributors to determine the page breaks
themselves when entering the article into the database. A parsing function
would grab the chunk of text/html between the appropriate [pagebreak] codes
for each page.

But this just doesn't seem a very elegant solution. Anyone know of a better
way to do this? 

Thanks!

Monty


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




Re: [PHP] need help about this

2002-07-10 Thread Tyler Longren

"Table 'book_auth' already exists" means that you're trying to create
the 'book_auth' table again, even though it already exists.  Remove the
old 'book_auth' table to create the new one.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Thu, 11 Jul 2002 13:51:43 +0700
[EMAIL PROTECTED] wrote:

> MySQL Error : Database Error
> Error Number: 1050 Table 'book_auth' already exists
>   ---
>   -
> what this meant?
> what should i do for correct this
> thaank you for your help
> 
> sincerly your
> -- tjandra
> 
> 
> ==
> This email is confidential and may also be privileged.
> If you are not the intended recipient, please notify me immediately
> and delete the original message.  You should not copy or use it for
> any other purpose, nor disclose its
> contents to any other person.  Thank you.
> 
> 

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




[PHP] Re: sendmail_path help

2002-07-10 Thread Chris Earle

Can you just use the built-in mail function?

mail("[EMAIL PROTECTED]", "Errors", $ObjectGET->EMAIL, // doesn't have to
be an object
"From: [EMAIL PROTECTED]\n"
   ."Reply-To: [EMAIL PROTECTED]\n"
   ."X-Mailer: PHP/" . phpversion());

"Ricky Dhatt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've been trying to tweak my sendmail_path to work with some batch emails
I
> have to sent out[1].   What'd like to do is set within a virtual site in
> httpd.conf:
>
> php_admin_value sendmail_path =
> "/usr/sbin/sendmail -t -oQ/var/spool/mqueue_batch -ODeliveryMode=q"
>
> Problem is when I do this, my emails go in to oblivion.  I've tried other
> paths/options like "/usr/sbin/sendmail -oi -t -odq" and it works just
fine.
> I've tested my path in a perl script so I'm sure it's correct; I'm sure my
> permissions are correct...any ideas?
>
>
> --Ricky
>
> [1] It's not spam.  Honest!
>
>



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




RE: [PHP] need help about this

2002-07-10 Thread Peter

means the table ur trying to create already is there... if u don't want to keep the 
table do a DROP tablaename in mysql or if not  then change the name of the table you 
are trying to create

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 11 July 2002 4:52 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] need help about this
> Importance: High
> 
> 
> MySQL Error : Database Error
> Error Number: 1050 Table 'book_auth' already exists
>   
> what this meant?
> what should i do for correct this
> thaank you for your help
> 
> sincerly your
> -- tjandra
> 
> 
> ==
> This email is confidential and may also be privileged.
> If you are not the intended recipient, please notify me immediately and
> delete the original message.  You should not copy or use it for any
> other purpose, nor disclose its
> contents to any other person.  Thank you.
> 
> 


Re: [PHP] sort problem

2002-07-10 Thread Analysis & Solutions

Please post the relevant table and field names.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] need help about this

2002-07-10 Thread aromania

MySQL Error : Database Error
Error Number: 1050 Table 'book_auth' already exists
  
what this meant?
what should i do for correct this
thaank you for your help

sincerly your
-- tjandra


==
This email is confidential and may also be privileged.
If you are not the intended recipient, please notify me immediately and
delete the original message.  You should not copy or use it for any
other purpose, nor disclose its
contents to any other person.  Thank you.




Re: [PHP] Date formatting

2002-07-10 Thread Analysis & Solutions

On Wed, Jul 10, 2002 at 12:25:08PM -0500, Rw wrote:
> 
> "01-02-2003"
> 
> Is there a handy function to convert that to other ways of expressing the
> date such as:
> 
> "01/02/03"

$temp = preg_replace('/^(\d{2})-(\d{2})-(\d{2})(\d{2})$/', '\\1/\\2/\\4',
  $date);


> "2003-01-02"

$temp = preg_replace('/^(\d{2})-(\d{2})-(\d{4})$/', '\\3/\\1/\\2',
  $date);

It's also a good idea to do a test to make sure the initial date is in the 
format you expect it to be:

if ($temp == $date) {
   echo 'WAIT a second...  Your initial date was bad.';
}

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Appending to a file

2002-07-10 Thread Chris Earle

Thanks again for this response.  The computer is a Win2k server.


Thanks for the tips. :)

"Martin Towell" <[EMAIL PROTECTED]> wrote in message
6416776FCC55D511BC4E0090274EFEF508A5FE@EXCHANGE">news:6416776FCC55D511BC4E0090274EFEF508A5FE@EXCHANGE...
> or use the unix command "wc"
>
> $num_lines = `wc -l $file`;
>
> Martin
>
> -Original Message-
> From: Analysis & Solutions [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 2:13 PM
> To: PHP List
> Subject: Re: [PHP] Appending to a file
>
>
> On Wed, Jul 10, 2002 at 12:45:01PM -0400, Chris Earle wrote:
> > I'm just curious if there's a function that allows you to see how many
> lines
> > there are in a file.
>
> I don't recall there being one.  Simple way:
>
>$Array = file('file.name');
>echo count($Array);
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
>
> --
> 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] Editing files by line

2002-07-10 Thread Chris Earle

That's what I was talking about :).  I wish there was something built in
that would just let me append a file where I want, that would make things a
little easier.  Oh well, thanks a lot for the help that makes sense (and I
think it works).

"Martin Towell" <[EMAIL PROTECTED]> wrote in message
6416776FCC55D511BC4E0090274EFEF508A5FD@EXCHANGE">news:6416776FCC55D511BC4E0090274EFEF508A5FD@EXCHANGE...
> I dodn't know of any single function that does what you want, but you can
do
> this:
>
> $contents = file($filename);  // each line has it's own array position
> $contents[$line] = $newline;
> $content = implode("\n", $contents);
> $f = fopen($filename, "w");
> fputs($f, $content);
> fclose($f);
>
>
> (not tested, but should work as is) some error checking would also be
> good :)
>
> -Original Message-
> From: Chris Earle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 2:10 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Editing files by line
>
>
> I was wondering if there was a function that would allow me to "jump" to a
> certain line if a file and then write from there?  I'm searching php.net
> without any luck :(.
>
> Also, if there is not specific function, is there a trick that gives the
> same effect (without reading the entire file line by line, then writing to
> it where I need to, then replacing the file)?
>
> Thanks in advance (hopefully :)).
>
>
>
> --
> 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] Automatic Form creation

2002-07-10 Thread Analysis & Solutions

On Wed, Jul 10, 2002 at 11:14:51AM -0600, CM wrote:
> Are there any php scripts or classes that do Automatic Form Creation?  If it
> worked from a MySQL datbase that would be a plus.

Check out my SQL Solution class:  http://www.sqlsolution.info/

Makes it really easy to generate dynamic form elements (among other
things) from a MySQL or ODBC database.  It'll even select/check default
elements for you or your users specify.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Development Tools

2002-07-10 Thread Chris Earle

I too am using a plain old text editor for PHP (Notepad), but I did enjoy
the environment of Interdev for ASP...

I think by far the best feature most development tools have to offer is the
syntax highlighting, I like seeing comments in green/grey, with the plain
text and vars in black, and a lot of the other syntax in red (with other
colors for some things obviously).  All in all, it's just the way it makes
my code look that makes me like them a little bit more than normal text
editors.  I don't use the tools in any of those to create my pages, I code
everything myself (I like to code things, including the forms ... even if
they do get annoying sometimes).

Oh ya, in most development toolsets when you start typing functions and
stuff it will bring up a little drop down box (without stopping you from
going on typing) with functions and variables starting with what you're
typing.  It's just nice.

"Uwe Birkenhain" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I think that - on windows - nothing is better than textpad
> (www.textpad.com).
> Simply the best editor the world has seen so far!
>
> What makes development tools better than a good editor? (serious question)
>
> Uwe
>
>



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




RE: [PHP] Appending to a file

2002-07-10 Thread Martin Towell

or use the unix command "wc"

$num_lines = `wc -l $file`;

Martin

-Original Message-
From: Analysis & Solutions [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 2:13 PM
To: PHP List
Subject: Re: [PHP] Appending to a file


On Wed, Jul 10, 2002 at 12:45:01PM -0400, Chris Earle wrote:
> I'm just curious if there's a function that allows you to see how many
lines
> there are in a file.

I don't recall there being one.  Simple way:

   $Array = file('file.name');
   echo count($Array);

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
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] Editing files by line

2002-07-10 Thread Martin Towell

I dodn't know of any single function that does what you want, but you can do
this:

$contents = file($filename);  // each line has it's own array position
$contents[$line] = $newline;
$content = implode("\n", $contents);
$f = fopen($filename, "w");
fputs($f, $content);
fclose($f);


(not tested, but should work as is) some error checking would also be
good :)

-Original Message-
From: Chris Earle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Editing files by line


I was wondering if there was a function that would allow me to "jump" to a
certain line if a file and then write from there?  I'm searching php.net
without any luck :(.

Also, if there is not specific function, is there a trick that gives the
same effect (without reading the entire file line by line, then writing to
it where I need to, then replacing the file)?

Thanks in advance (hopefully :)).



-- 
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] Appending to a file

2002-07-10 Thread Analysis & Solutions

On Wed, Jul 10, 2002 at 12:45:01PM -0400, Chris Earle wrote:
> I'm just curious if there's a function that allows you to see how many lines
> there are in a file.

I don't recall there being one.  Simple way:

   $Array = file('file.name');
   echo count($Array);

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] Editing files by line

2002-07-10 Thread Chris Earle

I was wondering if there was a function that would allow me to "jump" to a
certain line if a file and then write from there?  I'm searching php.net
without any luck :(.

Also, if there is not specific function, is there a trick that gives the
same effect (without reading the entire file line by line, then writing to
it where I need to, then replacing the file)?

Thanks in advance (hopefully :)).



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




RE: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread Martin Towell

I use  in both php3 and php4 and it works fine.

All the commands that I have used are all forward compatible. I even have
some php2 code that still works in php4!

Martin

-Original Message-
From: George Hester [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 1:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] HTTP_USER_AGENT?


Thanks that worked just fine.  But now I am irritated as hell.  Obviously
there
is no backwards compatibility with new releases.  Does this mean if I
install a
new version of PHP then all books published before that date are worthless?
Seems so.

For example in a book discussing PHP 3 it says:



This works just fine.  In a book that discusses PHP 4 it says:



This gives "Fatal error: Call to undefined function: php_info() in
c:\inetpub\wwwroot\php\phpinfo.php on line 2."

So it's not just backwards compatibility it is careless planning.  This is
not
good.  I will have to search hi and lo to determine if a failure is due to
incorrect syntax because of version and not just careless typing on my part.

I remember when FORTRAN was being developed we were assurred that all
previous
commands from older versions would continue operative in the new.  FORTRAN
77
to FORTRAN 90.  I think the developers of PHP ought to consider why the
developers of FORTRAN thought that might be a good thing to do.  It is still
used to this day.  Write a FORTRAN 77 prog and it will compile and run on a
FORTRAN 90 compiler out of the box.  Thanks again.

--
George Hester
_
"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Try:
>
> 
>
> ... you might have a newer version of PHP (4.1+), which uses the global
> arrays like:
>
> $_SERVER
> $_POST
> $_GET
> $_SESSION
> $_COOKIE
>
> ...
>
>
> Justin French
>
>
>
>
> on 11/07/02 12:32 PM, George Hester ([EMAIL PROTECTED]) wrote:
>
> > I have this in my web site not in an executable folder:
> >
> > 
> > 
> > My First PHP Program
> > 
> > 
> > 
> > 
> > 
> >
> > No problem.  I then put this in the same folder:
> >
> > 
> > 
> > My Second PHP Program
> > 
> > 
> > 
> > 
> > 
> >
> > Nothing appears.  What's wrong?
> >
> >
> > --
> > George Hester
> > _
> >
> >
>



-- 
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] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee

> Run the command manually at a shell prompt.  What happens?  Here's what
> happens for me on WinNT.  In an error condition, say my password is
> invalid, it retuns the error message then a blank line and then I'm back
> at the prompt.  So, if system() is true to the manual, that blank line is
> the last line, so it's the one that gets put into the variable.
>

My bad, it is a blank line after the error message on my system too.
I missed the blank line last time, I need some glasses. Thanks.





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




Re: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread George Hester

Thanks that worked just fine.  But now I am irritated as hell.  Obviously there
is no backwards compatibility with new releases.  Does this mean if I install a
new version of PHP then all books published before that date are worthless?
Seems so.

For example in a book discussing PHP 3 it says:



This works just fine.  In a book that discusses PHP 4 it says:



This gives "Fatal error: Call to undefined function: php_info() in
c:\inetpub\wwwroot\php\phpinfo.php on line 2."

So it's not just backwards compatibility it is careless planning.  This is not
good.  I will have to search hi and lo to determine if a failure is due to
incorrect syntax because of version and not just careless typing on my part.

I remember when FORTRAN was being developed we were assurred that all previous
commands from older versions would continue operative in the new.  FORTRAN 77
to FORTRAN 90.  I think the developers of PHP ought to consider why the
developers of FORTRAN thought that might be a good thing to do.  It is still
used to this day.  Write a FORTRAN 77 prog and it will compile and run on a
FORTRAN 90 compiler out of the box.  Thanks again.

--
George Hester
_
"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Try:
>
> 
>
> ... you might have a newer version of PHP (4.1+), which uses the global
> arrays like:
>
> $_SERVER
> $_POST
> $_GET
> $_SESSION
> $_COOKIE
>
> ...
>
>
> Justin French
>
>
>
>
> on 11/07/02 12:32 PM, George Hester ([EMAIL PROTECTED]) wrote:
>
> > I have this in my web site not in an executable folder:
> >
> > 
> > 
> > My First PHP Program
> > 
> > 
> > 
> > 
> > 
> >
> > No problem.  I then put this in the same folder:
> >
> > 
> > 
> > My Second PHP Program
> > 
> > 
> > 
> > 
> > 
> >
> > Nothing appears.  What's wrong?
> >
> >
> > --
> > George Hester
> > _
> >
> >
>



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




Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Analysis & Solutions

On Wed, Jul 10, 2002 at 07:04:58PM -0700, Fargo Lee wrote:
> But if system() thinks it is a success because the command executed, even
> though MySQL returns an internal error on the command line, why is'nt the
> last line of the MySQL error message stored in the variable as the system()
> manual suggests it should be when system() thinks it is a success?

Run the command manually at a shell prompt.  What happens?  Here's what
happens for me on WinNT.  In an error condition, say my password is
invalid, it retuns the error message then a blank line and then I'm back
at the prompt.  So, if system() is true to the manual, that blank line is 
the last line, so it's the one that gets put into the variable.

Put the returned string through ord() and see what you get.  I'll bet it's
10, the ordinal number for a line break.  Hmm...  Maybe not...  Out of
curiosity, I tested it on my system and it came back as 0 (a null string,
but not a null variable).

--Dan

PS:  Please be kind enough to make the effort to appropriately trim the 
messages you're replying to.  Top posting is bad enough.

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




RE: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread Balaji Ankem

Yes..That is right!!! :-)

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 11, 2002 8:53 AM
To: Balaji Ankem
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] HTTP_USER_AGENT?


It works for you because you have register_globals set to "on" in
php.ini.  If you set it to "off" it won't work any longer.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Thu, 11 Jul 2002 08:07:48 +0530
"Balaji Ankem" <[EMAIL PROTECTED]> wrote:

> It is working fine for me!!!
> 
> 
> -Original Message-
> From: George Hester [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 8:03 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] HTTP_USER_AGENT?
> 
> 
> I have this in my web site not in an executable folder:
> 
> 
> 
> My First PHP Program
> 
> 
> 
> 
> 
> 
> No problem.  I then put this in the same folder:
> 
> 
> 
> My Second PHP Program
> 
> 
> 
> 
> 
> 
> Nothing appears.  What's wrong?
> 
> 
> --
> George Hester
> _
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 



**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***



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


Re: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread Tyler Longren

It works for you because you have register_globals set to "on" in
php.ini.  If you set it to "off" it won't work any longer.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Thu, 11 Jul 2002 08:07:48 +0530
"Balaji Ankem" <[EMAIL PROTECTED]> wrote:

> It is working fine for me!!!
> 
> 
> -Original Message-
> From: George Hester [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, July 11, 2002 8:03 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] HTTP_USER_AGENT?
> 
> 
> I have this in my web site not in an executable folder:
> 
> 
> 
> My First PHP Program
> 
> 
> 
> 
> 
> 
> No problem.  I then put this in the same folder:
> 
> 
> 
> My Second PHP Program
> 
> 
> 
> 
> 
> 
> Nothing appears.  What's wrong?
> 
> 
> --
> George Hester
> _
> 
> 
> 
> -- 
> 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] HTTP_USER_AGENT?

2002-07-10 Thread Chris Kay


Have you tried $_SERVER["HTTP_USER_AGENT"]

---
Chris Kay
Technical Support - Techex Communications 
Website: www.techex.com.au   Email: [EMAIL PROTECTED]
Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 
Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 
Platinum Channel Partner of the Year - Request DSL - Broadband for Business
---

> -Original Message-
> From: George Hester [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, 11 July 2002 1:18 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] HTTP_USER_AGENT?
> 
> 
> I wish I could say the same.  Thanks.
> 
> --
> George Hester
> _
> "Balaji Ankem" <[EMAIL PROTECTED]> wrote in message 
005901c22883$f22d5840$[EMAIL PROTECTED]">news:005901c22883$f22d5840$[EMAIL PROTECTED]...
> It is working fine for me!!!
>
>
> -Original Message-
> From: George Hester [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 8:03 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] HTTP_USER_AGENT?
>
>
> I have this in my web site not in an executable folder:
>
> 
> 
> My First PHP Program
> 
> 
> 
> 
> 
>
> No problem.  I then put this in the same folder:
>
> 
> 
> My Second PHP Program
> 
> 
> 
> 
> 
>
> Nothing appears.  What's wrong?
>
>
> --
> George Hester
> _
>
>
>
> --
> 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] sendmail_path help

2002-07-10 Thread Ricky Dhatt

I've been trying to tweak my sendmail_path to work with some batch emails I
have to sent out[1].   What'd like to do is set within a virtual site in
httpd.conf:

php_admin_value sendmail_path =
"/usr/sbin/sendmail -t -oQ/var/spool/mqueue_batch -ODeliveryMode=q"

Problem is when I do this, my emails go in to oblivion.  I've tried other
paths/options like "/usr/sbin/sendmail -oi -t -odq" and it works just fine.
I've tested my path in a perl script so I'm sure it's correct; I'm sure my
permissions are correct...any ideas?


--Ricky

[1] It's not spam.  Honest!



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




Re: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread George Hester

I wish I could say the same.  Thanks.

--
George Hester
_
"Balaji Ankem" <[EMAIL PROTECTED]> wrote in message
005901c22883$f22d5840$[EMAIL PROTECTED]">news:005901c22883$f22d5840$[EMAIL PROTECTED]...
> It is working fine for me!!!
>
>
> -Original Message-
> From: George Hester [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 8:03 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] HTTP_USER_AGENT?
>
>
> I have this in my web site not in an executable folder:
>
> 
> 
> My First PHP Program
> 
> 
> 
> 
> 
>
> No problem.  I then put this in the same folder:
>
> 
> 
> My Second PHP Program
> 
> 
> 
> 
> 
>
> Nothing appears.  What's wrong?
>
>
> --
> George Hester
> _
>
>
>
> --
> 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] sigh... forms

2002-07-10 Thread Chris Earle

I don't have time to actually make the function for you, but I know it could
be easily done with a single function and a double for loop, which could go
through an two-dimensional array of the questions (first element), answers
(next group except last), and the right answer (last element).

basically:

$ArrCount = count($Question);

for ($Counter = 0; $Counter < $ArrCount; $Counter++)
{
$Que = $Question[$Counter][0];
$SecArrCount = count($Question[$Counter]);
// SecArrCount should be the number equal to the last element (answer)
?>function CheckAnswer() {var RightAnswer
= $Question[$Counter][$SecArrCount]; }<..TD>

Re: [PHP] Script File Permissions

2002-07-10 Thread Chris Earle

That "clever guy" is my brother, so I know what buttons to push.

I actually got the ability to be able to edit files through my scripts, so
it does work.  Thanks for the help/input!

"Alberto Serra" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ðÒÉ×ÅÔ!
>
> Chris Earle wrote:
> > Thank you for the reply (I don't speak or read Russian if that's what
that
> > other stuff is).
> It is, but it's nothing more than "hello" and my signature, so you did
> not miss any basic content :)
>
> > I forgot to mention that the server is a Win2k server with
> > IIS 5 running.  Obviously I'm not the server admin (otherwise I would be
> > using Apache).
> Dunno. Never had that running myself. BUt as far as I can remember Ms
> security should be directory based. So the guy actually *might* allow
> you writing somewhere if you can convince him that it would show how
> clever he is ;)
>
> > I hope that I can get permissions, but I bet you're right.  Probably
just
> > have to create a database, which I planned on doing (and know how to).
I
> > really did want to use XML though, oh well.
>
> Besides, sooner or later you might need to just log events out to a flat
> file, right?
>
> ÐÏËÁ
> áÌØÂÅÒÔÏ
> ëÉÅ×
>
>
> @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@
>
> LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> lOrD i'M sHiNiNg...
> YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is...
>



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




Re: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread Justin French

Try:



... you might have a newer version of PHP (4.1+), which uses the global
arrays like:

$_SERVER
$_POST
$_GET
$_SESSION
$_COOKIE

...


Justin French




on 11/07/02 12:32 PM, George Hester ([EMAIL PROTECTED]) wrote:

> I have this in my web site not in an executable folder:
> 
> 
> 
> My First PHP Program
> 
> 
> 
> 
> 
> 
> No problem.  I then put this in the same folder:
> 
> 
> 
> My Second PHP Program
> 
> 
> 
> 
> 
> 
> Nothing appears.  What's wrong?
> 
> 
> --
> George Hester
> _
> 
> 


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




RE: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread Balaji Ankem

It is working fine for me!!!


-Original Message-
From: George Hester [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 11, 2002 8:03 AM
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP_USER_AGENT?


I have this in my web site not in an executable folder:



My First PHP Program






No problem.  I then put this in the same folder:



My Second PHP Program






Nothing appears.  What's wrong?


--
George Hester
_



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



**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***



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


Re: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread Andrew Brampton

the $HTTP_USER_AGENT varible contains nothing...

Try doing a phpinfo(); to see what the correct varible to use is, it is most
likly $_SERVER['HTTP_USER_AGENT']  since the way these varibles are handled
changed a few versions ago

Andrew
"George Hester" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have this in my web site not in an executable folder:
>
> 
> 
> My First PHP Program
> 
> 
> 
> 
> 
>
> No problem.  I then put this in the same folder:
>
> 
> 
> My Second PHP Program
> 
> 
> 
> 
> 
>
> Nothing appears.  What's wrong?
>
>
> --
> George Hester
> _
>
>
>
> --
> 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] How do I import tables into MySQL from web page ...

2002-07-10 Thread Peter

using dan's test below if u add a '/s' like so

 $output = system('dir /s c:\books', $return_var);

you will get all contents os subdir's as well  
how ever i suggest working on a format as this tree's out along the page
so maybe if u add a '/w' after the '/s'as well that will sort of solve that problem .. 

though does create one massive block of filenames in ur browser...

Cheers


> -Original Message-
> From: Fargo Lee [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 11 July 2002 11:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] How do I import tables into MySQL from web page ...
> 
> 
> I ran a few tests as well and the few system commands I tried 
> only saved the
> *last* line of the output in a variable on success as the manual 
> suggests it
> should - better than nothing - but not the entire output as you seem to
> suggest you were able to do and what I have been trying to do.
> 
> "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote:
> > >
> > > This suggests, as do a few posts I just noticed in the manual,  that
> > > one cannot assign the output of system() and perhaps passthru() and
> exec()
> > > to a variable.
> >
> > I forgot to mention, that's not accurate.  I just ran a test to 
> make sure.
> > Got the results just fine.
> >
> > Just for clarity, here's my test (PHP 4.2.1, NT 4.0):
> >
> > #   real directory.
> > #   result:  output shows file list, false no, return 0
> > #   $output = system('dir c:\books', $return_var);
> >
> > #   fake directory.
> > #   result:  output shows nothing, false yes, return 1
> >$output = system('dir y:\fake', $return_var);
> >
> >echo "output: $output";
> >echo '';
> >echo 'output false? ' . ( ($output == FALSE) ? 'yes' : 'no' );
> >echo '';
> >echo "return: $return_var";
> >
> >
> > --Dan
> >
> >
> >  I think this is only possible using backticks, which I can't
> > > use as this needs to be run in safe mode. So I guess I just 
> need to use
> the
> > > return_var as you suggested. Thanks!
> > >
> > > "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in
> message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > On Tue, Jul 09, 2002 at 11:41:47PM -0700, Fargo Lee wrote:
> > > >
> > > > > got it to assign a 0 (success) or 1 (failure) to the return_var
> argument
> > > as
> > > > > you suggested so I am happy.
> > > >
> > > > Good!
> > > >
> > > >
> > > > > What mixed me up and I still don't understand is the manual entry
> for
> > > > > system() says ...
> > > > >
> > > > > "Returns the last line of the command output on success, and FALSE
> on
> > > > > failure."
> > > > >
> > > > > When it says it "Returns", where does it return this 
> information and
> how
> > > can
> > > > > it be captured for comparison?
> > > >
> > > > The thing that's tripping you up is, I believe, executing MySQL
> programs
> > > > at a prompt doesn't produce any visible output.  But, if 
> you executed
> a
> > > > command that returns some output to STDOUT, like "ls", you'd see the
> last
> > > > line of output therefrom in the "Return."
> > > >
> > > > --Dan
> > > >
> > > > --
> > > >PHP classes that make web design easier
> > > > SQL Solution  |   Layout Solution   |  Form Solution
> > > > sqlsolution.info  | layoutsolution.info |  formsolution.info
> > > >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> > > >  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > --
> >PHP classes that make web design easier
> > SQL Solution  |   Layout Solution   |  Form Solution
> > sqlsolution.info  | layoutsolution.info |  formsolution.info
> >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> >  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


[PHP] HTTP_USER_AGENT?

2002-07-10 Thread George Hester

I have this in my web site not in an executable folder:



My First PHP Program






No problem.  I then put this in the same folder:



My Second PHP Program






Nothing appears.  What's wrong?


--
George Hester
_



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




Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee

But if system() thinks it is a success because the command executed, even
though MySQL returns an internal error on the command line, why is'nt the
last line of the MySQL error message stored in the variable as the system()
manual suggests it should be when system() thinks it is a success?

"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote:
> >
> > when made to fail MySQL does return an error on the command line yet the
> > variable does not hold FALSE as the manual suggests it should or
anything
> > else.
>
> The behaviour of returning FALSE upon failure has to do with the system()
> call not being able to be made due to things like the command itself not
> being able to execute, such as when the name of the program is wrong.
> But, since the program in this case actually executed, there's no failure.
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




[PHP] Re: PHP & gd-2.0

2002-07-10 Thread Ricky Dhatt

I've done it, and it's quite a pain.  Try http://www.php.net/~rasmus/gd.html
and look for Rasmus's posts on google groups for some insight.  One problem
I had was that configure kept finding old gd's; I had go thru my system and
rename them temporarly to get it to work.

"Mike" <[EMAIL PROTECTED]> wrote in message
004501c2285c$9059c620$[EMAIL PROTECTED]">news:004501c2285c$9059c620$[EMAIL PROTECTED]...
> Hello,
>
> I'm trying to use imagecreatetruecolor & imagecopyresampled to resize some
> of my images. The problem is I can't get PHP Version 4.0.6 to recognize
that
> I have gd-2.0 installed. I keep getting this error: Fatal error:
> imagecreatetruecolor(): requires GD 2.0 or later.
>
> I have these files in /usr/lib for gd :
> libgd.la
> libgd.so
> libgd.so.1
> libgd.so.1.8
> libgd.so.1.8.4
> libgd.so.2
> libgd.so.2.0.0
>
> I installed php and gd by rpm. I did try to install gd from the source,
Did
> make install with no errors.
>
> Not sure where to go from here.
>
> Thanks in advance for any help,
>
> Mike
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.371 / Virus Database: 206 - Release Date: 6/13/02
>



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




Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee

I ran a few tests as well and the few system commands I tried only saved the
*last* line of the output in a variable on success as the manual suggests it
should - better than nothing - but not the entire output as you seem to
suggest you were able to do and what I have been trying to do.

"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote:
> >
> > This suggests, as do a few posts I just noticed in the manual,  that
> > one cannot assign the output of system() and perhaps passthru() and
exec()
> > to a variable.
>
> I forgot to mention, that's not accurate.  I just ran a test to make sure.
> Got the results just fine.
>
> Just for clarity, here's my test (PHP 4.2.1, NT 4.0):
>
> #   real directory.
> #   result:  output shows file list, false no, return 0
> #   $output = system('dir c:\books', $return_var);
>
> #   fake directory.
> #   result:  output shows nothing, false yes, return 1
>$output = system('dir y:\fake', $return_var);
>
>echo "output: $output";
>echo '';
>echo 'output false? ' . ( ($output == FALSE) ? 'yes' : 'no' );
>echo '';
>echo "return: $return_var";
>
>
> --Dan
>
>
>  I think this is only possible using backticks, which I can't
> > use as this needs to be run in safe mode. So I guess I just need to use
the
> > return_var as you suggested. Thanks!
> >
> > "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in
message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > On Tue, Jul 09, 2002 at 11:41:47PM -0700, Fargo Lee wrote:
> > >
> > > > got it to assign a 0 (success) or 1 (failure) to the return_var
argument
> > as
> > > > you suggested so I am happy.
> > >
> > > Good!
> > >
> > >
> > > > What mixed me up and I still don't understand is the manual entry
for
> > > > system() says ...
> > > >
> > > > "Returns the last line of the command output on success, and FALSE
on
> > > > failure."
> > > >
> > > > When it says it "Returns", where does it return this information and
how
> > can
> > > > it be captured for comparison?
> > >
> > > The thing that's tripping you up is, I believe, executing MySQL
programs
> > > at a prompt doesn't produce any visible output.  But, if you executed
a
> > > command that returns some output to STDOUT, like "ls", you'd see the
last
> > > line of output therefrom in the "Return."
> > >
> > > --Dan
> > >
> > > --
> > >PHP classes that make web design easier
> > > SQL Solution  |   Layout Solution   |  Form Solution
> > > sqlsolution.info  | layoutsolution.info |  formsolution.info
> > >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> > >  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




Re: [PHP] setcookie then redirect

2002-07-10 Thread Chris Shiflett

David Busby wrote:

> List,
> I'm trying to set a cookie like this:
>  function redirect() {
> if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) {
> $to = func_get_arg(0);
> header("HTTP/1.1 301\n");
> header("Location:http://".$_SERVER['SERVER_NAME'].$to."\n");
> header("Set-Cookie: sid=$sid;\n\n");
> exit();
> }
> }


You can't do this. Your "Set-Cookie" header is not going to be included 
in the HTTP response, so the browser never receives it. This is because 
you are using a "Location" header on the same page, which is going to 
take precedence. If you search the archives, you'll see more details 
about this behavior and some other peoples' opinions.

You have two ways around this:
1. Use a meta refresh instead of a protocol-level redirect.
2. Redesign the flow of your application to better handle this behavior.

Happy hacking.

Chris


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




Re: [PHP] File Uploading Question

2002-07-10 Thread Justin French

on 11/07/02 10:10 AM, Nick Oostveen ([EMAIL PROTECTED]) wrote:

> I've got a (hopefully) simple question which is indirectly related to php.

Very indirectly.  Infact, it's completely a HTML/CSS question.

Try the comp.infosystems.www.authoring.stylesheets newsgroup.


Justin French


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




Re: [PHP] reports and reporting options?

2002-07-10 Thread Anas Mughal


 also, check out:
http://www.yourlegacy.org/annualReports/readme.pdf
 
 
  Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: php.net/pdf

On Wed, 10 Jul 2002, Jeff D. Hamann wrote:

> I've got a project that requires lots of "goofy" reports. These reports are
> more than a simple html table (which would be nice) that the client wants to
> print out on standard 8.5x11 paper. Crystal Reports type of reports. I need
> to be able to produce these from PHP scripts and I'm looking for a solution.
> What are people using to accomplish this?
>
>
> --
> Jeff D. Hamann
> Hamann, Donald & Associates, Inc.
> PO Box 1421
> Corvallis, Oregon USA 97339-1421
> Bus. 541-753-7333
> Cell. 541-740-5988
> [EMAIL PROTECTED]
> www.hamanndonald.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



-
Do You Yahoo!?
New! SBC Yahoo! Dial - 1st Month Free & unlimited access


[PHP] caching dynamic thumbnail

2002-07-10 Thread Roger Thomas

just would like to confirm here whether thumbnail images that i generated
dynamically with gd is cached by browsers.

a) i have a html frontend to call the php script that does that thumbnail. this
html file, say, view.htm contains these lines:






b) the thumbnailing works perfectly. but is this thumbnail cached inside my
browser. how do i find this out ?

c) if the answer to question b) above is 'No', is it a good idea to generate
thumbnails dynamically but PHYSICALLY writing it to disk (with extra checking
of course; is the thumb previously was available, is it the desired size etc
etc)

please advise.

--
roger


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




[PHP] Re: File Uploading Question

2002-07-10 Thread David Duong

Go to http://www.cs.tut.fi/~jkorpela/forms/file.html;  It gives an example.
Press Find on Page (ctrl+F for Internet Explorer) and type in "Style Sheet",
you should find what you are looking for by reading the paragraph and any
below that concern Style Sheet.

For more info about Style Sheets do a search for "style sheet" or "CSS".

"Nick Oostveen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've got a (hopefully) simple question which is indirectly related to php.
>
> I'm currently developing an application which includes functionality to
> allow users to upload image files.  Does anyone here know of a way to
> customize the look of the HTML "file" input type? By this I mean changing
> the "browse" button to a graphic, hiding the text field, etc.
>
> Any help with this would be greatly appreciated.
>
>



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




Re: [PHP] strange stuff in a class

2002-07-10 Thread Analysis & Solutions

On Wed, Jul 10, 2002 at 09:50:27AM -, Alex Elderson wrote:
> 
>   class test {
> function test() {
>   $globals['test2'] = &$this;
> }
>   }
>   $test1 = new test();
> 
> The problem hier is that $globals['test2'] is a copy of 
> $globals['test1'] not a 
> references.

Use "$GLOBALS" rather than "$globals"

--Dan

--
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] File Uploading Question

2002-07-10 Thread Nick Oostveen

I've got a (hopefully) simple question which is indirectly related to php.

I'm currently developing an application which includes functionality to 
allow users to upload image files.  Does anyone here know of a way to 
customize the look of the HTML "file" input type? By this I mean changing 
the "browse" button to a graphic, hiding the text field, etc.

Any help with this would be greatly appreciated.



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




Re[2]: [PHP] (OT) Erik Hegreberg - need headers for abuse@online.no

2002-07-10 Thread Nookie

Hello Justin,

Thursday, July 11, 2002, 1:35:50 AM, you wrote:

JF> Jason,

JF> I too have this problem, and got the same response from them.

JF> But I believe they weren't stripped out by your mail client, but by the PHP
JF> list itself... because I didn't *forward*, I copied and pasted.

JF> Either that, or they can't be bothered dealing with the real issue :)


JF> I don't know what else to do.


JF> Justin French



Here's example of headers from my copy of his mails


From: Erik Hegreberg <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Tuesday, July 9, 2002, 9:40:49 PM
Subject: [PHP]
ttt

===8<==Original message text===
Return-Path: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
Received: from pb1.pair.com (pb1.pair.com [216.92.131.4])
by mail.megavita.pl (Postfix) with SMTP id CACCFB8268
for <[EMAIL PROTECTED]>; Tue,  9 Jul 2002 21:54:34 +0200 (CEST)
Received: (qmail 76145 invoked by uid 1010); 9 Jul 2002 19:39:51 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: 
list-unsubscribe: 
list-post: 
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 76074 invoked from network); 9 Jul 2002 19:39:50 -
Message-ID: <025f01c22780$873d3db0$01000a0a@mi6>
From: "Erik Hegreberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Tue, 9 Jul 2002 21:40:49 +0200
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="=_NextPart_000_025C_01C22791.4A9846F0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.
Disposition-Notification-To: "Erik Hegreberg" <[EMAIL PROTECTED]>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.
Subject: [PHP]
ttt
Status:   


===8<===End of original message text===





-- 
Pozdrowienia,
 Nookie  mailto:[EMAIL PROTECTED]
 http://www.shakira-online.net
 http://www.xtina.pl
 http://www.jessica.prv.pl



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




Re: [PHP] setcookie then redirect + Answer

2002-07-10 Thread David Busby

Read your data from $_COOKIE not $_COOKIES.

David Busby wrote:
> List,
> I'm trying to set a cookie like this:
>  function redirect() {
> if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) {
> $to = func_get_arg(0);
> header("HTTP/1.1 301\n");
> header("Location:http://".$_SERVER['SERVER_NAME'].$to."\n");
> header("Set-Cookie: sid=$sid;\n\n");
> exit();
> }
> }
> 
> function login() {
> [... validation code here ...]
> // set my cookie
> setcookie("sid", $sid);
> return true;
> }
> 
> if (login($token) == true) {
> redirect("/somepage.php");
> }
> ?>
> 
> but this thing isn't working...seems like it's not writing the SID value 
> in the cookie.  In other code (on /somepage.php for example) when I read 
> the cookie value ($_COOKIES['sid']) it can't find it.  Ideas?
> 
> So how do I set cookies then redirect?
> 
> I'm using Apache 1.3.x, PHP 4.1.2, RH7.3
> 
> TIA
> /B
> 
> 



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




Re: [PHP] (OT) Erik Hegreberg - need headers for abuse@online.no

2002-07-10 Thread Justin French

Jason,

I too have this problem, and got the same response from them.

But I believe they weren't stripped out by your mail client, but by the PHP
list itself... because I didn't *forward*, I copied and pasted.

Either that, or they can't be bothered dealing with the real issue :)


I don't know what else to do.


Justin French



on 11/07/02 2:41 AM, Jason Soza ([EMAIL PROTECTED]) wrote:

> Hey,
> 
> I got a response from [EMAIL PROTECTED] regarding Erik Hegreberg's little
> stunt yesterday and they want full headers from the message in
> question. I thought all headers were going with my message to
> [EMAIL PROTECTED] when I forwarded, but apparently they got stripped by
> my client.
> 
> Unfortunately, I deleted all of Erik's messages as they came in, so I'm
> hoping someone out there that still has at least one copy can either
> forward me a copy with all headers intact, or can copy/paste headers
> into a new message and send those to me.
> 
> Just want to make sure Erik is properly dealt with by his ISP. Thanks,
> 
> Jason Soza
> 


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




[PHP] setcookie then redirect

2002-07-10 Thread David Busby

List,
I'm trying to set a cookie like this:
http://".$_SERVER['SERVER_NAME'].$to."\n");
header("Set-Cookie: sid=$sid;\n\n");
exit();
}
}

function login() {
[... validation code here ...]
// set my cookie
setcookie("sid", $sid);
return true;
}

if (login($token) == true) {
redirect("/somepage.php");
}
?>

but this thing isn't working...seems like it's not writing the SID value 
in the cookie.  In other code (on /somepage.php for example) when I read 
the cookie value ($_COOKIES['sid']) it can't find it.  Ideas?

So how do I set cookies then redirect?

I'm using Apache 1.3.x, PHP 4.1.2, RH7.3

TIA
/B


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




Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Analysis & Solutions

On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote:
>
> This suggests, as do a few posts I just noticed in the manual,  that
> one cannot assign the output of system() and perhaps passthru() and exec()
> to a variable.

I forgot to mention, that's not accurate.  I just ran a test to make sure.  
Got the results just fine.

Just for clarity, here's my test (PHP 4.2.1, NT 4.0):

#   real directory.
#   result:  output shows file list, false no, return 0
#   $output = system('dir c:\books', $return_var);

#   fake directory.
#   result:  output shows nothing, false yes, return 1
   $output = system('dir y:\fake', $return_var);

   echo "output: $output";
   echo '';
   echo 'output false? ' . ( ($output == FALSE) ? 'yes' : 'no' );
   echo '';
   echo "return: $return_var";


--Dan


 I think this is only possible using backticks, which I can't
> use as this needs to be run in safe mode. So I guess I just need to use the
> return_var as you suggested. Thanks!
> 
> "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Tue, Jul 09, 2002 at 11:41:47PM -0700, Fargo Lee wrote:
> >
> > > got it to assign a 0 (success) or 1 (failure) to the return_var argument
> as
> > > you suggested so I am happy.
> >
> > Good!
> >
> >
> > > What mixed me up and I still don't understand is the manual entry for
> > > system() says ...
> > >
> > > "Returns the last line of the command output on success, and FALSE on
> > > failure."
> > >
> > > When it says it "Returns", where does it return this information and how
> can
> > > it be captured for comparison?
> >
> > The thing that's tripping you up is, I believe, executing MySQL programs
> > at a prompt doesn't produce any visible output.  But, if you executed a
> > command that returns some output to STDOUT, like "ls", you'd see the last
> > line of output therefrom in the "Return."
> >
> > --Dan
> >
> > --
> >PHP classes that make web design easier
> > SQL Solution  |   Layout Solution   |  Form Solution
> > sqlsolution.info  | layoutsolution.info |  formsolution.info
> >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> >  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Analysis & Solutions

On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote:
>
> when made to fail MySQL does return an error on the command line yet the
> variable does not hold FALSE as the manual suggests it should or anything
> else.

The behaviour of returning FALSE upon failure has to do with the system()
call not being able to be made due to things like the command itself not
being able to execute, such as when the name of the program is wrong.  
But, since the program in this case actually executed, there's no failure.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




RE: [PHP] Development Tools

2002-07-10 Thread Nick Oostveen

While I can't speak for others, in our office we use template files which 
contain all HTML and then parse content generated from php scripts into 
them about 90% of the time.  Not only does separating your code from your 
HTML make it easier to change the look of a site, but it also makes the 
code much easier to maintain.  If you're interested I would recommend 
checking out the FastTemplate class for an example of how this works.

At 02:42 PM 7/10/2002 -0700, you wrote:
>I'm definitely curious and want to check out the debugging tools,
>performance analyzer, and database connectivity tools provided by PHPEd.
>
>I get the impression most developers do not integrate coding and content.
>Is this correct?
>
>-Ed
>
>
>-Original Message-
>These first two things are immediately obvious to even first time users and
>will speed things up, but the real benefits come from other items such as a
>integrated debugging tools, performance analyzers, a good class browser,
>and built in database connectivity.  If you're working in a team
>environment having an IDE which has built-in support for a content
>verification system can also be a huge advantage.  Again, these features
>will only benefit someone who knows how to use them.
>
>Unfortunately I have yet to find a truly good PHP IDE.  The two best I've
>found to date are NuSphere's PHPEd 3.0.0 (which unfortunately has dozens of
>minor, but annoying bugs) and the Zend IDE (which is very nice, but it
>crawls on anything but the fastest systems).  If either of these fix the
>for-mentioned issues I'd be the first in line to purchase them.
>
>
>This message is intended for the sole use of the individual and entity to
>whom it is addressed, and may contain information that is privileged,
>confidential and exempt from disclosure under applicable law.  If you are
>not the intended addressee, nor authorized to receive for the intended
>addressee, you are hereby notified that you may not use, copy, disclose or
>distribute to anyone the message or any information contained in the
>message.  If you have received this message in error, please immediately
>advise the sender by reply email and delete the message.  Thank you very
>much.
>
>--
>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] varible in url question

2002-07-10 Thread Philip Olson

Please read this manual page, it has examples 
to suit your needs:

 http://www.php.net/manual/en/language.variables.external.php

Regards,
Philip Olson


On Wed, 10 Jul 2002, sven vandamme wrote:

> on my page (lessen.php)
> 
> i have a variable $sort
> 
> if this varible is empty if enterd the page then it will be set on 'day'
> 
> i have 3 links in the page
> 
> lessen.php?sort=day
> lessen.php?sort=game
> lessen.php?sort=player
> 
> so these links refure to the same page (itself)
> on clicked it opens itself and should set the varible to day, game or player
> but that doesn't happen.
> can somebody help me please
> 
> 
> see attachmend
> 
> greetz @cid
> 
> 
> 
> 
> begin 666 lessen.php
> M/#]P:' -"@T*:68H(21S;W)T*7L-"B1S;W)T(#T@(F1A>2([#0I]#0H-"F5C
> M:&\H(G-O M/%1)5$Q%/CPO5$E43$4^#0H-"@T*/"](14%$/@T*/$)/1%D^#0H\<"!A;&EG
> M;CTB M,3 P)2(@8F]R9&5R/2(P(B!C96QL M/61A>2(@=&%R9V5T/2)? M9'1H/2(Q.24B/DAO=7(\+W1D/@T*"3QT9"!W:61T:#TB,S$E(CX\82!H M/2)L97-S96XN<&AP/W-O M83X\+W1D/@T*"3QT9"!W:61T:#TB,S,E(CX\82!H M/W-O65R(B!T87)G970](E]S96QF(CYP;&%Y97(\+V$^/"]T9#X-
> J"CPO='(^#0H-"CPO=&%B;&4^#0H-"@T*#0H\+T)/1%D^#0H\+TA434P^
> `
> end
> 
> 
> -- 
> 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] question varibles and url

2002-07-10 Thread Danny Shepherd

What version of PHP are you using? Have you got register_globals on? If
they're off you'll need to get the $sort variable by using
$HTTP_GET_VARS['sort'] (or $_GET['sort'] if you're using PHP4.1.0 or later)

You attachched the wrong file (html output instead of PHP source)

You really could do with a spell checker btw :-)

HTH

Danny.

- Original Message -
From: @cid
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 10:24 PM
Subject: [PHP] question varibles and url


on my page (lessen.php)

i have a variable $sort

if this varible is empty if enterd the page then it will be set on 'day'

i have 3 links in the page

lessen.php?sort=day
lessen.php?sort=game
lessen.php?sort=player

so these links refure to the same page (itself)
on clicked it opens itself and should set the varible to day, game or player
but that doesn't happen.
can somebody help me please


see attachmend

greetz @cid









--
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] Re: PHP & gd-2.0

2002-07-10 Thread Derick Rethans

Mike,

I suggest you try the latest snapshot @ 
http://snaps.php.net/php-latest.tar.gz and configure like this:
./configure --with-gd=php --other options

This will use the bundled GD library, which is more current than any 
'official' release. The PHP Dev Team decided to bundle it to make sure 
there are no more weird problems with PHP in combination with GD.

Derick

Mike wrote:
> Hello,
> 
> I'm trying to use imagecreatetruecolor & imagecopyresampled to resize some
> of my images. The problem is I can't get PHP Version 4.0.6 to recognize that
> I have gd-2.0 installed. I keep getting this error: Fatal error:
> imagecreatetruecolor(): requires GD 2.0 or later.
> 
> I have these files in /usr/lib for gd :
> libgd.la
> libgd.so
> libgd.so.1
> libgd.so.1.8
> libgd.so.1.8.4
> libgd.so.2
> libgd.so.2.0.0
> 
> I installed php and gd by rpm. I did try to install gd from the source, Did
> make install with no errors.
> 
> Not sure where to go from here.
> 
> Thanks in advance for any help,
> 
> Mike
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.371 / Virus Database: 206 - Release Date: 6/13/02
> 



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




Re: [PHP] Re: Development Tools

2002-07-10 Thread Bret L Conard

I have found dreamweaver intolerable due to it's writing the code. I usually
write 8 lines to do something that DW takes 24 to do. (I'm all about slim
code:) ). Also, the naming conventions that DW uses for functions and
variables is too long and for me makes no sense. (Always  with
no rhyme or reason.) I like variable and function names that are short and
refer to what they do/represent for readability.

I have also spent a great deal of time 'fixing' DW JavaScript that does not
work. Not a confidence builder..

Bret
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 3:39 PM
Subject: [PHP] Re: Development Tools


> For those of you using HomeSite, is it worthwhile for me to install it if
I
> already have DreamWeaver 4 on my PC?  Someone said HomeSite is basically
> DreamWeaver without the UI interface so I'm wondering if it's possible to
use
> DreamWeaver the same way I would Homesite.
>
> Jesse
>
> --
> 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] getdate

2002-07-10 Thread Brian V Bonini

Hmmm, wierd!! The server is physically in PDT I am in EDT but I have the
servers time zone set to EDT and as I said "date" verifies the correct time
but yet the script returns a time that is 4 hours ahead. Wierd :(

> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 10, 2002 6:24 PM
> To: Brian V Bonini
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] getdate
>
>
> Works fine here.  Are you actually in EDT?
>
> On Wed, 10 Jul 2002, Brian V Bonini wrote:
>
> > Any idea why this is off by 4 hours?
> >
> > Server time zone is set correctly,
> > %date
> > Wed Jul 10 14:26:18 EDT 2002
> > but the script below returns the time as being 4 hours later then that.
> >
> >
> >  > $date = getdate();
> > $minutes = $date['minutes'];
> > $hours = $date['hours'];
> > $tz="EDT";
> > $today = getdate();
> > $month = $today['month'];
> > $mday = $today['mday'];
> > $year = $today['year'];
> > $ampm="AM";
> > if ($hours > 12) {
> > $hours=$hours-12;
> > $ampm="PM";
> > } elseif ($hours == 12) {
> > $ampm="PM";
> > }
> > if ( $minutes < 10) {
> > $minutes="0$minutes";
> > }
> > print "$hours:$minutes $ampm $tz $month $mday, $year";
> > ?>
> >
> > --
> > 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] Re: newbie regex question..

2002-07-10 Thread David Duong

I am not quite sure but this will do the trick:

http://64.4.14.24/spacer.gif\"; width=1 height=2>";
$fixedfile=preg_replace("/src=[^>]*?>/","src=\"\">",
$fixedfile);

#preg_replace("/[search]/","[replacement]",[string]);

exit ($fixedfile);
?>

I have made some differences from what you were trying to do:
I used preg_replace, I added ">" to the replacement since without it you
would get:
 would be correct).

A note From a PHP manual.:
preg_replace(), which uses a Perl-compatible regular expression syntax, is
often a faster alternative to ereg_replace().

"Kelly Meeks" <[EMAIL PROTECTED]> wrote in message
002701c22832$3992e800$6501a8c0@yourw92p4bhlzg">news:002701c22832$3992e800$6501a8c0@yourw92p4bhlzg...
Hi folks,

I'm trying my hand at some pattern matching, and I have a question.

I need to take all the text between the title tags of a page, and replace
it.  This I can do, with the following:

$fixedfile=ereg_replace(".*","", $fixedfile);
works like a charm

Now I want to delete everything in the src section of an image tag, so I'm
trying this:

$fixedfile=ereg_replace("src=\".*\">","src=\"\"",
$fixedfile);

but this doesn't work.

What am I doing wrong?

Kelly




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




Re: [PHP] getdate

2002-07-10 Thread Rasmus Lerdorf

Works fine here.  Are you actually in EDT?

On Wed, 10 Jul 2002, Brian V Bonini wrote:

> Any idea why this is off by 4 hours?
>
> Server time zone is set correctly,
> %date
> Wed Jul 10 14:26:18 EDT 2002
> but the script below returns the time as being 4 hours later then that.
>
>
>  $date = getdate();
> $minutes = $date['minutes'];
> $hours = $date['hours'];
> $tz="EDT";
> $today = getdate();
> $month = $today['month'];
> $mday = $today['mday'];
> $year = $today['year'];
> $ampm="AM";
> if ($hours > 12) {
> $hours=$hours-12;
> $ampm="PM";
> } elseif ($hours == 12) {
> $ampm="PM";
> }
> if ( $minutes < 10) {
> $minutes="0$minutes";
> }
> print "$hours:$minutes $ampm $tz $month $mday, $year";
> ?>
>
> --
> 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] getdate

2002-07-10 Thread Brian V Bonini

Any idea why this is off by 4 hours?

Server time zone is set correctly,
%date
Wed Jul 10 14:26:18 EDT 2002
but the script below returns the time as being 4 hours later then that.


 12) { 
$hours=$hours-12; 
$ampm="PM"; 
} elseif ($hours == 12) {
$ampm="PM";
}
if ( $minutes < 10) { 
$minutes="0$minutes"; 
} 
print "$hours:$minutes $ampm $tz $month $mday, $year";
?>

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




Re: [PHP] Dumb session / cookie / password questions

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

Martin Clifford wrote:
> Firstly, you should ALWAYS use an encryption algorithm for passwords. 
 > For my site, I used md5() and match with that.
 > That way, even if someone does get a hold of the encrypted password, 
it's not in their best interest
> (or maybe it is, if they're bored) to crack it.

NO need for decryption. I can just present it "as is" and your soft's 
gonna drink it (and may burp afterwards) :)

 > Putting that at the top of the page would check to see if any
 > information was sent to the page from the $_GET superglobal, and if it
 > was, reload the page without any URL extensions.

Using Register globals off would do the same without any code add-on. 
And it *does* work, as many a user lately found out, in anguish for 
his/her vanished parameters/sessions/cookies/umbrellas and girlfriends 
:) Yet it cannot block your MD5 stuff from being presented back to you 
on the right channel (not so difficult to guess, it's three channels in 
all).

If you don't hold CC numbers, military stuff, bank transactions or mafia 
secrets I can hardly see any need for paranoia (in case you do MD5ing is 
a *poor* solution). Having your CC processed by a secure third party 
will cost you much less than implementing a 90% secure system from 
scratch. When you have nothing to hide you also have nothing to fear :)

Think about it. Most users exchange their user/passwords in emails. 
"Hey! Wanna see what discount prices I got from that site, dude? Look, 
user Mickey pass MOuse (capital O, mind you, I love security, ya know). 
And don't tell anyone, okay?"

Users do it all the time. And sites, too. How many automated mails 
containing right the passwords you are trying to protect you'll be 
forced to send along the net for the sake of "customer satisfaction"?

Most of those "forgot your password? Tell us what email you gave us, 
we'll do the rest!" will be received on public email servers, because 
nobody in his mind would send a commercial site his real email (I 
canceled my first yahoo account when I was already receiving some 50 
commercials a day, mostly about penis enlargement and marijuana 
replacers). Those emails will remain on the account for ages, just in 
case the user forgot the pass again.

Would you rate yahoo as a "secure" site? Any time I walk into a computer 
club while I'm on vacation I end up into somebody else's yahoo/ICQ or 
whatever account... I am usually trying to log out from the session that 
was left open. Maybe because I am too stupid to understand yahoo's 
security policy LOL

That was just for the sake of throwing my 2 kopeki in before going to 
sleep (we are in no euro/dollar/sterling area either :)

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] excel COM code example won't work....

2002-07-10 Thread Jeff D. Hamann

I've been trying to get the follwing example to work and it just doesn't
seem to be able to handle php variables in some of the excel com function
args, like:

  /* start entering data into the cells */
  for( $i = 0; $i < 10; $i++ )
  {
$var_i =  new Variant($i,VT_I4);
echo $i. "";
echo $var_i->value. "";
$cell = $sheet->Cells( $i, 1 ); /* this gags, but */
$cell = $sheet->Cells( 1, 1 ); /* this works fine */
$cell->Activate();
$cell->Value = $i; /* this works */
 }


Is there something I'm missing or is this really touchy like trying to do
automation a few years ago?

Jeff.

--
Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
[EMAIL PROTECTED]
www.hamanndonald.com




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




[PHP] Discard the previous message.

2002-07-10 Thread David Duong

Is their a 1 function method to remove an element within an array using its
key instead of its position within the array?

I am looking for a substitution for placing removing an element without
having to make another array just to list all the array elements and then
using that to specify where to splice.


"David Duong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is their 1 function method to remove an element within an array using its
> key instead of its position within the element?
>
> I am looking for a substitution for placing removing an element without
> having to make another array just to list all the array elements and then
> using that to specify where to splice.
>
>



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




[PHP] another splice?

2002-07-10 Thread David Duong

Is their 1 function method to remove an element within an array using its
key instead of its position within the element?

I am looking for a substitution for placing removing an element without
having to make another array just to list all the array elements and then
using that to specify where to splice.



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




RE: [PHP] Development Tools

2002-07-10 Thread Chris Kay


I don't know about anyone else,
But in linux I use vi and as of yesterday I downloaded
Vi for windows, it has great colours for coding...

---
Chris Kay
Technical Support - Techex Communications 
Website: www.techex.com.au   Email: [EMAIL PROTECTED]
Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 
Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 
Platinum Channel Partner of the Year - Request DSL - Broadband for Business
---

> -Original Message-
> From: Peter J. Schoenster [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, 11 July 2002 5:13 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Development Tools
> 
> 
> On 10 Jul 2002 at 18:07, Uwe Birkenhain wrote:
> 
> > I think that - on windows - nothing is better than textpad 
> > (www.textpad.com). Simply the best editor the world has seen so far!
> > 
> > What makes development tools better than a good editor? (serious
> > question)
> 
> Well let me get my 2 cents in. It's a religious question. But oh 
> well.  I recently had a lot of trouble with someone at work about 
> this, so I'm gonna rant.
> 
> I too use TextPad and have been since I'm too lazy to get really good 
> at vi or emacs. I also know and use Perl extensively as a code 
> generator. Someone talked about the work in creating a form, just 
> give me the keys and boom form is done and read to be handed to the 
> designers to ruin in their special way.  You could use Ruby or Rebol 
> or even Python I guess or PHP on the command line but I can't imagine 
> anyting being faster than a Perl script (to write).
> 
> I keep trying these IDE tools. I type about 70+ wpm, so you can 
> imagine I'm not a fan of my hand speding half it's time in the air 
> between keyboard and mouse. I also try never to repeat the same code 
> twice so I don't cut and paste ... I put common functions in modules 
> and use them but few IDEs that I've used easily allow me to use those 
> or I haven't seen how. If anyone wants to create a great IDE for Perl 
> I'd love to help. It should work for PHP as well.
> 
> I also separate my programming from my view and since I'm a 
> programmer and not a designer the visual view is not paramount to me 
> and can always be done later or at the same time by me or someone 
> else. I have a feeling that most PHP programmers also do their own 
> design and that's a reason for so much PHP stuff to have html strewn 
> all over the place.  In any case I always think in terms of a theme 
> and since I've got most of my html code abstracted into "boxes" it's 
> just a question of my program to manipulate and supply the proper 
> data to the template.
> 
> So for me, the best development tools are:
> 
> 1. Imagination
> 2. Knowledge of your tools (language, PHP, HTML, CSS, etc. in this 
> case)
> 3. Knowledge of the computer and it's potential (I use NT as desktop 
> but have cygwin and use unix command tools and lots and lots of perl 
> scripts to aid 
> in development)
> 
> 4. A good text editor (there are lots, they all have macros, revision 
> control, keyboard commands for as much as possible).
> 
> Personally, I've never worked with a programmer who taught me 
> anything who used Dreamweaver or FrontPage etc ... all the good ones 
> I know use vi, emacs, textpad, etc.  I'd suggest using a text editor 
> and then moving to an IDE or more advanced GUI and knowing that it is 
> faster for you as opposed to starting with an IDE or GUI because 
> you'll probably end up like most people and begin to think 
> possiblities are what your tool allows you.
> 
> Peter
> -- http://www.readbrazil.com/
> Answering Your Questions About Brazil
> 
> 
> -- 
> 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 & gd-2.0

2002-07-10 Thread Mike

Hello,

I'm trying to use imagecreatetruecolor & imagecopyresampled to resize some
of my images. The problem is I can't get PHP Version 4.0.6 to recognize that
I have gd-2.0 installed. I keep getting this error: Fatal error:
imagecreatetruecolor(): requires GD 2.0 or later.

I have these files in /usr/lib for gd :
libgd.la
libgd.so
libgd.so.1
libgd.so.1.8
libgd.so.1.8.4
libgd.so.2
libgd.so.2.0.0

I installed php and gd by rpm. I did try to install gd from the source, Did
make install with no errors.

Not sure where to go from here.

Thanks in advance for any help,

Mike


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.371 / Virus Database: 206 - Release Date: 6/13/02


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




RE: [PHP] varible in url question

2002-07-10 Thread Chris Kay


Php4? or 3?

Have you tried $_GET["sort"]

---
Chris Kay
Technical Support - Techex Communications 
Website: www.techex.com.au   Email: [EMAIL PROTECTED]
Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 
Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 
Platinum Channel Partner of the Year - Request DSL - Broadband for Business
---

> -Original Message-
> From: sven vandamme [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, 11 July 2002 6:41 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] varible in url question
> 
> 
> on my page (lessen.php)
> 
> i have a variable $sort
> 
> if this varible is empty if enterd the page then it will be 
> set on 'day'
> 
> i have 3 links in the page
> 
> lessen.php?sort=day
> lessen.php?sort=game
> lessen.php?sort=player
> 
> so these links refure to the same page (itself)
> on clicked it opens itself and should set the varible to day, 
> game or player but that doesn't happen. can somebody help me please
> 
> 
> see attachmend
> 
> greetz @cid
> 
> 
> 
> 
> 

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




Re: [PHP] varible in url question

2002-07-10 Thread Richard Baskett

It works fine on my system.  If you have register globals off you'll need to
do it this way:



Rick

And many strokes though with a little axe hew down and fell the
hardest-timbered oak. - Shakespeare

> From: "sven vandamme" <[EMAIL PROTECTED]>
> Date: Wed, 10 Jul 2002 22:40:48 +0200
> To: [EMAIL PROTECTED]
> Subject: [PHP] varible in url question
> 
> on my page (lessen.php)
> 
> i have a variable $sort
> 
> if this varible is empty if enterd the page then it will be set on 'day'
> 
> i have 3 links in the page
> 
> lessen.php?sort=day
> lessen.php?sort=game
> lessen.php?sort=player
> 
> so these links refure to the same page (itself)
> on clicked it opens itself and should set the varible to day, game or player
> but that doesn't happen.
> can somebody help me please
> 
> 
> see attachmend
> 
> greetz @cid
> 
> 
> 
> 


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




RE: [PHP] Page not found problem

2002-07-10 Thread Lazor, Ed

Is it doing this for all php based files?  Have you tried a php file that
only has basic commands?  Something like this:



-Original Message-
only display "No input file specified." message.
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

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




[PHP] varible in url question

2002-07-10 Thread sven vandamme

on my page (lessen.php)

i have a variable $sort

if this varible is empty if enterd the page then it will be set on 'day'

i have 3 links in the page

lessen.php?sort=day
lessen.php?sort=game
lessen.php?sort=player

so these links refure to the same page (itself)
on clicked it opens itself and should set the varible to day, game or player
but that doesn't happen.
can somebody help me please


see attachmend

greetz @cid




begin 666 lessen.php
M/#]P:' -"@T*:68H(21S;W)T*7L-"B1S;W)T(#T@(F1A>2([#0I]#0H-"F5C
M:&\H(G-O2(@=&%R9V5T/2)?65R(B!T87)G970](E]S96QF(CYP;&%Y97(\+V$^/"]T9#X-
J"CPO='(^#0H-"CPO=&%B;&4^#0H-"@T*#0H\+T)/1%D^#0H\+TA434P^
`
end


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




RE: [PHP] Development Tools

2002-07-10 Thread Lazor, Ed

I'm definitely curious and want to check out the debugging tools,
performance analyzer, and database connectivity tools provided by PHPEd.

I get the impression most developers do not integrate coding and content.
Is this correct?

-Ed


-Original Message-
These first two things are immediately obvious to even first time users and 
will speed things up, but the real benefits come from other items such as a 
integrated debugging tools, performance analyzers, a good class browser, 
and built in database connectivity.  If you're working in a team 
environment having an IDE which has built-in support for a content 
verification system can also be a huge advantage.  Again, these features 
will only benefit someone who knows how to use them.

Unfortunately I have yet to find a truly good PHP IDE.  The two best I've 
found to date are NuSphere's PHPEd 3.0.0 (which unfortunately has dozens of 
minor, but annoying bugs) and the Zend IDE (which is very nice, but it 
crawls on anything but the fastest systems).  If either of these fix the 
for-mentioned issues I'd be the first in line to purchase them.
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

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




RE: [PHP] Development Tools

2002-07-10 Thread Lazor, Ed

I am too.  I've developed an approach to coding with Dreamweaver that allows
me to take advantage of WYSIWYG and my own style of coding at the same time.
The MX version of Dreamweaver is supposed to add support for code snipets,
and a few other things.  I'm looking forward to checking them out.

Oh, and Dreamweaver has provided the most efficient WYSIWYG created code
that I've seen so far.

So... what do you do when it comes to creating actual content that's
separate from the coding?

My personal approach has been doing the coding necessary to create templates
and then opening templates in Dreamweaver and filling in the blanks.

-Ed

-Original Message-
WYSIWYG does nothing more for me than screw up my code.  I'm very anal about
how my code looks, firstly.  Secondly, most WYSIWYG editors add superfluous
markup into code which not only inflates the file size of your documents,
but also slows down processing of them.

I'm not saying that WYSIWYG isn't right for you, because obviously it is.
I'm just saying that, to me, it might as well be fingernails running down a
chalkboard for all the good it *doesn't* do me, personally.
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

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




Re: [PHP] question varibles and url

2002-07-10 Thread Richard Baskett

I think you sent the wrong file...

Rick

Until you have learned to be tolerant with those who do not always agree
with you; until you have cultivated the habit of saying some kind word of
those whom you do not admire; until you have formed the habit of looking for
the good instead of the bad there is in others, you will be neither
successful nor happy. - Napolean Hill


> From: "@cid" <[EMAIL PROTECTED]>
> Date: Wed, 10 Jul 2002 23:24:23 +0200
> To: [EMAIL PROTECTED]
> Subject: [PHP] question varibles and url
> 
> on my page (lessen.php)
> 
> i have a variable $sort
> 
> if this varible is empty if enterd the page then it will be set on 'day'
> 
> i have 3 links in the page
> 
> lessen.php?sort=day
> lessen.php?sort=game
> lessen.php?sort=player
> 
> so these links refure to the same page (itself)
> on clicked it opens itself and should set the varible to day, game or player
> but that doesn't happen.
> can somebody help me please
> 
> 
> see attachmend
> 
> greetz @cid
> 
> 
> 


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




[PHP] question varibles and url

2002-07-10 Thread @cid

on my page (lessen.php)

i have a variable $sort

if this varible is empty if enterd the page then it will be set on 'day'

i have 3 links in the page

lessen.php?sort=day
lessen.php?sort=game
lessen.php?sort=player

so these links refure to the same page (itself)
on clicked it opens itself and should set the varible to day, game or player
but that doesn't happen.
can somebody help me please


see attachmend

greetz @cid



begin 666 uurrooster.html
M/$A434P^#0H\2$5!1#X-"CQ4251,13Y);G-C:')I:G9I;F<\+U1)5$Q%/@T*
M/$U%5$$@2%144"U%455)5CTB0V]N=&5N="U4>7!E(B!#3TY414Y4/2)T97AT
M+VAT;6P[(&-H87)S970]:7-O+3@X-3DM,2(^#0H\(2TM($EM86=E4F5A9'D@
M4')E;&]A9"!38W)I<'0@*&QA>6]U=#,N<'-D*2 M+3X-"CQ30U))4%0@5%E0
M13TB=&5X="]J879APT*"0ERPT*
M"0EF;W(@*'9APT*"6EF("AD;V-U;65N="YI;6%G97,I('L-
M"@D);6%I;E]S:71E7S X7V]V97(@/2!N97=);6%G92@B:6UA9V5S+VUA:6Y?
M2!3;&EC97,@*&QA>6]U=#,N<'-D*2 M+3X-"CQ404),12!724142#TV
M.#$@0D]21$52/3 @0T5,3%!!1$1)3D<],"!#14Q,4U!!0TE.1STP(&%L:6=N
M/2)C96YT97(B/@T*"3Q44CX-"@D)/%1$(%)/5U-004X]-#X-"@D)"3Q)34<@
M4U)#/2(N+B]I;6%G97,O;6%I;E]S:71E7S Q+F=I9B(@5TE$5$@],CD@2$5)
M1TA4/3,X-2!!3%0](B(^/"]41#X-"@D)/%1$/@T*"0D)/$E-1R!34D,](BXN
M+VEM86=E2!72414
M2#TS-30@2$5)1TA4/3(Y."!F2!3;&EC97,@+2T^#0H\+T)/1%D^#0H\
&+TA434P^
`
end


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




RE: [PHP] HTTP authentication

2002-07-10 Thread Varsha Agarwal

Hi,
 Thanks for the explaination. But that code does not
pop up any login window. Do I need to do any settings
for that??

--- Matt Schroebel <[EMAIL PROTECTED]> wrote:
> > From: Varsha Agarwal
> [mailto:[EMAIL PROTECTED]] 
> > Sent: Wednesday, July 10, 2002 4:30 PM
> 
> >I thought it will ask some user name and
> > password thing but it just displays me the string 
> > "text to send if user hits cancel".
> > This is the code:
> > 
> >  > header("WWW-Authenticate: Basic realm=\"My
> Realm\"");
> 
> ^^
> Get rid of the above statement
> 
> > 
> >   if (!isset($_SERVER['PHP_AUTH_USER'])) {
> > header("WWW-Authenticate: Basic realm=\"My
> > Realm\"");
> > header("HTTP/1.0 401 Unauthorized");
> > echo "Text to send if user hits Cancel
> button\n";
> > exit;
> >   } else {
> > echo "Hello
> {$_SERVER['PHP_AUTH_USER']}.";
> > echo "You entered {$_SERVER['PHP_AUTH_PW']}
> as
> > your password.";
> >   }
> > ?>
> 
>  header("WWW-Authenticate: Basic realm=\"My
> Realm\"");
> header("HTTP/1.0 401 Unauthorized");
> ?>
> 
> The above two statements will cause the browser to
> pop up the login window and pass any input
> (including none) back to the page.  Any user input
> will be in the two $_SERVER vars.  Typically you'd
> validate this with a db or something, and allow
> access if the user id and password validate.  HTTP
> Auth in HTTP/1.0 isn't secure as the credentials are
> sent clear text to the server on every GET request,
> so on a page with images and such it's sent several
> times.  Also, there's no way to sign out other then
> closing all of the browser windows. It's better to
> design a session based solution, with a login page,
> and set a session variable(s) indicating the
> authorized so the user id/password are only sent
> once, and you can control session timeout to require
> re-logging in after some interval of inactivity. 
> You'd also have to consider session hijacking, which
> is covered in the archives.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




RE: [PHP] HTTP authentication

2002-07-10 Thread Matt Schroebel

> From: Varsha Agarwal [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 10, 2002 4:30 PM

>I thought it will ask some user name and
> password thing but it just displays me the string 
> "text to send if user hits cancel".
> This is the code:
> 
>  header("WWW-Authenticate: Basic realm=\"My Realm\"");

^^
Get rid of the above statement

> 
>   if (!isset($_SERVER['PHP_AUTH_USER'])) {
> header("WWW-Authenticate: Basic realm=\"My
> Realm\"");
> header("HTTP/1.0 401 Unauthorized");
> echo "Text to send if user hits Cancel button\n";
> exit;
>   } else {
> echo "Hello {$_SERVER['PHP_AUTH_USER']}.";
> echo "You entered {$_SERVER['PHP_AUTH_PW']} as
> your password.";
>   }
> ?>



The above two statements will cause the browser to pop up the login window and pass 
any input (including none) back to the page.  Any user input will be in the two 
$_SERVER vars.  Typically you'd validate this with a db or something, and allow access 
if the user id and password validate.  HTTP Auth in HTTP/1.0 isn't secure as the 
credentials are sent clear text to the server on every GET request, so on a page with 
images and such it's sent several times.  Also, there's no way to sign out other then 
closing all of the browser windows. It's better to design a session based solution, 
with a login page, and set a session variable(s) indicating the authorized so the user 
id/password are only sent once, and you can control session timeout to require 
re-logging in after some interval of inactivity.  You'd also have to consider session 
hijacking, which is covered in the archives.

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




Re: [PHP] Crash Course on PHP WORKS :: Registering Globals

2002-07-10 Thread Philip Olson

Please read:

  http://www.php.net/manual/en/language.variables.predefined.php

Regards,
Philip Olson


On Wed, 10 Jul 2002, vins wrote:

> OK if you are running php on apache and your form variables don't pass
> through
> fire up your editor and edit php.ini and turn "Register Globals ON"
> 
> Cheerz
> Until Next time.
> 
> 
> 
> -- 
> 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] Page not found problem

2002-07-10 Thread Chen

Chris,

Thank you for the response. I think this is the php setting. If  the user
enter a page name 12345.pdf and there is no such page, the browse will show
the page cannot be found and the HTTP 404 error. But if user enter
12345.php3 or 12345.html(IIS mapping these two kind of files to php.exe),
the HTTP 404 error won't show up, only display "No input file specified."
message.

Chris Hewitt wrote:

> Chen,
>
> If the webserver cannot file a file then this is a webserver problem not
> php. You need to look at your IIS configuration/documentation. Sorry I
> can't help further, but I don't use IIS.
>
> HTH
> Chris
>
> Chen wrote:
>
> >I use php3 with IIS 5.0. When user typed a no existing .html or php3
> >page, they will get a "No input file specified." page. How can I point
> >this to a  HTTP Error 400 page? Anything can be set up in the php.ini
> >file or in IIS configuration?
> >
> >Thanks for any help!!
> >
> >


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




Re: [PHP] Re: Development Tools

2002-07-10 Thread Mark McCulligh

Just wanted to let you know the tab things is for indenting your code.  You
can highlight a couple rows hit tab to indent them together.  Cool feature
for moving blocks of code around and making the code look nice. Bad feature
if you wanted the normal tab function.

Mark.
_
Mark McCulligh, Application Developer / Analyst
Sykes Canada Corporation www.SykesCanada.com
[EMAIL PROTECTED]
- Original Message -
From: "Kevin Stone" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "PHP-general" <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 4:30 PM
Subject: Re: [PHP] Re: Development Tools


> Matt, you're little behind on the times.  Most of the Homesite 5.0 editor
> has already been integrated into DreamweaverMX.  They even have a Homesite
> "mode" which is what I use.  :)
>
> There are many benefits to DreamweaverMX.  The FTP functionality in is
> completely seamless and works very well.  DWMX's "site" feature is similar
> to Homesite "projects" feature except that it actually works right.  The
> coolest feature of DWMX is it's properties bar which makes updating HTML
> tags a breeze.
>
> That being said DWMX is not without problems.  It's slower than
Homesite5..
> which its self was a dog.  The code coloring doesn't work as well as in
> Homesite.  There is no instant way to browse an HTML file.  There seems to
> be a bug in the Find/Replace.  Then there are little user interface issues
> uch as TAB which doesn't work intuitively (tab a selected line and you
> expect to replace the line with a tab but no it tabs the line to the
right..
> it doesn't make sense).  You can't triple click a line to select it.  Line
> indentation is a three key shortcut.. hardly a short cut.  Little things
> like that.
>
> Anyway there are more things I like about DWMX than dislike.  I suggest
you
> d'l the 30 day demo and check it out.  http://www.macromedia.com
>
> -Kevin
>
>
> - Original Message -
> From: "Matthew K. Gold" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 10, 2002 1:51 PM
> Subject: Re: [PHP] Re: Development Tools
>
>
> > The difference between Dreamweaver and Homesite is that Homesite is
easier
> > to
> > customize, and it doesn't mess with your code the way that Dreamweaver
> does.
> > If you're happy with Dreamweaver, you should stick with it.  But if you
> want
> > more control over your code, you
> > should consider switching.
> >
> > Of course, Macromedia recently bought Allaire, so who knows what the
next
> > version of Homesite will look like...
> >
> > Matt
> >
> >
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 10, 2002 3:39 PM
> > Subject: [PHP] Re: Development Tools
> >
> >
> > > For those of you using HomeSite, is it worthwhile for me to install it
> if
> > I
> > > already have DreamWeaver 4 on my PC?  Someone said HomeSite is
basically
> > > DreamWeaver without the UI interface so I'm wondering if it's possible
> to
> > use
> > > DreamWeaver the same way I would Homesite.
> > >
> > > Jesse
> > >
> > > --
> > > 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] HTTP authentication

2002-07-10 Thread Varsha Agarwal

Hi,
I am reading HTTP authentication in php manual. It
does not explain it from the basics of it. Can anyone
tell me what exactly will the output of the following
code? I thought it will ask some user name and
password thing but it just displays me the string 
"text to send if user hits cancel".
This is the code

Hello {$_SERVER['PHP_AUTH_USER']}.";
echo "You entered {$_SERVER['PHP_AUTH_PW']} as
your password.";
  }
?>

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




Re: [PHP] Re: Development Tools

2002-07-10 Thread Kevin Stone

Matt, you're little behind on the times.  Most of the Homesite 5.0 editor
has already been integrated into DreamweaverMX.  They even have a Homesite
"mode" which is what I use.  :)

There are many benefits to DreamweaverMX.  The FTP functionality in is
completely seamless and works very well.  DWMX's "site" feature is similar
to Homesite "projects" feature except that it actually works right.  The
coolest feature of DWMX is it's properties bar which makes updating HTML
tags a breeze.

That being said DWMX is not without problems.  It's slower than Homesite5..
which its self was a dog.  The code coloring doesn't work as well as in
Homesite.  There is no instant way to browse an HTML file.  There seems to
be a bug in the Find/Replace.  Then there are little user interface issues
uch as TAB which doesn't work intuitively (tab a selected line and you
expect to replace the line with a tab but no it tabs the line to the right..
it doesn't make sense).  You can't triple click a line to select it.  Line
indentation is a three key shortcut.. hardly a short cut.  Little things
like that.

Anyway there are more things I like about DWMX than dislike.  I suggest you
d'l the 30 day demo and check it out.  http://www.macromedia.com

-Kevin


- Original Message -
From: "Matthew K. Gold" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 1:51 PM
Subject: Re: [PHP] Re: Development Tools


> The difference between Dreamweaver and Homesite is that Homesite is easier
> to
> customize, and it doesn't mess with your code the way that Dreamweaver
does.
> If you're happy with Dreamweaver, you should stick with it.  But if you
want
> more control over your code, you
> should consider switching.
>
> Of course, Macromedia recently bought Allaire, so who knows what the next
> version of Homesite will look like...
>
> Matt
>
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 10, 2002 3:39 PM
> Subject: [PHP] Re: Development Tools
>
>
> > For those of you using HomeSite, is it worthwhile for me to install it
if
> I
> > already have DreamWeaver 4 on my PC?  Someone said HomeSite is basically
> > DreamWeaver without the UI interface so I'm wondering if it's possible
to
> use
> > DreamWeaver the same way I would Homesite.
> >
> > Jesse
> >
> > --
> > 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




RE: [PHP] Can't get the example to work

2002-07-10 Thread Eugene.McQuade

hmmm...re-did it from scratch and get the same message.  I've included the
html script from the form as well:


  Bob's Auto Parts


Bob's Auto Parts
Order Form




  Item
  Quantity


  Tyres
  


  Oil
  


  Spark Plugs
  


  How did you find Bob's
  
I'm a regular customer
TV advertising
Phone directory
Word of mouth
  
  


  






AND THE RESULTS PAGE:


  Bob's Auto Parts - Order Results


Bob's Auto Parts
Order Results
= 10 && $tyreqty <= 49 )
$discount = 5;
  elseif( $tyreqty >= 50 && $tyreqty <= 99 )
$discount = 10;
  elseif( $tyreqty > 100 )
$discount = 15;

  echo "Order processed at ";
  echo date("H:i, jS F");
  echo "";
  echo "Your order is as follows:";
  echo "";

  if( $totalqty == 0 )
  {
echo "You did not order anything on the previous page!";
  }
  else
  {
if ( $tyreqty>0 )
  echo $tyreqty." tyres";
if ( $oilqty>0 )
  echo $oilqty." bottles of oil";
if ( $sparkqty>0 )
  echo $sparkqty." spark plugs";
  }

  echo "Discount on tyres = ".$discount."%";

  // if version
/*
  if($find == "a")
echo "Regular customer.";
  elseif($find == "b")
echo "Customer referred by TV advert.";
  elseif($find == "c")
echo "Customer referred by phone directory.";
  elseif($find == "d")
echo "Customer referred by word of mouth.";
*/

  // switch version
  switch($find)
  {
case "a" :
  echo "Regular customer.";
  break;
case "b" :
  echo "Customer referred by TV advert.";
  break;
case "c" :
  echo "Customer referred by phone directory.";
  break;
case "c" :
  echo "Customer referred by word of mouth.";
  break;
default :
  echo "We do not know how this customer found us.";
  break;
  }

?>




-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 3:22 PM
To: [EMAIL PROTECTED]; 'Php-General@Lists. Php. Net
(E-mail)'
Subject: RE: [PHP] Can't get the example to work


[snip]
echo $tireqty. "tires
[/snip]

$tyreqty

looks like you have a typo

HTH!

Jay

-Original Message-
From: Eugene.McQuade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 2:21 PM
To: 'Jay Blanchard'; 'Php-General@Lists. Php. Net (E-mail)'
Subject: RE: [PHP] Can't get the example to work


the following is the script requested:


  Bob's Auto Parts - Order Results


Bob's Auto Parts
Order Results
= 10 && $tyreqty <= 49 )
$discount = 5;
  elseif( $tyreqty >= 50 && $tyreqty <= 99 )
$discount = 10;
  elseif( $tyreqty > 100 )
$discount = 15;

  echo "Order processed at ";
  echo date("H:i, jS F");
  echo "";
  echo "Your order is as follows:";
  echo "";

  if( $totalqty == 0 )
  {
echo "You did not order anything on the previous page!";
  }
  else
  {
if ( $tyreqty>0 )
  echo $tyreqty." tyres";
if ( $oilqty>0 )
  echo $oilqty." bottles of oil";
if ( $sparkqty>0 )
  echo $sparkqty." spark plugs";
  }

  echo "Discount on tyres = ".$discount."%";

  // if version
/*
  if($find == "a")
echo "Regular customer.";
  elseif($find == "b")
echo "Customer referred by TV advert.";
  elseif($find == "c")
echo "Customer referred by phone directory.";
  elseif($find == "d")
echo "Customer referred by word of mouth.";
*/

  // switch version
  switch($find)
  {
case "a" :
  echo "Regular customer.";
  break;
case "b" :
  echo "Customer referred by TV advert.";
  break;
case "c" :
  echo "Customer referred by phone directory.";
  break;
case "c" :
  echo "Customer referred by word of mouth.";
  break;
default :
  echo "We do not know how this customer found us.";
  break;
  }

?>



-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 2:54 PM
To: [EMAIL PROTECTED]; 'Php-General@Lists. Php. Net
(E-mail)'
Subject: RE: [PHP] Can't get the example to work


[snip]
However, running the Tutorial scripts found in PHP and MySQL (SAMS), I get,
for example, the following error message for all 3 fields:
Notice: Undefined variable: tireqty in
c:\inetpub\wwwroot\php_tutorial1\processorder2.php on line 11
tires
Here is what is in line 11 is -  echo $tireqty. "tires";
[/snip]

$tireqty is not defined.

[snip]
Any suggestions?
[/snip]


Send more of the code, cannot tell why it is not defined or if you used the
right variable

Jay



--
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




Re: [PHP] Re: Development Tools

2002-07-10 Thread Mark McCulligh

>From my understanding the new Dreamweaver MX has Homesite in it.
Dreamweaver, UltraDev and Homesite are one.  I know in the install program
you can pick your interface to look like Dreamweaver, Homesite or go with
the NEW MX look.  Not sure if this means you can jump back and forth between
HomeSite and Dreamweaver or not.  They might have taken the best from both
and made one, Don't Know?

--
_
Mark McCulligh, Application Developer / Analyst
Sykes Canada Corporation www.SykesCanada.com
(888)225-6824 ex. 3262
[EMAIL PROTECTED]
"Matthew K. Gold" <[EMAIL PROTECTED]> wrote in message
006d01c2284b$33327c00$7b423b41@oemcomputer">news:006d01c2284b$33327c00$7b423b41@oemcomputer...
> The difference between Dreamweaver and Homesite is that Homesite is easier
> to
> customize, and it doesn't mess with your code the way that Dreamweaver
does.
> If you're happy with Dreamweaver, you should stick with it.  But if you
want
> more control over your code, you
> should consider switching.
>
> Of course, Macromedia recently bought Allaire, so who knows what the next
> version of Homesite will look like...
>
> Matt
>
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 10, 2002 3:39 PM
> Subject: [PHP] Re: Development Tools
>
>
> > For those of you using HomeSite, is it worthwhile for me to install it
if
> I
> > already have DreamWeaver 4 on my PC?  Someone said HomeSite is basically
> > DreamWeaver without the UI interface so I'm wondering if it's possible
to
> use
> > DreamWeaver the same way I would Homesite.
> >
> > Jesse
> >
> > --
> > 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] Dumb session / cookie / password questions

2002-07-10 Thread Martin Clifford

Firstly, you should ALWAYS use an encryption algorithm for passwords.  For my site, I 
used md5() and match with that.  That way, even if someone does get a hold of the 
encrypted password, it's not in their best interest (or maybe it is, if they're bored) 
to crack it.

I haven't testing the following out, but it might work if someone wants to be a 
smartass and type out 
"index.php?user=admingod&pass=adminpass&[EMAIL PROTECTED]" in which they know 
the info.



Putting that at the top of the page would check to see if any information was sent to 
the page from the $_GET superglobal, and if it was, reload the page without any URL 
extensions.  It sounds good in theory, though I haven't tested it, so it might not 
work as I think it should (it NEVER does!).

My $20.00 (big mouth)



Martin Clifford
http://www.completesource.net (Now Open!)

>>> "Chad Day" <[EMAIL PROTECTED]> 07/10/02 04:09PM >>>
I am a little confused about storing stuff in cookies/sessions and how to
prevent spoofing of them.

A user logs in, his e-mail address or user id and password(md5'ed) is
checked against my database.

Assuming it matches, I then set a cookie with the users id + email.

What is to stop someone from spoofing that cookie?  I obviously don't want
to put the password in a cookie .. can someone point me in the direction of
an article about this?  I've searched around, but I'm not finding stuff
about in a preventing spoofing / security aspect.

Thanks,
Chad


-- 
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] Dumb session / cookie / password questions

2002-07-10 Thread Richard Baskett

What I have done in the past is create a session variable that tells me that
the person using that session is valid.  It's really really hard to spoof a
session variable.  I did it this way after awhile since the original way
that I did it was by checking their username/password in the session on
every page hit.. Which when I have over a million hits per day begins to
wear on the database..

So far using a session variable is the best way that I have found.

Cheers!

Rick

"Too much caution is bad for you. By avoiding things you fear, you may let
yourself in for unhappy consequences. It is usually wiser to stand up to a
scary-seeming experience and walk right into it, risking the bruises as hard
knocks. You are likely to find it is not as tough as you had thought.  Or
you may find it plenty tough, but also discover you have what it takes to
handle it." - Norman Vincent Peale

> From: "Chad Day" <[EMAIL PROTECTED]>
> Date: Wed, 10 Jul 2002 16:09:53 -0400
> To: <[EMAIL PROTECTED]>
> Subject: [PHP] Dumb session / cookie / password questions
> 
> I am a little confused about storing stuff in cookies/sessions and how to
> prevent spoofing of them.
> 
> A user logs in, his e-mail address or user id and password(md5'ed) is
> checked against my database.
> 
> Assuming it matches, I then set a cookie with the users id + email.
> 
> What is to stop someone from spoofing that cookie?  I obviously don't want
> to put the password in a cookie .. can someone point me in the direction of
> an article about this?  I've searched around, but I'm not finding stuff
> about in a preventing spoofing / security aspect.
> 
> Thanks,
> Chad
> 
> 
> -- 
> 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] Page not found problem

2002-07-10 Thread Chris Hewitt

Chen,

If the webserver cannot file a file then this is a webserver problem not 
php. You need to look at your IIS configuration/documentation. Sorry I 
can't help further, but I don't use IIS.

HTH
Chris

Chen wrote:

>I use php3 with IIS 5.0. When user typed a no existing .html or php3
>page, they will get a "No input file specified." page. How can I point
>this to a  HTTP Error 400 page? Anything can be set up in the php.ini
>file or in IIS configuration?
>
>Thanks for any help!!
>
>



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




[PHP] Dumb session / cookie / password questions

2002-07-10 Thread Chad Day

I am a little confused about storing stuff in cookies/sessions and how to
prevent spoofing of them.

A user logs in, his e-mail address or user id and password(md5'ed) is
checked against my database.

Assuming it matches, I then set a cookie with the users id + email.

What is to stop someone from spoofing that cookie?  I obviously don't want
to put the password in a cookie .. can someone point me in the direction of
an article about this?  I've searched around, but I'm not finding stuff
about in a preventing spoofing / security aspect.

Thanks,
Chad


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




Re: [PHP] Re: Development Tools

2002-07-10 Thread Matthew K. Gold

The difference between Dreamweaver and Homesite is that Homesite is easier
to
customize, and it doesn't mess with your code the way that Dreamweaver does.
If you're happy with Dreamweaver, you should stick with it.  But if you want
more control over your code, you
should consider switching.

Of course, Macromedia recently bought Allaire, so who knows what the next
version of Homesite will look like...

Matt


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 3:39 PM
Subject: [PHP] Re: Development Tools


> For those of you using HomeSite, is it worthwhile for me to install it if
I
> already have DreamWeaver 4 on my PC?  Someone said HomeSite is basically
> DreamWeaver without the UI interface so I'm wondering if it's possible to
use
> DreamWeaver the same way I would Homesite.
>
> Jesse
>
> --
> 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] Re: Development Tools

2002-07-10 Thread Martin Clifford

Homesite (at least version 5.0) has support for more languages than DW4.  Though I 
believe in DW4 you can customize the syntax highlighting to match any languages that 
*aren't* supported.  I love Homesite 5.  Not to mention that it runs a lot faster than 
DW because it doesn't have to load as many libraries.

Martin

>>> <[EMAIL PROTECTED]> 07/10/02 03:39PM >>>
For those of you using HomeSite, is it worthwhile for me to install it if I
already have DreamWeaver 4 on my PC?  Someone said HomeSite is basically
DreamWeaver without the UI interface so I'm wondering if it's possible to use
DreamWeaver the same way I would Homesite.

Jesse

-- 
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] sort problem

2002-07-10 Thread Chris Hewitt

Ed, Andy

Andy said that the points were in the users table. Table layouts would 
have been useful. It sounds to me as though the users table has not got 
its points up to date and needs updating from the scores table first. 
Then do the select on just the users table.

My 2p (pence, I'm in the UK so we're not in the Dollar or Euro zone, yet!)

Chris

Lazor, Ed wrote:

>I'm not sure if I completely understand what you're asking, but
>
>It sounds like one table has user information.  The second table has a
>record for each user and a field for the total number of points of each
>user.  Something like this:
>
>Users (Table 1)
>-
>ID
>Name
>Address
>etc.
>
>Scores (Table 2)
>-
>ID
>UserID
>Points
>
>
>If this isn't the case, well, you'll probably want to adjust your database
>structure.  This approach allows you to do a simple SQL query like this:
>
>select Users.*, Scores.* from Users, Scores where Users.ID = Scores.UserID
>ORDER BY Scores.Points limit 5
>
>
>
>
>-Original Message-
>From: andy [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, July 10, 2002 10:52 AM
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: [PHP] sort problem
>
>
>Hi guys,
>
>I have a problem sorting values comming out of a db. It is not as easy.
>
>Here is the prob:
>One table containing user points.
>Other table containing reports with rankings
>For each top 10 report (the 10 reports with the most ranking) there are 20
>extra points granted
>
>Now I would like to get the top 5 members out of the db. If I only pull out
>the user table ordered by points desc limit 5 I might miss a user with a top
>10 report and 20 extra points.
>
>So I thought about sorting the array afterwards with asort, but then I loose
>the asoziation with the user_id.
>
>Maybe there is a way to sort the other arrays with the same sorting algo? Or
>a way to include a iff clause in the query?
>
>currently I am doing:
>SELECT
>u_name,
>id,
>points
>FROM user
>WHERE
>points > 0
>ORDER by points desc
>LIMIT 5
>
>and the top10 reports extra.
>
>Has anybody a good idea on that?
>
>Andy
>
>
>



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




  1   2   3   4   >