[PHP] Re: mt_rand()

2002-03-14 Thread David Robley

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Is there a way to seed the mt_rand function with numbers and letters to 
> generate a good password of say 6-10 characters?
> 
> Thanks
> 
> Phillip

As I understand it, mt_rand is a random _number_ generator. But I imagine 
that you could play around a bit with generating random numbers which 
could be used with chr to return a character.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] New Day, New Problem

2002-03-14 Thread jtjohnston

If I change:

$to_path = "c:\\".$date."www\\";

to

$to_path = "c:\\".$date."\\www\\";

It doesn't work? Otherwise, it works.
Can anyone help? Undoubtably something f-ed in the code, or is it a
Windows thing?



###
$date = date ("Ymd");
###
###  Don't forget trailing slash  #
###
$from_path = "c:\\program files\\easyphp\\ccl_www\\";
$to_path = "c:\\".$date."ww\\";
###

if(!is_dir($from_path))
{
echo "failed";
exit;
}else{
rec_copy($from_path, $to_path);
echo "files copies from $from_path and backed up to $to_path";
}

#

function rec_copy ($from_path, $to_path) {
if(!is_dir($to_path))
mkdir($to_path, 0777);

$this_path = getcwd();
 if (is_dir($from_path))
 {
chdir($from_path);
$handle=opendir('.');

while (($file = readdir($handle))!==false)
{
 if (($file != ".") && ($file != "..")) {
  if (is_dir($file))
  {
  rec_copy ($from_path.$file."/",  $to_path.$file."/");
   chdir($from_path);
  }else{
#  echo "error if (is_dir($file))";
  }
  if (is_file($file))
  {
  copy($from_path.$file, $to_path.$file);
  }else{
#  echo "error copy($from_path.$file, $to_path.$file)";
  }
 }#end (($file != ".")
}#end while (($file

closedir($handle);
 }# end if (is_dir
 else{
# echo "if (is_dir($from_path))";
 }
}# end function




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




[PHP] Targetted redirection?

2002-03-14 Thread Michael P. Carel





> >
> > > oh yes i've got your point, but i've tried what you've told us before
> but
> > > still it does not redirect to cover over the frame page.
> >
> > Ah, yes, that'd be a problem... :)
> >
> > I knew what I said worked because I use it to get my pages to break out
> > of About.com's frames.  Man, the audacity of those folks...
> > framing up my content in their ads.
> >
> > In the headers of all of my pages, I send out
> >header('Window-target: _top');
> >
> > Now, doing some testing of why it didn't work for you I found that it
> > only works when pages with that header are one of the pages requested by
> > the initial frameset.  If header is sent out from a page which is
> > requested once the main frameset is constructed, the header doesn't
> > work.
> >
>
What do you mean? could give us some simple script sample to visualize
 more?please..


--Mike



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




Re: [PHP] Targetted redirection?

2002-03-14 Thread Analysis & Solutions

On Thu, Mar 14, 2002 at 08:53:23AM +0800, Michael P. Carel wrote:

> oh yes i've got your point, but i've tried what you've told us before but
> still it does not redirect to cover over the frame page.

Ah, yes, that'd be a problem... :)

I knew what I said worked because I use it to get my pages to break out
of About.com's frames.  Man, the audacity of those folks...  
framing up my content in their ads.

In the headers of all of my pages, I send out
   header('Window-target: _top');

Now, doing some testing of why it didn't work for you I found that it
only works when pages with that header are one of the pages requested by
the initial frameset.  If header is sent out from a page which is
requested once the main frameset is constructed, the header doesn't 
work.

Hope that makes sense...  If not, let me know and I can clarify.

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 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

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




Re: [PHP] PHP Is Inserting (the same) Database Record Multiple Times In My HTML Output

2002-03-14 Thread hugh danaher

Morgan,

You're the second one I've seen using "do".  What "do"? Is it in the php
manual and I missed it?

I changed your code slightly (to major if it's your baby).  It might puke if
the $row is empty for the While loop.  If it does, try an @ sign before the
while.  I didn't test it but it looks like should go. Or, generate some
interesting error messages.
Hope this helps,
Hugh

$db = mysql_connect("localhost", "user", "pass");
mysql_select_db("photo",$db);


$tablei = 0;  //this is the little counter

$result = mysql_query("select photos.filetype,
  photos.bin_data,
  photos.id_files,
  information.id,
  information.desc,
  photos.fulldesc
 from photos,
  information
 order by information.id DESC",$db);
if (!$result)
{
print "So sorry, no results.";
}
else
{
print ("");  //added 
while ($row = mysql_fetch_array($result))
 {
  // Produce the column for each record
 print "
 


image will go here




(this is id number):".$row[id]."




(this is description): ".$row[fulldesc]."



";
$tablei = $tablei + 1;
if ($tablei == "4")
{
print (" ");
$tablei = '0';
}
}
print "":
}


- Original Message -
From: "Morgan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 7:49 PM
Subject: [PHP] PHP Is Inserting (the same) Database Record Multiple Times In
My HTML Output


> (sorry if this shows up twice!)
>
> hi, i'm new to php and am having a problem with a script i'm working on.
> i posted this to alt.php a few days ago and got part of my problem
> fixed, but i still have one problem which i can't figure out and haven't
> gotten an answer to there.
>
> here is the code:
>
>  $db = mysql_connect("localhost", "user", "pass");
> mysql_select_db("photo",$db);
> print ("");
> //this is the little counter
> $tablei = 0;
> //CONNECT TO DATABASE
> $result = mysql_query("select photos.filetype, photos.bin_data,
> photos.id_files, information.id, information.desc, photos.fulldesc from
> photos, information order by information.id DESC",$db);
> if ($row = mysql_fetch_array($result)) {
> do {
>
> // Produce the column for each record
> print (" border=0 cellspacing=2 cellpadding=2>image will go
> here(this is id number):
> ".$row[id]."(this is description):
> ".$row[fulldesc]."");
>
> $tablei = $tablei + 1;
>
> if ($tablei == "4")  {
>  print (" ");
>  $tablei = '0';
> }
> } while($row = mysql_fetch_array($result));
> } else {print ("No Records");}
>
> ?>
>
> an example of the output can be found here:
> http://www.thosenetworkguys.com/test.php
>
> the problem i am having is that the php code is printing each record in
> the database multiple times.  the number of times the record is printed
> is equal to the number of records i have in the database.  if you look
> at the url above, you'll see what i'm getting at.  for instance, i now
> have 5 records in the database and for some reason each individual
> record is being inserted into the page 5 times now.
>
> the code above was suggested as i was trying to create a page that would
> print an html table and start a new row at four columns.  i assume the
> problem i am having now has something to do with the math going on in
> the script to format the html table, but i have tried numerous changes
> to the value and keep getting the same thing.
>
> could someone be kind enough to help out a php newbie and help me figure
> out how to fix this?  i just can't figure it out.
>
> thanks.
>
>
>
>
> --
> 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] `XtOffsetOf' redefined messing up 4.1.2 build

2002-03-14 Thread Phil Glatz

I'm trying to build PHP 4.1.2 with an existing static Apache 1.3.23 
installation, and am having some resolution problems I haven't seen before.

This is on a dusty old Free BSD 2.2.2 system, but I was able to build 4.1.1 
with no problems with the same configuration.  It uses gcc version 2.7.2.1 
--- yes, I know I should upgrade the OS, but since it was able to make 
4.1.1 ok a few weeks ago, I'm guessing that isn't the problem.  I'm 
compiling in postgres and gd support, but have the same problem with them out.


I followed the steps (minimal apache, php, fuill apache), running configure 
each time and doing a make clean.

During the PHP make I see:
gcc -I. -I/usr/local/src/php-4.1.2/sapi/apache -I/usr/local/src/php-4.1.2/main
-I/usr/local/src/php-4.1.2 -I/usr/local/src/apache_1.3.23/src/include
-I/usr/local/src/apache_1.3.23/src/os/unix -I/usr/local/src/php-4.1.2/Zend
-I/usr/local/src/php-4.1.2/ext/xml/expat 
-I/usr/local/src/apache_1.3.23/src/include
-I/usr/local/src/apache_1.3.23/src/os/unix -I/usr/local/src/php-4.1.2/TSRM
-g -O2  -c mod_php4.c && touch mod_php4.lo
In file included from /usr/local/src/apache_1.3.23/src/include/httpd.h:72,
  from mod_php4.c:32:
/usr/local/src/apache_1.3.23/src/include/ap_config.h:1386: warning: 
`XtOffsetOf' redefined
/usr/local/src/php-4.1.2/main/php.h:342: warning: this is the location of 
the previous definition


I tried an Apache build, but it gave me:
===> src/modules/php4
gcc -c  -I../../os/unix -I../../include   -funsigned-char
-I/usr/local/src/php-4.1.2 -I/usr/local/src/php-4.1.2/main 
-I/usr/local/src/php-4.1.2/main
-I/usr/local/src/php-4.1.2/Zend -I/usr/local/src/php-4.1.2/Zend
-I/usr/local/src/php-4.1.2/TSRM -I/usr/local/src/php-4.1.2/TSRM 
-I/usr/local/src/php-4.1.2
-DUSE_EXPAT -I../../lib/expat-lite `../../apaci` -fpic -DSHARED_MODULE
mod_php4.c && mv mod_php4.o mod_php4.so-o
In file included from ../../include/httpd.h:72,
  from mod_php4.c:32:
../../include/ap_config.h:1386: warning: `XtOffsetOf' redefined
/usr/local/src/php-4.1.2/main/php.h:342: warning: this is the location of 
the previous definition
rm -f libphp4.so
gcc -shared -o libphp4.so mod_php4.so-o 
libmodphp4.a  -L/usr/local/src/gd-1.8.4/ 
-L/usr/local/postgres/lib  -L/usr/local/src/gd-1.8.4/ 
-L/usr/local/postgres/lib -Lmodules/php4 -L../modules/php4 
-L../../modules/php4 -lmodphp4   -lpq -lgd -lcrypt -lbind 
-lm  -lcrypt   -lcrypt
ld: libmodphp4.a(zend_alloc.o): RRS text relocation at 0x1cd9 for 
"_zend_unblock_interruptions"
ld: libmodphp4.a(zend_alloc.o): RRS text relocation at 0x1ccd for 
"_alloc_globals"
ld: libmodphp4.a(zend_alloc.o): RRS text relocation at 0x1cc0 for 
"_alloc_globals"

followed by hundreds of similar errors...

thanks



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




Re: [PHP] apache md5 vs. php md5

2002-03-14 Thread Rasmus Lerdorf

Ah, PHP doesn't understand $apr1$ to be an md5 salt.  Not quite sure why
Apache's htpasswd uses that salt instead of the standard $1$

On Thu, 14 Mar 2002, David Ford wrote:

> On the same box, php is generating $1$ md5 hashes properly, two char and
> $apr1$ hashes as DES. The htpassword is generating $apr1$ hashes.
>
> Where is the gadget that needs fixed?
>
> David
>
> Rasmus Lerdorf wrote:
>
> >The PHP one supports that if your OS does.
> >
> >On Thu, 14 Mar 2002, David Ford wrote:
> >
> >>Does anyone have a crypt() function that can use the $apr1$ prefixed
> >>salt that apache's htpasswd uses?
> >>
> >>David
> >>
> >>
> >>
> >>--
> >>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] gmp_mod support

2002-03-14 Thread David Robley

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Hi,
> 
> Was anyone ever successful using gmp extension with PhP 4.1.1?
> 
> Thank you,
> Leon
> 
> -Original Message-
> From: ZILBER,LEONID (HP-NewJersey,ex1) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 14, 2002 5:30 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [PHP] gmp_mod support
> 
> 
> When I add --with-gmp support, I get an error cannot find gmp.h file, while
> I do have ext/gmp/php_gmp.h
> 
> Thank you,
> Leon
> 
> -Original Message-
> From: ZILBER,LEONID (HP-NewJersey,ex1) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 14, 2002 5:26 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP] gmp_mod support
> 
> 
> Hi guys,
> 
> I have compiled PhP 4.1.1 as DSO module specifying --with-gmp support.
> Unfortunatelly, I don't have any of gmp API's available. Does anyone know
> why it doesn't work for me?
> 
> Thank you very much,
> Leon

You may have to give a directory path in the configure string if you have 
gmp (what's gmp) installed in a non-standard place. Do

configure --help |frep gmp to see what configure might need.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] Re: Help Out A Newbie In Configuring PHP.INI

2002-03-14 Thread David Robley

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Note that I'm using the Windows version of PHP.
> 
> Whenever I use a mail() function in my PHP code I get an error of "Failed to
> Connect on line ". So, I'm guessing my error lies in the PHP
> configuration file. I searched around the PHP.INI file for anything
> resembililing "mail". I found these two lines:
> 
> 
> [mail function]
> ; For Win32 only.
> SMTP = alienmelon.com
> 
> ; For Win32 only.
> sendmail_from = [EMAIL PROTECTED]
> 
> 
> I filled them out also, as you see above. Did I fill them out correctly?
> Even though I filled them out as you see above I still get the same error.
> Is the root of the error in the .ini at all?

I have feeling of deja vu here. Is alienmelon.com a valid mail server? If 
not, you need to change it to something that is.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




Re: [PHP] GET values from Checkboxes

2002-03-14 Thread Analysis & Solutions

Hey Daniel:

> When I have Textboxes I can retrieve their values whne the method POST is 
> used by the $HTTP_POST_VARS['name_of_the_textbox']

Here's a sample form:


 
 
 
 
 


When you submit it, the boxes that are checked off go into the $Doms[] 
array.  Those which aren't checked don't.  The array's key will be 
numerical, starting at 0.  The array's values will the the values of the 
checkbox, ie "foo.com"

Enjoy,

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 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

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




[PHP] mt_rand()

2002-03-14 Thread Phillip S. Baker

Is there a way to seed the mt_rand function with numbers and letters to 
generate a good password of say 6-10 characters?

Thanks

Phillip


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




RE: [PHP] Fetching 1 array from either one of 2 possible columns?

2002-03-14 Thread Martin Towell

instead of:

$esc_subject = $row["SUBJECT1"];

use:

$esc_subject1 = $row["SUBJECT1"];
$esc_subject2 = $row["SUBJECT2"];

and have some logic, in php, later to determine which one(s) to display

-Original Message-
From: phplist [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 2:55 PM
To: 'Martin Towell'; [EMAIL PROTECTED]
Subject: RE: [PHP] Fetching 1 array from either one of 2 possible
columns?


I apologize if I wasn't clear in my email. The query part is fine I
think, as I tested it through the myPHPAdmin and had no problem with the
results (but brackets are good though).

It's this part I'm not too sure about. AS you can see, it's just using
["SUBJECT1"] as shown. Correct me if I'm wrong, but even though I have 2
results, the final output would only show 1 because it's only showing
the match in SUBJECT1?

> while ($row = mysql_fetch_array($sql_result)) {
> 
>   $esc_organization = $row["ORGANIZATION"];
>   $esc_desc = $row["DESCRIPTION"];
>   $esc_url = $row["URL"];
>   $esc_subject = $row["SUBJECT1"];
>   $esc_geographic = $row["GEOGRAPHIC"];


> -Original Message-
> From: Martin Towell [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, March 14, 2002 7:42 PM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Fetching 1 array from either one of 2 
> possible columns?
> 
> 
> use brackets
> 
> where (sub1 or sub2) and geo
> 
> -Original Message-
> From: phplist [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 2:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Fetching 1 array from either one of 2 possible columns?
> 
> 
> I'm working on a query by selection type of form, where if a 
> user selects a subject to get information. Each database 
> entry will have 2 subject fields, Subject 1 being the main 
> subject and Subject 2 being the cross-subject. A table is set 
> up like this:
> 
> +--+--+--+--+--+-+
> | ID   | Organization | URL  | SUBJECT1 | SUBJECT2 | Geographic  |
> +--+--+--+--+--+-+
> |  1   | Acme | www  |  Math|  English | Canada  |
> |  2   | Loony Toons  | www  |  Comedy  |  Math| Brazil  |
> 
> ...
> 
> 
> The idea is that the query will check the database to see if 
> $Subject has a match in either Subject1 or Subject2. the 
> geographic is an optional selection. If I select Math as a 
> subject, and left the Geographic option unselected, I want it 
> to go into either Subject1 and Subject2 to find Math. In this 
> case both records would be a hit.
> 
> Below is my query setup and formatting:
> ***
> $sql = "SELECT * FROM links WHERE SUBJECT1='$subject' OR 
> SUBJECT2='$subject' AND GEOGRAPHIC='$geographic'
>ORDER BY ORGANIZATION ASC";
> 
> $sql_result = mysql_query($sql);
> if (!$sql_result) {
>echo "Can't execute $sql " . mysql_error();
>exit;
>   }
> 
> // organizes data in an orderly manner (ie bulleted area)
> while ($row = mysql_fetch_array($sql_result)) {
> 
>   $esc_organization = $row["ORGANIZATION"];
>   $esc_desc = $row["DESCRIPTION"];
>   $esc_url = $row["URL"];
>   $esc_subject = $row["SUBJECT1"];
>   $esc_geographic = $row["GEOGRAPHIC"];
>   
>   $organization = stripslashes($esc_organization);
>   $description = stripslashes($esc_desc);
>   $url = stripslashes($esc_url);
>   $subject = stripslashes($esc_subject);
>   $geographic = stripslashes($esc_geographic);
> 
>   $option_block .= "
>   
>   http://$url\";>$organization
>   $description
>   URL: http://$url\";>$url\n";
> }
> 
> Now, of course, if I were to use this, it will only use the 
> Subject1 data. How do I tell it to use the results from 
> either Subject 1 or Subject 2?
> 
> Thanks in advance,
> 
> Laurie M. Landry
> 
> 
> 
> -- 
> 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] Fetching 1 array from either one of 2 possible columns?

2002-03-14 Thread phplist

I apologize if I wasn't clear in my email. The query part is fine I
think, as I tested it through the myPHPAdmin and had no problem with the
results (but brackets are good though).

It's this part I'm not too sure about. AS you can see, it's just using
["SUBJECT1"] as shown. Correct me if I'm wrong, but even though I have 2
results, the final output would only show 1 because it's only showing
the match in SUBJECT1?

> while ($row = mysql_fetch_array($sql_result)) {
> 
>   $esc_organization = $row["ORGANIZATION"];
>   $esc_desc = $row["DESCRIPTION"];
>   $esc_url = $row["URL"];
>   $esc_subject = $row["SUBJECT1"];
>   $esc_geographic = $row["GEOGRAPHIC"];


> -Original Message-
> From: Martin Towell [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, March 14, 2002 7:42 PM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Fetching 1 array from either one of 2 
> possible columns?
> 
> 
> use brackets
> 
> where (sub1 or sub2) and geo
> 
> -Original Message-
> From: phplist [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 2:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Fetching 1 array from either one of 2 possible columns?
> 
> 
> I'm working on a query by selection type of form, where if a 
> user selects a subject to get information. Each database 
> entry will have 2 subject fields, Subject 1 being the main 
> subject and Subject 2 being the cross-subject. A table is set 
> up like this:
> 
> +--+--+--+--+--+-+
> | ID   | Organization | URL  | SUBJECT1 | SUBJECT2 | Geographic  |
> +--+--+--+--+--+-+
> |  1   | Acme | www  |  Math|  English | Canada  |
> |  2   | Loony Toons  | www  |  Comedy  |  Math| Brazil  |
> 
> ...
> 
> 
> The idea is that the query will check the database to see if 
> $Subject has a match in either Subject1 or Subject2. the 
> geographic is an optional selection. If I select Math as a 
> subject, and left the Geographic option unselected, I want it 
> to go into either Subject1 and Subject2 to find Math. In this 
> case both records would be a hit.
> 
> Below is my query setup and formatting:
> ***
> $sql = "SELECT * FROM links WHERE SUBJECT1='$subject' OR 
> SUBJECT2='$subject' AND GEOGRAPHIC='$geographic'
>ORDER BY ORGANIZATION ASC";
> 
> $sql_result = mysql_query($sql);
> if (!$sql_result) {
>echo "Can't execute $sql " . mysql_error();
>exit;
>   }
> 
> // organizes data in an orderly manner (ie bulleted area)
> while ($row = mysql_fetch_array($sql_result)) {
> 
>   $esc_organization = $row["ORGANIZATION"];
>   $esc_desc = $row["DESCRIPTION"];
>   $esc_url = $row["URL"];
>   $esc_subject = $row["SUBJECT1"];
>   $esc_geographic = $row["GEOGRAPHIC"];
>   
>   $organization = stripslashes($esc_organization);
>   $description = stripslashes($esc_desc);
>   $url = stripslashes($esc_url);
>   $subject = stripslashes($esc_subject);
>   $geographic = stripslashes($esc_geographic);
> 
>   $option_block .= "
>   
>   http://$url\";>$organization
>   $description
>   URL: http://$url\";>$url\n";
> }
> 
> Now, of course, if I were to use this, it will only use the 
> Subject1 data. How do I tell it to use the results from 
> either Subject 1 or Subject 2?
> 
> Thanks in advance,
> 
> Laurie M. Landry
> 
> 
> 
> -- 
> 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 Is Inserting (the same) Database Record Multiple Times In My HTML Output

2002-03-14 Thread Morgan

(sorry if this shows up twice!)

hi, i'm new to php and am having a problem with a script i'm working on.
i posted this to alt.php a few days ago and got part of my problem
fixed, but i still have one problem which i can't figure out and haven't
gotten an answer to there.

here is the code:

");
//this is the little counter
$tablei = 0;
//CONNECT TO DATABASE
$result = mysql_query("select photos.filetype, photos.bin_data,
photos.id_files, information.id, information.desc, photos.fulldesc from
photos, information order by information.id DESC",$db);
if ($row = mysql_fetch_array($result)) {
do {

// Produce the column for each record
print ("image will go
here(this is id number):
".$row[id]."(this is description):
".$row[fulldesc]."");

$tablei = $tablei + 1;

if ($tablei == "4")  {
 print (" ");
 $tablei = '0';
}
} while($row = mysql_fetch_array($result));
} else {print ("No Records");}

?>

an example of the output can be found here:
http://www.thosenetworkguys.com/test.php

the problem i am having is that the php code is printing each record in
the database multiple times.  the number of times the record is printed
is equal to the number of records i have in the database.  if you look
at the url above, you'll see what i'm getting at.  for instance, i now
have 5 records in the database and for some reason each individual
record is being inserted into the page 5 times now.

the code above was suggested as i was trying to create a page that would
print an html table and start a new row at four columns.  i assume the
problem i am having now has something to do with the math going on in
the script to format the html table, but i have tried numerous changes
to the value and keep getting the same thing.

could someone be kind enough to help out a php newbie and help me figure
out how to fix this?  i just can't figure it out.

thanks.




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




[PHP] inconsistent mail sending

2002-03-14 Thread Michael P. Carel

What wrong with this code? It does'nt  consistently send email with the
users in that table. Sometimes it  duplicate  sending to a certain users and
sometimes it doesnt.
Please help



$query=("Select * from $users_tablename where Group_Id='3' ");
 $result = mysql_query($query);
if(!$result)error_message(sql_error());

 while($query_data=mysql_fetch_array($result)){

 $E_mail=$query_data[E_mail];
 $Title=$query_data[Title];
 $Nickname=$query_data[Nickname];

 $mail_body = "Sir $Nickname, \n \n";

 $subject="For Approval 8D no. $Dno";

  if(mail($E_mai, $subject, $mail_body)){
  print("Message Sent");

  }else{

  error_message("Failed to Notify Mr. $Title! Contact your Systems
Administrator immediately! ");

  }





Regards,

Mike


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




RE: [PHP] Fetching 1 array from either one of 2 possible columns?

2002-03-14 Thread Martin Towell

use brackets

where (sub1 or sub2) and geo

-Original Message-
From: phplist [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 2:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Fetching 1 array from either one of 2 possible columns?


I'm working on a query by selection type of form, where if a user
selects a subject to get information. Each database entry will have 2
subject fields, Subject 1 being the main subject and Subject 2 being the
cross-subject. A table is set up like this:

+--+--+--+--+--+-+
| ID   | Organization | URL  | SUBJECT1 | SUBJECT2 | Geographic  |
+--+--+--+--+--+-+
|  1   | Acme | www  |  Math|  English | Canada  |
|  2   | Loony Toons  | www  |  Comedy  |  Math| Brazil  |

...


The idea is that the query will check the database to see if $Subject
has a match in either Subject1 or Subject2. the geographic is an
optional selection. If I select Math as a subject, and left the
Geographic option unselected, I want it to go into either Subject1 and
Subject2 to find Math. In this case both records would be a hit.

Below is my query setup and formatting:
***
$sql = "SELECT * FROM links WHERE SUBJECT1='$subject' OR
SUBJECT2='$subject' AND GEOGRAPHIC='$geographic'
 ORDER BY ORGANIZATION ASC";

$sql_result = mysql_query($sql);
if (!$sql_result) {
   echo "Can't execute $sql " . mysql_error();
   exit;
}

// organizes data in an orderly manner (ie bulleted area)
while ($row = mysql_fetch_array($sql_result)) {

$esc_organization = $row["ORGANIZATION"];
$esc_desc = $row["DESCRIPTION"];
$esc_url = $row["URL"];
$esc_subject = $row["SUBJECT1"];
$esc_geographic = $row["GEOGRAPHIC"];

$organization = stripslashes($esc_organization);
$description = stripslashes($esc_desc);
$url = stripslashes($esc_url);
$subject = stripslashes($esc_subject);
$geographic = stripslashes($esc_geographic);

$option_block .= "

http://$url\";>$organization
$description
URL: http://$url\";>$url\n";
}

Now, of course, if I were to use this, it will only use the Subject1
data. How do I tell it to use the results from either Subject 1 or
Subject 2?

Thanks in advance,

Laurie M. Landry



-- 
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] Fetching 1 array from either one of 2 possible columns?

2002-03-14 Thread phplist

I'm working on a query by selection type of form, where if a user
selects a subject to get information. Each database entry will have 2
subject fields, Subject 1 being the main subject and Subject 2 being the
cross-subject. A table is set up like this:

+--+--+--+--+--+-+
| ID   | Organization | URL  | SUBJECT1 | SUBJECT2 | Geographic  |
+--+--+--+--+--+-+
|  1   | Acme | www  |  Math|  English | Canada  |
|  2   | Loony Toons  | www  |  Comedy  |  Math| Brazil  |

...


The idea is that the query will check the database to see if $Subject
has a match in either Subject1 or Subject2. the geographic is an
optional selection. If I select Math as a subject, and left the
Geographic option unselected, I want it to go into either Subject1 and
Subject2 to find Math. In this case both records would be a hit.

Below is my query setup and formatting:
***
$sql = "SELECT * FROM links WHERE SUBJECT1='$subject' OR
SUBJECT2='$subject' AND GEOGRAPHIC='$geographic'
 ORDER BY ORGANIZATION ASC";

$sql_result = mysql_query($sql);
if (!$sql_result) {
   echo "Can't execute $sql " . mysql_error();
   exit;
}

// organizes data in an orderly manner (ie bulleted area)
while ($row = mysql_fetch_array($sql_result)) {

$esc_organization = $row["ORGANIZATION"];
$esc_desc = $row["DESCRIPTION"];
$esc_url = $row["URL"];
$esc_subject = $row["SUBJECT1"];
$esc_geographic = $row["GEOGRAPHIC"];

$organization = stripslashes($esc_organization);
$description = stripslashes($esc_desc);
$url = stripslashes($esc_url);
$subject = stripslashes($esc_subject);
$geographic = stripslashes($esc_geographic);

$option_block .= "

http://$url\";>$organization
$description
URL: http://$url\";>$url\n";
}

Now, of course, if I were to use this, it will only use the Subject1
data. How do I tell it to use the results from either Subject 1 or
Subject 2?

Thanks in advance,

Laurie M. Landry



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




RE: [PHP] GET values from Checkboxes

2002-03-14 Thread Martin Towell

There will be a correspoding variable/index set is the checkbox is checked,
no value is set for uncheck boxes

Martin

-Original Message-
From: Daniel Ferreira Castro [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 1:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] GET values from Checkboxes


When I have Textboxes I can retrieve their values whne the method POST is 
used by the $HTTP_POST_VARS['name_of_the_textbox']

But when I try to use it on a checkbox it doesn't work.
How can I retireve that value from a checkbox, to know if it was checked or 
not?

Thank you

Daniel F. Castro
[EMAIL PROTECTED]

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




Re: [PHP] apache md5 vs. php md5

2002-03-14 Thread David Ford

On the same box, php is generating $1$ md5 hashes properly, two char and 
$apr1$ hashes as DES. The htpassword is generating $apr1$ hashes.

Where is the gadget that needs fixed?

David

Rasmus Lerdorf wrote:

>The PHP one supports that if your OS does.
>
>On Thu, 14 Mar 2002, David Ford wrote:
>
>>Does anyone have a crypt() function that can use the $apr1$ prefixed
>>salt that apache's htpasswd uses?
>>
>>David
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [PHP] XML char data parsing

2002-03-14 Thread Analysis & Solutions

On Thu, Mar 14, 2002 at 05:18:03PM -0500, Thalis A. Kalfigopoulos wrote:

> If I send just a line of simple text (like "The quick brown fox
> drowned") for XML parsing, why doesn't it call the function which I
> declare for character data handling? It doesn't even give me an error
> :-( Is it wrong to have plain text as input for XML parsing?

Why, as a matter of fact, yes!

The data going into the parser needs to be valid, well-formed, XML.  I
assume you didn't get an error message because you didn't ask to see the
error message.  The most basic thing you can do is (assuming you've
already declared your XML Parser functions...

   $Contents = 'The quick brown fox drowned';

   if ( xml_parse($Parser, $Contents) ) {
  echo "Yipee!\n";
   } else {
  echo "Rejected by parser:\n";
  echo xml_error_string(xml_get_error_code($Parser));
   }

Enjoy,

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 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

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




[PHP] GET values from Checkboxes

2002-03-14 Thread Daniel Ferreira Castro

When I have Textboxes I can retrieve their values whne the method POST is 
used by the $HTTP_POST_VARS['name_of_the_textbox']

But when I try to use it on a checkbox it doesn't work.
How can I retireve that value from a checkbox, to know if it was checked or 
not?

Thank you

Daniel F. Castro
[EMAIL PROTECTED]



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/02



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


Re: [PHP] vectoring/switchyard php file

2002-03-14 Thread mnc

On Thu, 14 Mar 2002, Dennis Gearon wrote:
> So, before I start, I want to make sure it is what I want. Does anybody 
> have experience in using 'mod_rewrite' and can answer this question?
> 
> Does all the cookie, post, and get varibles plus all headers get
> preserved in a 'mod_rewrite' action?

Cookies and POST data are preserved. GET arguments only make it if your 
rewrite rules handle them.

miguel


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




Re: [PHP] apache md5 vs. php md5

2002-03-14 Thread Rasmus Lerdorf

The PHP one supports that if your OS does.

On Thu, 14 Mar 2002, David Ford wrote:

> Does anyone have a crypt() function that can use the $apr1$ prefixed
> salt that apache's htpasswd uses?
>
> David
>
>
>
> --
> 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] include() question

2002-03-14 Thread Dave

Missing close " for one.
 v
include("index.php?var='$var'");
 ^
and you don't need to pass the $var to the include since it will be included,
and obviously you already have it declared.

if index.php contained


and the file you are in contained


then PHP reads this as


as such, no need to pass $var to the file since the file is included then
parsed.

Dave





>-Original Message-
>From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, March 14, 2002 4:20 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] include() question
>
>
>Why doesn't this work...
>
>include("index.php?var='$var');
>
>I want to include a page in my code and send a variable to it but I get
>some funky error.
>
>THANKS!!
>


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




[PHP] Help Out A Newbie In Configuring PHP.INI

2002-03-14 Thread Dr. Shim

Note that I'm using the Windows version of PHP.

Whenever I use a mail() function in my PHP code I get an error of "Failed to
Connect on line ". So, I'm guessing my error lies in the PHP
configuration file. I searched around the PHP.INI file for anything
resembililing "mail". I found these two lines:


[mail function]
; For Win32 only.
SMTP = alienmelon.com

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]


I filled them out also, as you see above. Did I fill them out correctly?
Even though I filled them out as you see above I still get the same error.
Is the root of the error in the .ini at all?


Thanks for any help ahead of time.



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




[PHP] apache md5 vs. php md5

2002-03-14 Thread David Ford

Does anyone have a crypt() function that can use the $apr1$ prefixed 
salt that apache's htpasswd uses?

David



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




Re: [PHP] mail() and qmail

2002-03-14 Thread Jim Koutoumis

qmail here, working fine.

I have the following set in php.ini :
sendmail_path   =/var/qmail/bin/qmail-inject

Jim.

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Thursday 14 March 2002 22:56, Daniel Reichenbach wrote:
> > > I use qmail with PHP on a RH v 7.0 system.  Works like a charm.
> >
> > Same here, RH 7.0 with some updates from RPM.
> >
> > > I compiled/installed qmail from source.  Installed RH,
> >
> > Apache and PHP from source, too.
> >
> > Do you have a possibility to look at a phpinfo() page? There the
> > option your php version uses for sendmail_path should be visible?
> > Would be interesting to know what parameters your php version
> > uses. Mine uses sendmail -t -i.
>
> I'm using qmail and these are the settings in php.ini:
>
> --
> [mail function]
> ; For Win32 only.
> SMTP = localhost
>
> ; For Win32 only.
> sendmail_from = [EMAIL PROTECTED]
>
> ; For Unix only. You may supply arguments as well (default:
'sendmail -t -i').
> ;sendmail_path =
> --
>
>
> In other words it's the default settings.
>
> RH7.1, php-4.0.6, qmail 1.03
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> Post proelium, praemium.
> [After the battle, the reward.]
> */



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




[PHP] IMAP

2002-03-14 Thread Jason D. Williard

I would like to begin working with mail servers in PHP, with the intent of
creating a webmail system for my site.  I am trying to get things working,
but am not exactly sure how to get everything installed and configured
correctly.  I know that I have to install a c-client library, but am not
sure how to do this.  Not meaning to sound too helpless, could someone give
me some assistance installing and configuring the c-client?

 -- Jason W.



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




Re: [PHP] regular expression for (NOT 'word')

2002-03-14 Thread Michael Sims

At 05:52 PM 3/14/2002 +0200, Ando Saabas wrote:
>Ok let me explain my problem further some. I need the regular expression to
>purify the html page from script tags:
>I used: $file = eregi_replace("(.*)", " ", $file);
>Now this works fine, until theres a webpage like:
>
>script data.
>Some webpage data
>another script data 
>
>so the regexp above replaces everything between first  and last
> ie the webpage data also.
>So i thought to change the regexp to something like this:  $file =
>eregi_replace("(NOT(script))", " ", $file);
>where NOT(script) would match everything that contains word script

I suspect that POSIX extended regular expression functions will not be 
sufficient to do what you want.  Most likely you will need to use the PRCE 
functions (preg_replace, etc.)  I tried to come up with a regex to do what 
you are looking for but it's beyond me.  I think it may have something to 
do with what is called a "negative look ahead assertion", although I 
couldn't personally get it to work.  You can read about negative look ahead 
assertions here:

http://www.perldoc.com/perl5.6.1/pod/perlre.html

You may be better off asking this question on a Perl newsgroup or mailing 
list...


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




Re: [PHP] $HTTP_SESSION_VARS with unset()

2002-03-14 Thread Jim Lucas [php]

I must ask first, why don't you just use the session_destroy() function?

it will kill all related sessions variables and reset the PHPSESSID (if
that's you have it named)

Jim Lucas
www.bend.com

- Original Message -
From: "SpamSucks86" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 4:54 PM
Subject: [PHP] $HTTP_SESSION_VARS with unset()


> when someone logs in, it sets $HTTP_SESSION_VARS with the appropriate
> information. to log them out, I tried just using
> unset($HTTP_SESSION_VARS['valid_user']) but it doesn't actually remove
> it from the session. it will only work if valid_user was set on the same
> script call (for example, if it logs me in and then immediately logs me
> out without making another call to the script). How come
> $HTTP_SESSION_VARS won't destroy session variables unless they're
> created during the same script call? Or maybe it just has to do with if
> $HTTP_SESSION_VARS creates any variable before it deletes any. Thanks
> for your help =)
>


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




Re: [PHP] require() vs include()

2002-03-14 Thread Jim Lucas [php]

Plus, depending on how you are calling the file.  Meaning if the file name
that you are calling is a static file name or dynamic file name

require() and require_once()  will include a file before the php parser
starts its job, but this will only happen if the name isn't dynamic.

meaning that if you have this

require("myfile.inc");  //static
and
require($var. ".inc"); //dynamic

the first one will be included into the before parsing and the second will
wait until the parser comes along and defines the $var value.

if you call require()  or require_once() with a variable in the file handler
name space, it will downgrade (in a way) to just working like an include()
or include_once()

with include() or include_once() it doesn't matter if the file handle name
has a variable in it.  it will always include the file after the parser
starts its job.

Jim Lucas
www.bend.com

- Original Message -
From: "SHEETS,JASON (Non-HP-Boise,ex1)" <[EMAIL PROTECTED]>
To: "'David McInnis'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 3:56 PM
Subject: RE: [PHP] require() vs include()


> They are much the same, both "include" a file.
>
> To quote the PHP manual "require() and include() are identical in every
way
> except how they handle failure. include() produces a Warning while
require()
> results in a Fatal Error. In other words, don't hesitate to use require()
if
> you want a missing file to halt processing of the page. include() does not
> behave this way, the script will continue regardless. Be sure to have an
> appropriate include_path setting as well."
>
> That said I would use require_once and include_once instead of just
include
> and require, these functions ensure the file is only included once which
> prevents a lot of problems.
>
> Jason
>
> -Original Message-
> From: David McInnis [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 14, 2002 4:47 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] require() vs include()
>
>
> Are these redundant functions or are they different?  I seem to be able
> to use the interchangeably.
>
> David McInnis
>
>
>
> --
> 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_SESSION_VARS with unset()

2002-03-14 Thread SpamSucks86

when someone logs in, it sets $HTTP_SESSION_VARS with the appropriate
information. to log them out, I tried just using
unset($HTTP_SESSION_VARS['valid_user']) but it doesn't actually remove
it from the session. it will only work if valid_user was set on the same
script call (for example, if it logs me in and then immediately logs me
out without making another call to the script). How come
$HTTP_SESSION_VARS won't destroy session variables unless they're
created during the same script call? Or maybe it just has to do with if
$HTTP_SESSION_VARS creates any variable before it deletes any. Thanks
for your help =)



[PHP] Re: vectoring/switchyard php file

2002-03-14 Thread Joe Webster

RewriteRule ^([[:digit:]]+)(/*)$ /__obj.php\?id\=$1 [QSA]

We use this rule to rewrite

/1234

to become

__obj.php?id=1234

and pass and Query String Arguments (QSA) like ?foo=bar and so on.

-Joe


"Dennis Gearon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I seem to be getting closer to finding out how to make all requests for
> html,php,etc go through ONE particular file, and then do content
> management via that file and permissions. It involves 'mod_rewrite' in
> Apache.
>
> Whoa! What a learning curve for the module, though!
>
> So, before I start, I want to make sure it is what I want. Does anybody
> have experience in using 'mod_rewrite' and can answer this question?
>
> Does all the cookie, post, and get varibles plus all headers get
> preserved in a 'mod_rewrite' action?
> --
>
> If You want to buy computer parts, see the reviews at:
> http://www.cnet.com/
> **OR EVEN BETTER COMPILATIONS**!!
> http://sysopt.earthweb.com/userreviews/products/



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




RE: [PHP] require() vs include()

2002-03-14 Thread SHEETS,JASON (Non-HP-Boise,ex1)

They are much the same, both "include" a file.

To quote the PHP manual "require() and include() are identical in every way
except how they handle failure. include() produces a Warning while require()
results in a Fatal Error. In other words, don't hesitate to use require() if
you want a missing file to halt processing of the page. include() does not
behave this way, the script will continue regardless. Be sure to have an
appropriate include_path setting as well."

That said I would use require_once and include_once instead of just include
and require, these functions ensure the file is only included once which
prevents a lot of problems.

Jason

-Original Message-
From: David McInnis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 4:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] require() vs include()


Are these redundant functions or are they different?  I seem to be able
to use the interchangeably.

David McInnis



-- 
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] Sessions and multiple domains

2002-03-14 Thread James Arthur

Hi

I have this problem is that the website I am designing can be accessed using 
multiple addresses: wired.st-and.ac.uk, wired.st-andrews.ac.uk, 
wiredsoc.st-and.ac.uk or wired (internally). The trouble is that the cookie 
is locked to one address. For instance, if I initialise it in 
wired.st-and.ac.uk then the session variables I register will not be used in 
wired.st-andrews.ac.uk or wired. Does anyone have a way around this?

--jaa


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




Re: [PHP] DHTML Trouble please help

2002-03-14 Thread Georgie Casey

fix ure clock!!
"Erik Price" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> On Saturday, March 13, 2010, at 10:15  PM, Jennifer Downey wrote:
>
> > I am no DHTML expert and don't even know the language also didn't know
> > where
> > to post this. But after today I am going to learn.
>
> Isn't DHTML more of a buzzword?  i don't think it's really a language.
> It just refers to using scripting languages and plugins like JavaScript,
> Flash, CSS tricks, and even server-side manipulation to achieve an
> effect.
>
> There's a lot of stuff on this topic at http://dhtmlcentral.com/ if
> you're interested.
>
> Erik
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>



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




[PHP] require() vs include()

2002-03-14 Thread David McInnis

Are these redundant functions or are they different?  I seem to be able
to use the interchangeably.

David McInnis



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




[PHP] pg_connect and error messages

2002-03-14 Thread David Ford

Is there any way to get an error message via pg_errormessage() when 
using pg_connect() and it fails?

Currently I have $conn=@pg_connect(), I don't want error text showing up 
where the HTML cursor is, I intend to put any error text elsewhere. 
 Unfortunately, $conn is FALSE and pg_errormessage() doesn't like that.

Suggestions?

David



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




RE: [PHP] gmp_mod support

2002-03-14 Thread ZILBER,LEONID (HP-NewJersey,ex1)

Hi,

Was anyone ever successful using gmp extension with PhP 4.1.1?

Thank you,
Leon

-Original Message-
From: ZILBER,LEONID (HP-NewJersey,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 5:30 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] gmp_mod support


When I add --with-gmp support, I get an error cannot find gmp.h file, while
I do have ext/gmp/php_gmp.h

Thank you,
Leon

-Original Message-
From: ZILBER,LEONID (HP-NewJersey,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 5:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] gmp_mod support


Hi guys,

I have compiled PhP 4.1.1 as DSO module specifying --with-gmp support.
Unfortunatelly, I don't have any of gmp API's available. Does anyone know
why it doesn't work for me?

Thank you very much,
Leon

---
Leon Zilber
HP Internet Operation R&D Lab
phone: 973.443.78.82
email: [EMAIL PROTECTED]

-- 
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] Re: Problem function mail()

2002-03-14 Thread David Robley

In article <000a01c1cb5f$a5cdbca0$b850010a@AGA253DISUP004>, 
[EMAIL PROTECTED] says...
> Hi,
> 
> I have a problem in my build php-4.1.2. 
> 
> config.cache :
> ...
> ac_cv_path_PROG_SENDMAIL=${ac_cv_path_PROG_SENDMAIL=/usr/sbin/sendmail}
> ...
> 
> When i run my script php the follow error happens:
> 
>   Warning: mail() is not supported in this PHP build in /usr/httpd/cnm/fale.php on 
>line 45
> 
>   What the problem ?
> 
>   Kleyson Rios.

Configure is expecting to find sendmail already installed on your system; 
particularly it seems to be looking for a specific file and mnot finding 
it.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] Re: Compile problem

2002-03-14 Thread David Robley

In article , 
[EMAIL PROTECTED] says...
> 
>   could anybody help me out, while compiling and Making PHP
> its going fine, but I couldn't get any php binary file instead a
> file named 'libphp4.la' was created. 
>   I want to compile it as a standalone binary as a normal
> user.

Make sure you don't have with-apache or with-apxs in your configure; if 
they aren't there and it still doesn't work perhaps post your configure 
command. Assuming this is on *nux.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] vectoring/switchyard php file

2002-03-14 Thread Dennis Gearon

I seem to be getting closer to finding out how to make all requests for
html,php,etc go through ONE particular file, and then do content
management via that file and permissions. It involves 'mod_rewrite' in
Apache.

Whoa! What a learning curve for the module, though!

So, before I start, I want to make sure it is what I want. Does anybody 
have experience in using 'mod_rewrite' and can answer this question?

Does all the cookie, post, and get varibles plus all headers get
preserved in a 'mod_rewrite' action?
-- 

If You want to buy computer parts, see the reviews at:
http://www.cnet.com/
**OR EVEN BETTER COMPILATIONS**!!
http://sysopt.earthweb.com/userreviews/products/

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




RE: [PHP] gmp_mod support

2002-03-14 Thread ZILBER,LEONID (HP-NewJersey,ex1)

When I add --with-gmp support, I get an error cannot find gmp.h file, while
I do have ext/gmp/php_gmp.h

Thank you,
Leon

-Original Message-
From: ZILBER,LEONID (HP-NewJersey,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 5:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] gmp_mod support


Hi guys,

I have compiled PhP 4.1.1 as DSO module specifying --with-gmp support.
Unfortunatelly, I don't have any of gmp API's available. Does anyone know
why it doesn't work for me?

Thank you very much,
Leon

---
Leon Zilber
HP Internet Operation R&D Lab
phone: 973.443.78.82
email: [EMAIL PROTECTED]

-- 
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] gmp_mod support

2002-03-14 Thread ZILBER,LEONID (HP-NewJersey,ex1)

Hi guys,

I have compiled PhP 4.1.1 as DSO module specifying --with-gmp support.
Unfortunatelly, I don't have any of gmp API's available. Does anyone know
why it doesn't work for me?

Thank you very much,
Leon

---
Leon Zilber
HP Internet Operation R&D Lab
phone: 973.443.78.82
email: [EMAIL PROTECTED]

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




[PHP] XML char data parsing

2002-03-14 Thread Thalis A. Kalfigopoulos

If I send just a line of simple text (like "The quick brown fox drowned") for XML 
parsing, why doesn't it call the function which I declare for character data handling? 
It doesn't even give me an error :-( Is it wrong to have plain text as input for XML 
parsing?

cheers,
--t.



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




Re: [PHP] include() question

2002-03-14 Thread Lars Torben Wilson

On Thu, 2002-03-14 at 13:20, Phil Schwarzmann wrote:
> Why doesn't this work...
>  
> include("index.php?var='$var');
>  
> I want to include a page in my code and send a variable to it but I get
> some funky error.
>  
> THANKS!!

Please read this page carefully, especially the third paragraph and 
Examples 11.3 and 11.5: 

 http://www.php.net/manual/en/function.include.php

Hopefully that's help clear it up.

Essentially, you should be doing this:

  $var = 'someval';
  include('index.php');


Hope this helps,

Torben

-- 
 Torben Wilson <[EMAIL PROTECTED]>
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


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




Re: [PHP] include() question

2002-03-14 Thread Erik Price

Oh I see.  Sorry, i was thinking apples and you guys were talking about 
oranges.  I just ran into this problem a little while ago, that's why I 
felt the need to butt in.

Erik



On Thursday, March 14, 2002, at 05:08  PM, Edward van Bilderbeek - Bean 
IT wrote:

> Jep, that was what I meant... sorry Erik, didn't read your question 
> right...
>
> Edward
>
> - Original Message -
> From: "Jan Rademaker" <[EMAIL PROTECTED]>
> To: "Erik Price" <[EMAIL PROTECTED]>
> Cc: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; "Phil
> Schwarzmann" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, March 14, 2002 11:03 PM
> Subject: Re: [PHP] include() question
>
>
>> On Thu, 14 Mar 2002, Erik Price wrote:
>>
>>>
>>> On Thursday, March 14, 2002, at 04:34  PM, Edward van Bilderbeek - 
>>> Bean
>>> IT wrote:
>>>
 you can't use a variable as a parameter for the included file...
> because
 include does nothing else then putting the text of the include file 
 on
 the
 place of the include statement...
>>>
>>> Are you sure about this?  I'm almost positive that PHP is flexible 
>>> about
>>> accepting variables or strings as function arguments in most cases.  I
>>> just tested it, and it seems to work fine...
>>>
>>> $includefile = './leftnavigation.inc';
>>> include($includefile);
>>>
>> I think what Edward means is that you can't pass parameters to an 
>> included
>> file, like include("some.inc?var=value");
>> That's true, at least for local
>> files. include("http://remotesite/some.php?var=value";) will work, as 
>> long
>> as remotesite has php installed, of course.
>>
>> --
>> Jan Rademaker <[EMAIL PROTECTED]>
>> http://www.ottobak.com
>>
>>
>
>







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] include() question

2002-03-14 Thread Erik Price


On Thursday, March 14, 2002, at 05:03  PM, Jan Rademaker wrote:

> I think what Edward means is that you can't pass parameters to an 
> included
> file, like include("some.inc?var=value");
> That's true, at least for local
> files. include("http://remotesite/some.php?var=value";) will work, as 
> long
> as remotesite has php installed, of course.

yes, a very clean way to do it (that I've used successfully) is 
something like:

$current_page = "User Login";
if ($badlogin) {
header("Location: http://domain.com/~eprice/badlogin.php?errormsg="; . 
$current_page);
}

This cleanly separates the string from the variable, but they are 
concatenated before being passed as an argument to the header() 
function.  This passes the name of the script as a querystring variable 
called $_GET['errormsg'], so that the receiving script can take some 
action based on where the user was sent from.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] include() question

2002-03-14 Thread Edward van Bilderbeek - Bean IT

Jep, that was what I meant... sorry Erik, didn't read your question right...

Edward

- Original Message -
From: "Jan Rademaker" <[EMAIL PROTECTED]>
To: "Erik Price" <[EMAIL PROTECTED]>
Cc: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; "Phil
Schwarzmann" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 11:03 PM
Subject: Re: [PHP] include() question


> On Thu, 14 Mar 2002, Erik Price wrote:
>
> >
> > On Thursday, March 14, 2002, at 04:34  PM, Edward van Bilderbeek - Bean
> > IT wrote:
> >
> > > you can't use a variable as a parameter for the included file...
because
> > > include does nothing else then putting the text of the include file on
> > > the
> > > place of the include statement...
> >
> > Are you sure about this?  I'm almost positive that PHP is flexible about
> > accepting variables or strings as function arguments in most cases.  I
> > just tested it, and it seems to work fine...
> >
> > $includefile = './leftnavigation.inc';
> > include($includefile);
> >
> I think what Edward means is that you can't pass parameters to an included
> file, like include("some.inc?var=value");
> That's true, at least for local
> files. include("http://remotesite/some.php?var=value";) will work, as long
> as remotesite has php installed, of course.
>
> --
> Jan Rademaker <[EMAIL PROTECTED]>
> http://www.ottobak.com
>
>



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




Re: [PHP] Use of $_SESSIONS in PHP 4.1.2 with register_globals off

2002-03-14 Thread Erik Price


In PHP 4.1.0 or greater, all you need to use sessions is this:

 I'm attempting to understand how to use session variables with
> register_globals off.  Listed below are three very simple pages that
> pass
> session variables.
>
> >>>With register_globals off:
> I'm only able to see $ses_var1 if I refer to it with
> $HTTP_SESSION_VARS['ses_var1'] or
> $_SESSION['ses_var1'] and not by using $ses_var1.  This only works if I
> used
> session_register('ses_var1') then set it using
> $ses_var1 = "something";.   Per everything I've been reading I expected
> it
> to work more like how I have ses_var2 setup but ses_var2 only produces
> output on page1.php
>
> Also I didn't expect $HTTP_SESSION_VARS['ses_var1'] to return anything
> since
> I did not declare them as global in page2 or page3.
>
>
> >>>With register_globals on:
> Same results as above except $ses_var1 does produces output on any page
> that
> asks.
>
>
> Am I doing something wrong?
>
> Using Windows 2k/IIS, we are also using Linux and Apache but we haven't
> upgraded that machine yet.
>
> =
> page1.php
> =
> session_start();
> session_register('ses_var1');
>
> $ses_var1 = "Hello World";
>
> $_SESSION['ses_var2'] = "huh?";
>
> echo "\$ses_var1 is ".$ses_var1;
> echo "";
>
> echo "\$_SESSION['ses var2'] is ".$_SESSION['ses_var2'];
> echo "";
>
> ?>
> 
> 
>   
>   
>
>  Username:
>  
>   
>  
>  
>  
>
> =
> page2.php
> =
> session_start();
> echo "\$HTTP_SESSION_VARS['ses_var1'] is
> ".$HTTP_SESSION_VARS['ses_var1'];
> echo "";
>
> echo "\$_SESSION['ses_var1'] is ".$_SESSION['ses_var1'];
> echo "";
>
> echo "\$ses_var1 is ".$ses_var1;
> echo "";
>
> echo "";
> echo "";
>
> echo "\$HTTP_SESSION_VARS['ses_var2'] is
> ".$HTTP_SESSION_VARS['ses_var2'];
> echo "";
>
> echo "\$_SESSION['ses var2'] is ".$_SESSION['ses_var2'];
> echo "";
> echo "\$ses_var2 is ".$ses_var2;
> echo "";
>
> echo "";
> echo "";
> echo "post var name is: ".$_POST['username'];
> echo "";
>
> ?>
> Next page
>
>
> =
> page2.php
> =
> session_start();
>
> echo "\$HTTP_SESSION_VARS['ses_var1'] is
> ".$HTTP_SESSION_VARS['ses_var1'];
> echo "";
>
> echo "\$_SESSION['ses_var1'] is ".$_SESSION['ses_var1'];
> echo "";
>
> echo "\$ses_var1 is ".$ses_var1;
> echo "";
>
> echo "";
> echo "";
>
> echo "\$HTTP_SESSION_VARS['ses_var2'] is
> ".$HTTP_SESSION_VARS['ses_var2'];
> echo "";
>
> echo "\$_SESSION['ses var2'] is ".$_SESSION['ses_var2'];
> echo "";
>
> ?>
> Return to Page 1
>
>
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - -
> - - - - - - - - - - - - - - - - - - - - - - - -
> Please Note: The information contained in this message may be privileged
> and
> confidential and protected from disclosure.  If the reader of this
> message
> is not the intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this message is strictly
> prohibited. If you have received this in error, please notify us
> immediately
> by replying to the message and deleting it from your computer.
>
> Thank you - Tobin & Associates, Inc.
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - -
> - - - - - - - - - - - - - - - - - - - - - - - -
>
>
>







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] include() question

2002-03-14 Thread Edward van Bilderbeek - Bean IT

Hmmm, now I'm in doubt... I always had errors using it, so I stopped using
it... I also have problems with variables that have the same name and are in
both the original file and the included file... might it have something to
do with the PHP version you're working on?

Greets,

Edward

- Original Message -
From: "Erik Price" <[EMAIL PROTECTED]>
To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>
Cc: "Phil Schwarzmann" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 10:58 PM
Subject: Re: [PHP] include() question


>
> On Thursday, March 14, 2002, at 04:34  PM, Edward van Bilderbeek - Bean
> IT wrote:
>
> > you can't use a variable as a parameter for the included file... because
> > include does nothing else then putting the text of the include file on
> > the
> > place of the include statement...
>
> Are you sure about this?  I'm almost positive that PHP is flexible about
> accepting variables or strings as function arguments in most cases.  I
> just tested it, and it seems to work fine...
>
> $includefile = './leftnavigation.inc';
> include($includefile);
>
> I posted a question on this list about a month ago, and someone said
> that you can use variables or strings in many cases -- just remember
> that the variable expands to the string BEFORE being processed by the
> function.
>
> Erik
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>
>
> --
> 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] include() question

2002-03-14 Thread Erik Price


On Thursday, March 14, 2002, at 04:34  PM, Edward van Bilderbeek - Bean 
IT wrote:

> you can't use a variable as a parameter for the included file... because
> include does nothing else then putting the text of the include file on 
> the
> place of the include statement...

Are you sure about this?  I'm almost positive that PHP is flexible about 
accepting variables or strings as function arguments in most cases.  I 
just tested it, and it seems to work fine...

$includefile = './leftnavigation.inc';
include($includefile);

I posted a question on this list about a month ago, and someone said 
that you can use variables or strings in many cases -- just remember 
that the variable expands to the string BEFORE being processed by the 
function.

Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




[PHP] Use of $_SESSIONS in PHP 4.1.2 with register_globals off

2002-03-14 Thread Donna Dufort

I'm attempting to understand how to use session variables with
register_globals off.  Listed below are three very simple pages that pass
session variables.  

>>>With register_globals off: 
I'm only able to see $ses_var1 if I refer to it with
$HTTP_SESSION_VARS['ses_var1'] or 
$_SESSION['ses_var1'] and not by using $ses_var1.  This only works if I used
session_register('ses_var1') then set it using 
$ses_var1 = "something";.   Per everything I've been reading I expected it
to work more like how I have ses_var2 setup but ses_var2 only produces
output on page1.php

Also I didn't expect $HTTP_SESSION_VARS['ses_var1'] to return anything since
I did not declare them as global in page2 or page3.


>>>With register_globals on: 
Same results as above except $ses_var1 does produces output on any page that
asks.


Am I doing something wrong? 

Using Windows 2k/IIS, we are also using Linux and Apache but we haven't
upgraded that machine yet.

=
page1.php
=
session_start();
session_register('ses_var1');

$ses_var1 = "Hello World";

$_SESSION['ses_var2'] = "huh?";

echo "\$ses_var1 is ".$ses_var1;
echo "";

echo "\$_SESSION['ses var2'] is ".$_SESSION['ses_var2'];
echo "";

?>


  
  
   
 Username:
 
 
 
 
 

=
page2.php
=
session_start();
echo "\$HTTP_SESSION_VARS['ses_var1'] is ".$HTTP_SESSION_VARS['ses_var1'];
echo "";

echo "\$_SESSION['ses_var1'] is ".$_SESSION['ses_var1'];
echo "";

echo "\$ses_var1 is ".$ses_var1;
echo "";

echo "";
echo "";

echo "\$HTTP_SESSION_VARS['ses_var2'] is ".$HTTP_SESSION_VARS['ses_var2'];
echo "";

echo "\$_SESSION['ses var2'] is ".$_SESSION['ses_var2'];
echo "";
echo "\$ses_var2 is ".$ses_var2;
echo "";

echo "";
echo "";
echo "post var name is: ".$_POST['username'];
echo "";

?>
Next page


=
page2.php
=
session_start();

echo "\$HTTP_SESSION_VARS['ses_var1'] is ".$HTTP_SESSION_VARS['ses_var1'];
echo "";

echo "\$_SESSION['ses_var1'] is ".$_SESSION['ses_var1'];
echo "";

echo "\$ses_var1 is ".$ses_var1;
echo "";

echo "";
echo "";

echo "\$HTTP_SESSION_VARS['ses_var2'] is ".$HTTP_SESSION_VARS['ses_var2'];
echo "";

echo "\$_SESSION['ses var2'] is ".$_SESSION['ses_var2'];
echo "";

?>
Return to Page 1



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
Please Note: The information contained in this message may be privileged and
confidential and protected from disclosure.  If the reader of this message
is not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this message is strictly
prohibited. If you have received this in error, please notify us immediately
by replying to the message and deleting it from your computer.  

Thank you - Tobin & Associates, Inc.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -





Re: [PHP] Online Feedback and Application

2002-03-14 Thread Erik Price


On Thursday, March 14, 2002, at 04:00  PM, David Johansen wrote:

> I would like to make a little online feedback and application form. I 
> was
> trying to decide if I should use the mailto action of the form or if 
> there's
> some better way that I can do it in PHP. Is there a way I could just 
> write
> it to a file or something in PHP or is there a more typical and better 
> way
> to pull this off? Thanks,

Fundamentally, the script you are wondering about is known as a 
"guestbook", although it has been rarely used for that purpose since the 
late nineties.  Someone enters some text into an HTML input, hits 
"submit" and the data either gets stored in a file, database, or is 
emailed (or processed in some other way).

Whether or not the data is visible by other visitors or only by yourself 
is entirely up to you -- PHP handles such scripts incredibly easily.  
Julio Nobrega suggested storing the data into a database, which is a 
good idea especially if you expect a lot of feedback or have a somewhat 
complicated feedback form that you would like to be able to run complex 
queries on.  You could also simply write this data to a text file or 
multiple text files, though if you get a lot of feedback it -could- get 
out of hand.  And email is another option.

PHP lets you do all of this.


Erik





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




[PHP] filesize problem

2002-03-14 Thread Martin Kampherbeek

Hi,

I talked to you on ICQ and told you to send an email with my PHP problem. So here it 
is.

Someone is submitting an URL.
The problem is that someone is submitting the URL per form. So it is allways something 
like http:\\www.mydomain.com\1.htm
In that case it is difficult to tell where to look, because the submitted URL is 
ending with htm.

I would like to know the filesizes of the jpg's in the URL, so I'm talking about 
matches 1 en 3. This is the script I got so far:

http://www.mydomain.com/1.htm','r'); 
$text=fread($fp,10); 
fclose($fp); 
$preg='/ 
]*
href=
"?\'?
([^"\'>]*\.jpg)
[^>]*
>
([^<]|<(?!a))*
]*
src=
"?\'?
([^"\'>]*\.jpg)
[^>]*
>
([^<]|<(?!a))*
<\/a
/siUx';

preg_match_all($preg,$text,$matches); 
for ($k=0;$k'; 
} 
?> 






Re: [PHP] include() question

2002-03-14 Thread Edward van Bilderbeek - Bean IT

you can't use a variable as a parameter for the included file... because
include does nothing else then putting the text of the include file on the
place of the include statement...

so this should work:

$var = 'bladibla';
include('index.php');


Greets,

Edward


- Original Message -
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 10:20 PM
Subject: [PHP] include() question


> Why doesn't this work...
>
> include("index.php?var='$var');
>
> I want to include a page in my code and send a variable to it but I get
> some funky error.
>
> THANKS!!
>



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




RE: [PHP] include() question

2002-03-14 Thread Demitrious S. Kelly

Try to simplify the problem
$file='index.php?var=';
$file.=$var;
include($file);

-Original Message-
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 14, 2002 1:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] include() question

Why doesn't this work...
 
include("index.php?var='$var');
 
I want to include a page in my code and send a variable to it but I get
some funky error.
 
THANKS!!


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




[PHP] include() question

2002-03-14 Thread Phil Schwarzmann

Why doesn't this work...
 
include("index.php?var='$var');
 
I want to include a page in my code and send a variable to it but I get
some funky error.
 
THANKS!!



[PHP] Re: Online Feedback and Application

2002-03-14 Thread Julio Nobrega Trabalhando

  Whetever you prefer. You may mail the form to you, or store in a
database/file for retrival.

  Me? I would store on a database and make a page where I can see the
feedbacks. I got so many emails daily that more would not be welcome.

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"David Johansen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I would like to make a little online feedback and application form. I was
> trying to decide if I should use the mailto action of the form or if
there's
> some better way that I can do it in PHP. Is there a way I could just write
> it to a file or something in PHP or is there a more typical and better way
> to pull this off? Thanks,
> Dave
>
>



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




RE: [PHP] Cookies not expiring (RESOLVED)

2002-03-14 Thread David McInnis

OK, I guess I found the problem.  RealOne Media player from real
networks uses Explorer within its program and I was not closing the
RealOne Player therefore it was holding onto the cookie.

Thanks,
David McInnis

-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 14, 2002 7:07 AM
To: 'David McInnis'; [EMAIL PROTECTED]
Subject: RE: [PHP] Cookies not expiring

OK...that looks valid.

Now, what indications are you getting that the cookie is not expiring
when
you close the browser?

As far as expiring when user leaves the web-site?  M.C. Hammer said it
best...can't touch that

-Original Message-
From: David McInnis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 9:04 AM
To: 'Rick Emery'; [EMAIL PROTECTED]
Subject: RE: [PHP] Cookies not expiring


Here is what I am using to set my cookie.

$cp_sessionid = $CP_partnerid . "_" .
uniqid(str_pad(getenv("REMOTE_ADDR"), 15, "0"));

setcookie('cp_sessionid', $cp_sessionid);

David McInnis

-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 14, 2002 6:01 AM
To: 'David McInnis'; [EMAIL PROTECTED]
Subject: RE: [PHP] Cookies not expiring

Can't read your mind, bud.

Show us your code...

-Original Message-
From: David McInnis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 2:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Cookies not expiring


I understand that if an expiration time is not set, the cookie should
expire at the end of the session (when the browser is closed).  This is
not happening.

What is wrong here?

I would actually prefer for the cookie to expire when the user left the
Web site.  Any ideas?

Thanks,

--
David A McInnis
Information Technology Manager

CareerPerfect.com(r)  --  solutions for a perfect career(sm)


-- 
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] Online Feedback and Application

2002-03-14 Thread David Johansen

I would like to make a little online feedback and application form. I was
trying to decide if I should use the mailto action of the form or if there's
some better way that I can do it in PHP. Is there a way I could just write
it to a file or something in PHP or is there a more typical and better way
to pull this off? Thanks,
Dave



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




Re: [PHP] repost: appending to text file

2002-03-14 Thread Erik Price


On Thursday, March 14, 2002, at 03:06  PM, Gav wrote:

> What I do want to do though is create a gallery feature so what I 
> believe I
> need to do is to append the info above into a textfile named total.txt 
> or
> something.  So that everytime a separate file is saved on to the server,
> it's info is added to this total file.  Is this the way to go about 
> it?  Or
> is there a php function that can see what files are in the directory, 
> open
> them and then use the info that way?
>
> I was told that a database is the way to go but I have no experience of
> these at all.

A database will help you to keep data in separate "entities" (by keeping 
X information in an X_info column, Y information in a Y_info column, for 
example).  A database is also very fast.  Database knowledge is also 
worth having on your resume.  I recommend you download MySQL, an 
easy-to-use and free relational-database-management-system.  No doubt 
you've seen a lot of references to it from PHP stuff, because the two 
are practically hand-in-hand partners.  If you can afford a book, get 
"MySQL" by Paul DuBois from New Riders books, and read the first chapter 
to get a feel for how the SQL language works (so you can write SQL 
statements into your PHP code).  Later when you have more time, finish 
the book, it's an excellent reference for the MySQL database system.  If 
you don't want to spring for the book but are still interested, there 
are a million tutorials on using MySQL.

But a whole database just for this one script seems to me to be some 
serious overkill.  I recommend that you keep your data in an XML file 
instead -- this is actually really really easy, probably easier than 
using MySQL, but not as fast or as powerful for doing queries or 
searches.  But you can mark up the data to keep entities separate, and 
append new Flash objects' data to a "master" XML document like you 
describe.  When someone wants to view the "gallery", just parse the XML 
file, or run it through an XSLT style sheet or something.  If you need 
to add to the gallery, just read the XML file into memory, insert the 
new XML code for whatever it is you need to add, and write it back to 
the file.  The PHP XML functions are at 
http://www.php.net/manual/en/ref.xml.php and there are tutorials at 
DevShed, SitePoint, and a dozen other excellent web support sites.

Either a database or XML can do what you want, it's really up to you.  I 
think the XML way will get you your results soonest, but learning MySQL 
will have a long-term value if you ever intend to do any back-end work 
or just want to know more about databases.  It's fun stuff.


Erik



PS: you can combine XML and MySQL to achieve some really powerful data 
storage tricks, though sometimes it's overkill to do so (depending on 
the extent of your project).









Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] repost: appending to text file

2002-03-14 Thread Jason Wong

On Friday 15 March 2002 04:06, Gav wrote:

> I'm adapting some ecard code for my site so that users can save the
> position of various objects within my flash movie.  At the moment I create
> a random file name for the text file which is saved to my server.  The user
> is sent an email saying to go to this.swf?theinfo=randomtextfile.txt.  The
> info in the text file saves a string separated by commas of what objects
> are on the stage.  No text or _x or _y positions are needed e.g -
>
> itemString=blue,red,square,triangle&contentLoaded=true
>
> This part works fine.
>
> What I do want to do though is create a gallery feature so what I believe I
> need to do is to append the info above into a textfile named total.txt or
> something.  So that everytime a separate file is saved on to the server,
> it's info is added to this total file.  Is this the way to go about it?  Or
> is there a php function that can see what files are in the directory, open
> them and then use the info that way?


Manual > chapter > Filesystem Functions


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
... this must be what it's like to be a COLLEGE GRADUATE!!
*/

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




Re: [PHP] dynamically fill list box

2002-03-14 Thread Jason Wong

On Friday 15 March 2002 03:11, you wrote:
> Sorry... The error I get on members.php page is
> "if ( == paid)" is printed   if 'paid' is selected
> or   "if ($paid == no)" is printed   if 'not paid' is selected
> from this piece of code
> print "Paid: name='paid' value='$row->paid'>
> paid
> not paid
> ";
>


1) You're nesting php code within html within php!
2)  tags don't have a value attribute.

Try:

 if ($paid == 'paid') { $PAID_CHK = "CHECKED"; }
 if ($paid == 'no')   { $UNPAID_CHK = "CHECKED"; }
 print "Paid:
 paid
 not paid
 ";



-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Nothing will dispel enthusiasm like a small admission fee.
-- Kim Hubbard
*/

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




[PHP] PHP Printer functions

2002-03-14 Thread J. Wharton

I am attempting to change the orienation of printing for a page with a huge
table to landscape instead of portrait.
This is the code I used:
$defprintercon=printer_open();
printer_set_option( $defprintercon, PRINTER_ORIENTATION,
PRINTER_ORIENTATION_LANDSCAPE);
printer_close($defprintercon);

When extension=php_printer.dll is remarked out, I get an error message
saying that the function printer_open() is undefined, but when I leave the
dll in, it simply will not open the page (hangs forever).

Any advice is appreciated.


J. Wharton

PHP



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




[PHP] repost: appending to text file

2002-03-14 Thread Gav

I'm adapting some ecard code for my site so that users can save the position
of various objects within my flash movie.  At the moment I create a random
file name for the text file which is saved to my server.  The user is sent
an email saying to go to this.swf?theinfo=randomtextfile.txt.  The info in
the text file saves a string separated by commas of what objects are on the
stage.  No text or _x or _y positions are needed e.g -

itemString=blue,red,square,triangle&contentLoaded=true

This part works fine.

What I do want to do though is create a gallery feature so what I believe I
need to do is to append the info above into a textfile named total.txt or
something.  So that everytime a separate file is saved on to the server,
it's info is added to this total file.  Is this the way to go about it?  Or
is there a php function that can see what files are in the directory, open
them and then use the info that way?

I was told that a database is the way to go but I have no experience of
these at all.

Any help is appreciated.

Gav





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




Re: [PHP] XSLT parsing causes "passed by reference" error

2002-03-14 Thread Erik Price


On Wednesday, March 13, 2002, at 06:13  PM, Edward Tanguay wrote:

> Fatal error: Only variables can be passed by reference in
> /home/tanguay/test/testxslt.php on line 7
>
> when I run this code:
>
> 
> // Allocate a new XSLT processor
> $xh = xslt_create();
>
> // Process the document, returning the result into the $result variable
> $result = xslt_process($xh, 'content.xml', 'website.xsl');
>

I was curious about this, since I just recompiled with XSLT and 
Sablotron support myself.  I read through the annotated manual page for 
xslt_process().  Have you checked it out?  It appears that this 
extension is still fairly experimental, so the way that the program 
behaves may differ depending on which version you're running.

Which version of PHP are you using, for which OS?  Did you compile using 
the --enable-xslt and --with-xslt-sablot configure parameters?  Try some 
of the workarounds suggested in those annotations, specifically the one 
which suggests that xslt_process() doesn't like NULL arguments.  It'll 
be ugly, but perhaps you can use implode() to read those files into a 
string, and get it to work by passing string references rather than 
filenames.  If you really want to use filenames, try using an absolute 
path, try using ./ before the file names (assuming those files are in 
the same directory as the script itself).  Finally, consider passing a 
joke array as the 5th and 6th arguments to the function.  It may be that 
in your particular build you need to use workarounds.

Be sure to post the results of your experimentation for the benefit of 
the rest of us.






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




[PHP] Any one used this company for hosting ?

2002-03-14 Thread R'twick Niceorgaw

Hi all,
does any one have any expereince with this company ? 
http://ciwebhosting.com/

Please feel free to share with me.

regards
R'twick Niceorgaw




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




[PHP] Re: Can Event Handlers Trigger PHP Code?

2002-03-14 Thread Julio Nobrega Trabalhando

  No, because 'activation' of php is done by the server. PHP is a server
side language.

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"Dr. Shim" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> My question is can event handlers on form objects trigger PHP code?
>
> 
>
> Or even an "onsubmit" event handler on forms?
>
> If something like this is possible, could any of you tell me how? I've
> tried, and tried. I've used PHP tags inside the event handler
>
> 
>
> But the result is that the event handler is blank
>
> 
>
> since the interpreter hides any PHP code. Thus nothing happens on the
event.
>
>
>
>
> Any help is appreciated.
>
>



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




RE: [PHP] header("Location:") problem with Netscape

2002-03-14 Thread Matt Schroebel

It's not $PHP_SELF that's the issue here -- well it was probably blank because either 
register_globals is off or you were in a function and didn't global it.  The real 
trouble is that. IE < v6.0 is forgiving and if the action="" is blank sends the 
request to the current page. So you feel comfy and think all is well, when in fact you 
have an empty action on your form.  Incidentally, Microsoft changed this and I.E. 6.0 
behaves just like Netscape 4.7.

> -Original Message-
> From: Steven Walker [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, March 14, 2002 1:52 PM
> To: Jeff Bearer
> 
> I just had this problem!
> 
> Using $PHP_SELF did not work with Netscape 4.7 for some reason. I was 
> using it in form submissions and kept getting the error 'Method Not 
> Allowed'. My fix was simple, I just hard coded the action url since.
> 
 

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




Re: [PHP] SafeMode, Virtual Hosts with different users & filesystemfunctions

2002-03-14 Thread Rasmus Lerdorf

Nope, not with Apache-1.3.  Apache 2.0 will have a solution to this.  Or
you can run multiple instances of Apache behind a Squid reverse proxy with
Squidguard redirecting requests to the appropriate port.

-Rasmus

On Thu, 14 Mar 2002, Pablo Murillo wrote:

> Hi
>
> I have a machine running :
> - RH6.2
> - Apache Apache/1.3.22
> - PHP 4.1.1 (patched to 4.1.2) as apache module,  configured in safe mode
>
> I have different users (same group) for every VHosts for extra security
> Every vhosts dir is chmoded to 0755 (and all the content too)
>
> Why PHP use the user/group from apache insted to use the user/group from the
> vhosts or the script ?
> Is there a way to solve this (not safe_mode_gid, not compiled as CGI) ?
>
> Killer
> [EMAIL PROTECTED]
>
>
>
>
> --
> 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] session problems

2002-03-14 Thread Erik Price


On Thursday, March 14, 2002, at 02:15  PM, Daniel Ferreira Castro wrote:

> If it validates the user, then he creates a session called 
> login_session and
> open another file called s_proj.htm throug the line
> header("location:http://pinguim/pb/s_proj.php";);
>
> The problem is
> on my login.php I have the block
>
> session_name("login_session");
> session_start();
> session_register(login);
> session_register(pass);
> $HTTP_SESSION_VARS["login"]= '$user';
> $HTTP_SESSION_VARS["pass"]='$pass';
> mysql_close($link);
> header("location:http://pinguim/pb/s_proj.php";);
>
> and I wish to retrieve at s_proj.php the values of the session variables
> login and pass registered for my "login_session" session.  How can I do 
> it?

Two things:

(1) at the top you say "s_proj.htm" but I am assuming this is a typo and 
you mean "s_proj.php"
(2) you have variables in single quotes, which will prevent them from 
expanding.  You can drop the single quotes if you want.
(3) If you are using PHP 4.1.0 or greater, then there is a much easier 
way to write this script:

session_start();
$_SESSION['login'] = $_POST['user']; // use $_GET if that is the method 
you're using
$_SESSION['pass'] = $_POST['pass']; // use $_GET if you are using that 
method
mysql_close($link);
header("location: http://pinguim/pb/s_proj.php";);



HTH,
Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




[PHP] SafeMode, Virtual Hosts with different users & filesystem functions

2002-03-14 Thread Pablo Murillo

Hi

I have a machine running :
- RH6.2
- Apache Apache/1.3.22
- PHP 4.1.1 (patched to 4.1.2) as apache module,  configured in safe mode

I have different users (same group) for every VHosts for extra security
Every vhosts dir is chmoded to 0755 (and all the content too)

Why PHP use the user/group from apache insted to use the user/group from the
vhosts or the script ?
Is there a way to solve this (not safe_mode_gid, not compiled as CGI) ?

Killer
[EMAIL PROTECTED]




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




Re: [PHP] dynamically fill list box

2002-03-14 Thread Analysis & Solutions

Hey Gee:

On Fri, Mar 15, 2002 at 08:11:06AM +1300, gee wrote:

> print "Paid:
> 
> paid
> not paid
> ";

I'd take a slightly different approach (wrapped for email)...

paid=='paid') ? ('checked ') : ('') ); ?>
/> Yes

paid!='paid') ? ('checked ') : ('') ); ?>
/> No

Enjoy,

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 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

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




[PHP] session problems

2002-03-14 Thread Daniel Ferreira Castro

I am working with a login system and on my login I want to star a session
that has the variables login and password registered.
This is the way of my files are organized.
I have a login.htm that has a form which POST the two fields of this form
called 'ct_login' and 'ct_pass' and has the action = login.php.

login.php validates or no the user retrievieng the username and pass with
$HTTP_POST_VAR['ct_login'] and  $HTTP_POST_VAR['ct_pass'].
If it validates the user, then he creates a session called login_session and
open another file called s_proj.htm throug the line
header("location:http://pinguim/pb/s_proj.php";);

The problem is
on my login.php I have the block

session_name("login_session");
session_start();
session_register(login);
session_register(pass);
$HTTP_SESSION_VARS["login"]= '$user';
$HTTP_SESSION_VARS["pass"]='$pass';
mysql_close($link);
header("location:http://pinguim/pb/s_proj.php";);

and I wish to retrieve at s_proj.php the values of the session variables
login and pass registered for my "login_session" session.  How can I do it?

Thank you

Daniel F. Castro
[EMAIL PROTECTED]






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




Re: [PHP] dynamically fill list box

2002-03-14 Thread gee

Sorry... The error I get on members.php page is
"if ( == paid)" is printed   if 'paid' is selected
or   "if ($paid == no)" is printed   if 'not paid' is selected
from this piece of code
print "Paid:
paid
not paid
";

- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 9:36 PM
Subject: Re: [PHP] dynamically fill list box


> On Thursday 14 March 2002 16:07, gee wrote:
> > A real newbie would be grateful for some help.
> > I have a sports club membership database (Mysql) with first and last
names,
> > address  and paid or not paid.
> > In edit.php I would like to be able to pre-fill a list box with whether
the
> > person has paid or not, change if necessary, update the database
> > and view the resultant changes in members.php
> > I have tried the following in edit.php but can't get it to work.
>
> By stating *how* it doesn't work makes it easier for others to help you.
For
> starters, do you get any errors?
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> I hope you millionaires are having fun!  I just invested half your life
> savings in yeast!!
> */
>
> --
> 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] Can Event Handlers Trigger PHP Code?

2002-03-14 Thread Dr. Shim

My question is can event handlers on form objects trigger PHP code?



Or even an "onsubmit" event handler on forms?

If something like this is possible, could any of you tell me how? I've
tried, and tried. I've used PHP tags inside the event handler



But the result is that the event handler is blank



since the interpreter hides any PHP code. Thus nothing happens on the event.




Any help is appreciated.



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




[PHP] Data from "multipart/form-data" discarded

2002-03-14 Thread Miguel Cruz

For some reason, on just one server, data from forms posted with
ENCTYPE="multipart/form-data" never makes it to the PHP script.

We use this extremely simple test script:










And on this one server, no output shows unless the first  tag is
commented and the second uncommented. On all other servers, with apparently
identical configuration, form data appears normally.

The build on this server (PHP 4.1.2) is extremely simple:

./configure --with-apache=../apache_1.2.23 --with-mysql

Any ideas?

miguel


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




[PHP] Data from "multipart/form-data" goes missing

2002-03-14 Thread Miguel Cruz

(Sorry if this is a duplicate post; I sent it through the news server but
began to think that might not be forwarding posts to the list)

For some reason, on just one server, data from forms posted with
ENCTYPE="multipart/form-data" never makes it to the PHP script.

We use this extremely simple test script:










And on this one server, no output shows unless the first  tag is
commented and the second uncommented. On all other servers, with apparently
identical configuration, form data appears normally.

In all cases the Content_Length value rises and falls with the length of the
string I type into the text box.

The build on this server (PHP 4.1.2) is extremely simple:

./configure --with-apache=../apache_1.2.23 --with-mysql

Apache is built with PHP and mod_rewrite.

Any ideas?

miguel


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




Re: [PHP] header("Location:") problem with Netscape

2002-03-14 Thread Steven Walker

Jeff,

I just had this problem!

Using $PHP_SELF did not work with Netscape 4.7 for some reason. I was 
using it in form submissions and kept getting the error 'Method Not 
Allowed'. My fix was simple, I just hard coded the action url since.

If you really need $PHP_SELF, I don't know what the fix is. I also tried 
getenv(PHP_SELF) and $_SERVER[PHP_SELF] without any luck.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Thursday, March 14, 2002, at 10:29  AM, Jeff Bearer wrote:

> I'm working on a app that uses the header("Location") is the middle of
> the file, but since I'm using output buffering it shouldn't matter.  The
> application works fine in Mozilla, Konqueror, and IE, but not in
> Netscape 4 or 6.
>
> I don't get the error that the "headers have already been written"
> error, it just loads the page as if the header("Location:") was
> commented out.
>
> Some of my thoughts on the subject.  I'm redirecting to $PHP_SELF is
> Netscape trying to be extra smart and think it doesn't have to refresh?
> I'm using gzip compression in output buffering, maybe there is a
> situation where Netscape 4 & 6 may not use the gzip compression, hence
> causing the output buffering not to work correctly?  But if that was the
> case I should see the error about headers already been written.
>
> Any suggestions would be great, thanks.
>
> --
> Jeff Bearer, RHCE
> Webmaster
> PittsburghLIVE.com
> 2002 EPpy Award, Best Online U.S. Newspaper
>
>
> --
> 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] header("Location:") problem with Netscape

2002-03-14 Thread Jeff Bearer

I'm working on a app that uses the header("Location") is the middle of
the file, but since I'm using output buffering it shouldn't matter.  The
application works fine in Mozilla, Konqueror, and IE, but not in
Netscape 4 or 6.

I don't get the error that the "headers have already been written"
error, it just loads the page as if the header("Location:") was
commented out.

Some of my thoughts on the subject.  I'm redirecting to $PHP_SELF is
Netscape trying to be extra smart and think it doesn't have to refresh?
I'm using gzip compression in output buffering, maybe there is a
situation where Netscape 4 & 6 may not use the gzip compression, hence
causing the output buffering not to work correctly?  But if that was the
case I should see the error about headers already been written.

Any suggestions would be great, thanks.

-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com
2002 EPpy Award, Best Online U.S. Newspaper


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




Re: [PHP] Re: Get row number from mysql

2002-03-14 Thread Chris Hewitt

Rick,

I agree. Row ids should be for internal database use. SQL frees 
us from needing them. 

Tyler, what order do you want these records returned in? That is what 
goes into the ORDER BY clause. If, for example, it is alphabetical order 
of NAME then use ORDER BY NAME. If it is the order in which people are 
entered into the database then I would either use a sequence and enter 
that into a "person_id" or "sequence" field, alternatively put a 
date/time stamp into a "person_entered_at" field. These result in ORDER 
BY PERSON_ID, ORDER BY SEQUENCE and ORDER BY PERSON_ENTERED_AT respectively.

I'd narrow the question down to "what is it about first person, second 
person and third person that makes them first, second and third.". If we 
know that then I think we may be able to help better.

Hope this helps.

Regards

Chris

Rick Emery wrote:

>The greater question:  Why does irow order matter?  What are you REALLY
>trying to do?
>
>==
>In article <000701c1cb06$3b54f3b0$0101a8c0@nightengale>, 
>[EMAIL PROTECTED] says...
>
>>Hello,
>>
>>How can I get the number of the current row, something like this:
>>
>>>$sql = mysql_query("SELECT * FROM table ORDER BY id DESC");
>>while ($row = mysql_fetch_array($sql)) {
>>$id = $row["id"];
>>$name = $row["name"];
>>print "$current_row_number. $name";
>>}
>>?>
>>I can't just use the id field, because the ID's might not always be 1, 2,
>>
>3,
>
>>4, 5, 6, etc...they could go 1, 2, 4, 5, 8.
>>
>>I need it to look like this:
>>1. first person
>>2. second person
>>3. third person
>>
>>and so on and so forth.
>>
>>Can anyone advise me on how I should do this?
>>
>>thanks,
>>Tyler
>>
>>
>




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




[PHP] Format of browser image requests

2002-03-14 Thread Dennis Gearon

Please CC me, I'm on digest
---

Has anyone looked at what the browsers send when they request stuff
like:
images
flash
Real Audio
etc

Do they send the cookies/post/get vars from the previous page, 
the requesting URI, or anything but the request?

This is in reference to possibly preventing things like:

http://mydomain.com/images/image_I_only_want_seen_in_pages.jpg

-- 

If You want to buy computer parts, see the reviews at:
http://www.cnet.com/
**OR EVEN BETTER COMPILATIONS**!!
http://sysopt.earthweb.com/userreviews/products/

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




[PHP] posting without a from

2002-03-14 Thread Eric Kilgore

I am trying to post to another server without a form. The input is from a
form on my server. I log the entry in MySQL and then pass the input to this
function to open the connection and return a query result.

The post to the other server requires authentication in the form of USERID
and PASSWORD. At first this function returned "HTTP 1.1/ Authentication
Required" and now it is timing out.

Incidentally, I have posted this data directly from a form with no problems.
Anyone know why this isn't working?


function process_CRIS($USERID, $PASSWORD, $S_S, $S_M, $SRCH__LNAME,
$SRCH__FNAME)
{
$url = "http://10.0.0.10/premium/comb/Results.phtml";;
$url = preg_replace("@^http://@i";, "", $url);
$host = substr($url, 0, strpos($url, "/"));
$uri = strstr($url, "/");
$UserID = "";
$Password = "x";
$reqbody="USERID=".urlencode($UserID);
$reqbody=$reqbody."&PASSWORD=".urlencode($Password);
$reqbody = $reqbody."&S_S=".urlencode($S_S);

// $S_S can consist of an array of possible search parameters that need to
be concatenated to ab,ac,ad, etc.
if (isset($S_S)){
foreach($S_S as $key=>$val)
{
if ($key == 0){ $reqbody = $reqbody."&S_S=".urlencode($val);}
else
{$reqbody = $reqbody.",".urlencode($val);}
}
}

if (isset($S_M)){
foreach($S_M as $key=>$val)
{
if ($key == 0){$reqbody = $reqbody."&S_M=".urlencode($val);}
else
{$reqbody = $reqbody.",".urlencode($val);}
}
}

$reqbody = $reqbody
."&SRCH__LNAME=".urlencode($SRCH__LNAME)."&SRCH__FNAME=".
urlencode($SRCH__FNAME);


$contentlength = strlen($reqbody);
$reqheader =  "POST $uri HTTP/1.1\r\n".
   "Host: $host\n".
"Content-Type: application/x-www-form-urlencoded\r\n".
 "Content-Length: $contentlength\r\n".
"$reqbody\r\n";

 $socket = fsockopen($host, 80, $errno, $errstr);

if (!$socket) {
   $result = "Error: ".$errno. $errstr;
   return $result;
   exit;
}

fputs($socket, $reqheader);


 $result = fgets($socket, 4096);

fclose($socket);
return $result;

}


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




Re: [PHP] putting a url in an anchor tag

2002-03-14 Thread JSheble


Here's a function that was sent to me in response to me needing the exact 
same thing:

function pb_t2h_URLMarkup ($Text, $StyleClass = '', $Target = '')
{
 if ($StyleClass != '')
 $ClassS = " class='$StyleClass'";
 else
 $ClassS = "";

 if ($Target != '')
 $TargetS = " target='$Target'";
 else
 $TargetS = '';

 /* Match for URL strings (the part after 'http://'). Only does quite
  * loose matching. Handles URL parameters and urlencoded chars (%xy).
  * '&' chars have to be treated specially because htmlentities()
  * converts them to '&' */
 $URLSMatch = '([\w\.\/~\?%=\-\&]|&)+)';

 $Patterns = array ('/([^"\']|\A)(http:\/\/' . $URLSMatch . '/',
'/([^"\'])(ftp:\/\/[\w\.\/~\-]+)/',
'/([^"\'\w-\.\/]|\A)(www\.' . $URLSMatch . '/',
'/([^"\'\w\.~\-=]+@[\w\.~\-]+)/');

 $Replacements = array ("\\1\\2",
"\\1\\2",
"\\1\\2",
"\\1");

 return preg_replace ($Patterns, $Replacements, $Text);
}


At 10:35 AM 3/14/2002 -0600, Tyler Longren wrote:
>Hello,
>
>I've been playing with this since lastnight.  I have a string of
>text...Example:
>"This is a test string of test, please go to http://www.google.com now."
>
>I need something that will catch the "http://www.google.com"; part, and make
>into a link instead of just plain text.  Does anyone know how I should go
>about doing this?  I've looked through a few code repositories, but haven't
>found anything.
>
>Thanks,
>Tyler
>
>
>--
>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] Readfile() Download Issues

2002-03-14 Thread Steven Walker

Hi,

I'm having trouble supporting Internet Explorer 5.5 and earlier versions 
in a PHP download script. People are reporting that the file comes out 
as 'download.htm'.

Here is the code in my download.php:

$len = filesize($file);
header("Content-type: application/zip");
header("Content-Length: $len");
header("Content-Disposition: attachment; filename=$filename");
readfile($file);

Other browsers appear to work fine. An thoughts?

Thanks,

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]


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




[PHP] putting a url in an anchor tag

2002-03-14 Thread Tyler Longren

Hello,

I've been playing with this since lastnight.  I have a string of
text...Example:
"This is a test string of test, please go to http://www.google.com now."

I need something that will catch the "http://www.google.com"; part, and make
into a link instead of just plain text.  Does anyone know how I should go
about doing this?  I've looked through a few code repositories, but haven't
found anything.

Thanks,
Tyler


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




Re: [PHP] Passing an array as an argument

2002-03-14 Thread Rasmus Lerdorf

You can't put $a[][] inside a qouted string like that.  Either use
${a[][]} or put it outside like this:

Print(" ".$aOptions[1][1]."\n");

-Rasmus

On Thu, 14 Mar 2002, Mauricio Cuenca wrote:

> Hello,
>
> I've built a function that receives an array as an argument to create an
> HTML drop-down list, but when I try to print the list this is all I got:
> 
>  Array[1]
>  Array[1]
> 
>
> This is my code:
> ---
>
>   Function TextList($sName, $aOptions)
>   {
>$nCount = Count($aOptions); //Counts the elements of the array
>Print("\n");
>For ($i = 1; $i <= $nCount; $i++)
> {
>  Print(" $aOptions[1][1]\n");
> }
>Print("\n");
>   }
>
> */ Now I build the array */
>$my_array = Array( Array(0,0), Array(1,"Enero"), Array(2,"Febrero"),
> Array(3,"Marzo"), Array(4,"Abril");
>
> */ And call the function */
> TextList("my_list", $my_array);
>
> I need to know how exaclty can I pass and receive an array as a function
> argument. Hope you can help me, TIA.
> --
>
>
> Mauricio Cuenca
>
>
>
> --
> 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] Passing an array as an argument

2002-03-14 Thread Mauricio Cuenca

Hello,

I've built a function that receives an array as an argument to create an
HTML drop-down list, but when I try to print the list this is all I got:

 Array[1]
 Array[1]


This is my code:
---

  Function TextList($sName, $aOptions)
  {
   $nCount = Count($aOptions); //Counts the elements of the array
   Print("\n");
   For ($i = 1; $i <= $nCount; $i++)
{
 Print(" $aOptions[1][1]\n");
}
   Print("\n");
  }

*/ Now I build the array */
   $my_array = Array( Array(0,0), Array(1,"Enero"), Array(2,"Febrero"),
Array(3,"Marzo"), Array(4,"Abril");

*/ And call the function */
TextList("my_list", $my_array);

I need to know how exaclty can I pass and receive an array as a function
argument. Hope you can help me, TIA.
--


Mauricio Cuenca




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




[PHP] Passing an array as an argument

2002-03-14 Thread Mauricio Cuenca

Hello,

I've built a function that receives an array as an argument to create an
HTML drop-down list, but when I try to print the list this is all I got:

 Array[1]
 Array[1]


This is my code:
---

  Function TextList($sName, $aOptions)
  {
   $nCount = Count($aOptions); //Counts the elements of the array
   Print("\n");
   For ($i = 1; $i <= $nCount; $i++)
{
 Print(" $aOptions[1][1]\n");
}
   Print("\n");
  }

*/ Now I build the array */
   $my_array = Array( Array(0,0), Array(1,"Enero"), Array(2,"Febrero"),
Array(3,"Marzo"), Array(4,"Abril");

*/ And call the function */
TextList("my_list", $my_array);

I need to know how exaclty can I pass and receive an array as a function
argument. Hope you can help me, TIA.
--


Mauricio Cuenca



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




Re: [PHP] simple yet weird... help pls

2002-03-14 Thread Rasmus Lerdorf

> Please take a look at the script below.
> If i want to show an image it doesnt work if it's under an if statement.
> Why in this case?
>
>  $feedb=0;
>   if($feedb==0){   echo "";}
>   echo "";
> ?>
> How can i solve this problem?

By spelling src correctly.

-Rasmus


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




Re: [PHP] Opera broswer & file upload / MY CODE

2002-03-14 Thread Jason Wong

On Friday 15 March 2002 00:10, Vlad Kulchitski wrote:
> This is the code I am using for uploading:
>
> if(($userfile) && ($userfile != "none"))
> {
>
>   $type=basename($userfile_type);

[snip]


Hmm, Andrey says the bug has been fixed and committed to the CVS. But looking 
at the bug reports there have been quite a number of fixes for Opera, and 
uploads against various versions of PHP.

So your best bet is to search at http://bugs.php.net for your particular 
version of php and see what comes up.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
He who hates vices hates mankind.
*/

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




RE: [PHP] Cookies not expiring

2002-03-14 Thread Ray Todd Stevens

Also you have to close all instances of the browser for this to occur.  
That is even if you close the browser that has a session to the site if 
you have another window open to any other site then the cookie 
stays.

> OK...that looks valid.
> 
> Now, what indications are you getting that the cookie is not expiring when
> you close the browser?
> 
> As far as expiring when user leaves the web-site?  M.C. Hammer said it
> best...can't touch that
> 
> -Original Message-
> From: David McInnis [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 14, 2002 9:04 AM
> To: 'Rick Emery'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Cookies not expiring
> 
> 
> Here is what I am using to set my cookie.
> 
> $cp_sessionid = $CP_partnerid . "_" .
> uniqid(str_pad(getenv("REMOTE_ADDR"), 15, "0"));
> 
> setcookie('cp_sessionid', $cp_sessionid);
> 
> David McInnis
> 
> -Original Message-
> From: Rick Emery [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, March 14, 2002 6:01 AM
> To: 'David McInnis'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Cookies not expiring
> 
> Can't read your mind, bud.
> 
> Show us your code...
> 
> -Original Message-
> From: David McInnis [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 14, 2002 2:25 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Cookies not expiring
> 
> 
> I understand that if an expiration time is not set, the cookie should
> expire at the end of the session (when the browser is closed).  This is
> not happening.
> 
> What is wrong here?
> 
> I would actually prefer for the cookie to expire when the user left the
> Web site.  Any ideas?
> 
> Thanks,
> 
> --
> David A McInnis
> Information Technology Manager
> 
> CareerPerfect.com(r)  --  solutions for a perfect career(sm)
> 
> 
> -- 
> 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
> 
> 



--
Ray Todd Stevens Specialists in Network and Security 
Consulting
Senior ConsultantSoftware audit service available
Stevens Services
Suite 21
3754 Old State Rd 37 N
Bedford, IN 47421
(812) 279-9394
[EMAIL PROTECTED]

Thought for the day:
Intuition (n): an uncanny sixth sense which tells people 
that they are right, whether they are or not.


For PGP public key send message with subject 
please send PGP key

If this message refers to an attachment the attachment
may arrive as a seperate mail message depending on the
type of mail client and gateway software you are using.


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




Re: [PHP] Opera broswer & file upload

2002-03-14 Thread Andrey Hristov

Look here for more info about file upload problems with Opera:
http://bugs.php.net/search.php?cmd=display&search_for=opera&x=0&y=0

Andrey

- Original Message - 
From: "Vlad Kulchitski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 5:57 PM
Subject: [PHP] Opera broswer & file upload



Also another question, my fileupload works everywhere (IE, Netscape) but
Opera. Does Opera support it at all?

My fileupload is very simple. It checks is the file is JPEG/GIF/BMP and
then
saves it, if not, gives an error message.

Vlad


-- 
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] Problem upgrading to PHP 4.1.2

2002-03-14 Thread David Brannlund

Thank you VERY much!!! Worked like a charm...

David


"Richard Archer" <[EMAIL PROTECTED]> wrote in message
news:a05100301b8b615655f5f@[203.89.243.68]...
> At 9:22 AM +0100 14/3/02, David Brannlund wrote:
>
> >This configuration works with GD 1.3-6 and Freetype 1.x.
> >
> >When we try to upgrade to PHP 4.1.2 with the same configuration, we can't
> >use the ImageTTF* functions. We tried to add --with-ttf to the
configuration
> >with the result that apache wouldn't start (complained about
> >gdImageResolveColor). We use apache 1.3.20, btw.
>
> The following patch fixed it for me:
>
> diff -r -U3 php-4.1.2/ext/gd/php_gd.h php-4.1.2.gd/ext/gd/php_gd.h
> --- php-4.1.2/ext/gd/php_gd.h   Sat Aug 25 06:07:07 2001
> +++ php-4.1.2.gd/ext/gd/php_gd.hThu Feb 28 15:03:02 2002
> @@ -66,7 +66,7 @@
>  PHP_MSHUTDOWN_FUNCTION(gd);
>
>  #ifndef HAVE_GDIMAGECOLORRESOLVE
> -static int gdImageColorResolve(gdImagePtr, int, int, int);
> +extern int gdImageColorResolve(gdImagePtr, int, int, int);
>  #endif
>  PHP_FUNCTION(imagearc);
>  PHP_FUNCTION(imagechar);
>
>
>  ...R.



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




[PHP] YET another question re: magic quotes

2002-03-14 Thread Vlad Kulchitski

If I have magic quotes on, will stripslashes() / addslashes() work? Doesn't seem to 
work for me...

-Original Message-
From: Vlad Kulchitski 
Sent: 14 ÂÅÒÅÚÎÑ 2002 Ò. 11:10
To: [EMAIL PROTECTED]
Subject: [PHP] Opera broswer & file upload / MY CODE

This is the code I am using for uploading:

if(($userfile) && ($userfile != "none"))
{

  $type=basename($userfile_type);

  
  switch ($type) 
  {
   case "jpeg":

   case "pjpeg": $filename="talkroom_gallery_photographs/$username.jpg";
 copy($userfile, $filename);
 echo "file copied OK!";
 echo "";
 break;
   case "gif":   $filename="talkroom_gallery_photographs/$username.gif";
 copy($userfile, $filename);
 echo "file copied OK!";
 echo "";
 break;
   case "bmp":   $filename="talkroom_gallery_photographs/$username.bmp";
 copy($userfile, $filename);
 echo "file copied OK!";
 echo "";
 break;
   default:  echo "invalid picture format";
}

Vlad

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: 14 ÂÅÒÅÚÎÑ 2002 Ò. 10:58
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Opera broswer & file upload

On Thursday 14 March 2002 23:57, Vlad Kulchitski wrote:
> Also another question, my fileupload works everywhere (IE, Netscape) but
> Opera. Does Opera support it at all?
>
> My fileupload is very simple. It checks is the file is JPEG/GIF/BMP and
> then
> saves it, if not, gives an error message.

I use Opera 5.12 for uploads and have no problems.


What problems are you getting?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
The more crap you put up with, the more crap you are going to get.
*/

-- 
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] Opera broswer & file upload

2002-03-14 Thread Andrey Hristov

CVS is the code repository. The PHP code is developed by many programmers and the CVS 
is used to store the code.
CVS = concurent versioning systems. It is used to prevent race conditions when two or 
more programmers are writing/patching a code.
Also there are many other pretty things.
So when bug is reported it is patched in the CVS and after some time new version is 
released at some time.

Andrey

- Original Message -
From: "Vlad Kulchitski" <[EMAIL PROTECTED]>
To: "Andrey Hristov" <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 6:06 PM
Subject: RE: [PHP] Opera broswer & file upload



Andrey what is CVS?

- Original Message -

This problem was fixed in the CVS.

Best regards,
Andrey Hristov

- Original Message -
From: "Vlad Kulchitski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 5:57 PM
Subject: [PHP] Opera broswer & file upload



Also another question, my fileupload works everywhere (IE, Netscape) but
Opera. Does Opera support it at all?

My fileupload is very simple. It checks is the file is JPEG/GIF/BMP and
then
saves it, if not, gives an error message.

Vlad


--
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] Opera broswer & file upload / MY CODE

2002-03-14 Thread Vlad Kulchitski

This is the code I am using for uploading:

if(($userfile) && ($userfile != "none"))
{

  $type=basename($userfile_type);

  
  switch ($type) 
  {
   case "jpeg":

   case "pjpeg": $filename="talkroom_gallery_photographs/$username.jpg";
 copy($userfile, $filename);
 echo "file copied OK!";
 echo "";
 break;
   case "gif":   $filename="talkroom_gallery_photographs/$username.gif";
 copy($userfile, $filename);
 echo "file copied OK!";
 echo "";
 break;
   case "bmp":   $filename="talkroom_gallery_photographs/$username.bmp";
 copy($userfile, $filename);
 echo "file copied OK!";
 echo "";
 break;
   default:  echo "invalid picture format";
}

Vlad

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: 14 ÂÅÒÅÚÎÑ 2002 Ò. 10:58
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Opera broswer & file upload

On Thursday 14 March 2002 23:57, Vlad Kulchitski wrote:
> Also another question, my fileupload works everywhere (IE, Netscape) but
> Opera. Does Opera support it at all?
>
> My fileupload is very simple. It checks is the file is JPEG/GIF/BMP and
> then
> saves it, if not, gives an error message.

I use Opera 5.12 for uploads and have no problems.


What problems are you getting?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
The more crap you put up with, the more crap you are going to get.
*/

-- 
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] Opera broswer & file upload

2002-03-14 Thread Vlad Kulchitski

The message I get is that the file is invalid format...

I tested on Netscape 4.xx and Netscape 6.xx

tested on IE 4 through 5. Works fine.

I can paste the code I am using if you want to take a look.

Vlad

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: 14 ÂÅÒÅÚÎÑ 2002 Ò. 10:58
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Opera broswer & file upload

On Thursday 14 March 2002 23:57, Vlad Kulchitski wrote:
> Also another question, my fileupload works everywhere (IE, Netscape) but
> Opera. Does Opera support it at all?
>
> My fileupload is very simple. It checks is the file is JPEG/GIF/BMP and
> then
> saves it, if not, gives an error message.

I use Opera 5.12 for uploads and have no problems.


What problems are you getting?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
The more crap you put up with, the more crap you are going to get.
*/

-- 
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] Opera broswer & file upload

2002-03-14 Thread Andrey Hristov

This problem was fixed in the CVS.

Best regards,
Andrey Hristov

- Original Message - 
From: "Vlad Kulchitski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 5:57 PM
Subject: [PHP] Opera broswer & file upload



Also another question, my fileupload works everywhere (IE, Netscape) but
Opera. Does Opera support it at all?

My fileupload is very simple. It checks is the file is JPEG/GIF/BMP and
then
saves it, if not, gives an error message.

Vlad


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




  1   2   >