Re: [PHP] checboxex and sessions

2001-03-20 Thread Yasuo Ohgaki
For example, if you have

from method="post"
Please check hereinput type="checkbox" name="checkbox_test" value="User Checked
Test Checkbox"
/form

If user does not check the checkbox, you'll get nothing since browser does not
send data at all for the checkbox. However, since you've created the form by
yourself, you know there is the checkbox named "checkbox_test". So you can check
like

if (!isset($HTTP_POST_VARS['checkbox_test'])) {
$HTTP_SESSION_VARS['FORM']['checkbox_text'] = NULL; //NULL requires recent
PHP4
}

Regards,

--
Yasuo Ohgaki


""karakedi"" [EMAIL PROTECTED] wrote in message
996qeb$s1a$[EMAIL PROTECTED]">news:996qeb$s1a$[EMAIL PROTECTED]...
 how can i vreate a null/false value for them and how to assing them to
 sessions pls ?


 ""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
 996p60$fjv$[EMAIL PROTECTED]">news:996p60$fjv$[EMAIL PROTECTED]...
  It sounds like you are not getting value from unchecked checkboxes.
  When checkbox is not checked, no values are sent to server.
  (Radio buttons are the same)
 
  Therefore, you probably cannot register since there is no value for
 register.
  Create value with NULL/False value for checkboxes if they are not set.
  Is this the problem?
 
  --
  Yasuo Ohgaki
 
  ""karakedi"" [EMAIL PROTECTED] wrote in message
  996hu3$cjn$[EMAIL PROTECTED]">news:996hu3$cjn$[EMAIL PROTECTED]...
   how can i store checkbox variables into sessions so that i can use them
 on
   other pages ?
  
   i know how to register sessions but simply cant do that with checkboxes.
   thx in adv.
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



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



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


Re: [PHP] Help with array creation

2001-03-20 Thread Yasuo Ohgaki

Just use $HTTP_POST_VARS and $HTTP_GET_VARS.
(Recent PHP4 is always compiled with "enable-track-vars", if you are using older
PHP set track-vars to true in php.ini)

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

Regards,
--
Yasuo Ohgaki

"Chris Carbaugh" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Hello,

 I'm trying to take the query string of a url and turn it into an
 associative array.

 Let's say I have a URL like

 myHost.com/somepage.php?val1=oneval2=two

 I can get the query with HTTP_SERVER_VARS["QUERY_STRING"], but how do I
 generate an array equivilent to

 array('val1'='one', 'val2'='two')

 Also, this example uses a GET method.  First, can I do this?  Also, can
 I do this with a POST method?

 Thanks,
 Chris


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



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




Re: [PHP] get_meta_tags bug?

2001-03-20 Thread Yasuo Ohgaki
May be get_meta_tags() is XHTML compliant.
(XHTML requires "" and lowercases for attributes)
I suggest you to use double quotes.

--
Yasuo Ohgaki

"Paul Rees" [EMAIL PROTECTED] wrote in message
r19NDKAFmot6Ew$[EMAIL PROTECTED]">news:r19NDKAFmot6Ew$[EMAIL PROTECTED]...
 Hi,

 The php function 'get_meta_tags' doesn't work when the meta tag name/
 content values are single quoted. It's fine for double quotes. I've had
 a look but can't find anything on the w3 site to say whether or not
 double quotes are required in meta tags. Does anyone know what the rule
 is?

 (php v 4.04pl1, apache, linux 2.2.18)

 All the best
 --
 Paul

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



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


Re: [PHP] PHP MYSQL BOOKS

2001-03-20 Thread Luke Welling

It is $39.95 at barnesandnobel.com and at fatbrain.com.

That GST is a killer.  It will probably have an RRP around $110 here in
Australia too.

Cheers,

Luke Welling.
""YoBro"" [EMAIL PROTECTED] wrote in message
995r3k$poh$[EMAIL PROTECTED]">news:995r3k$poh$[EMAIL PROTECTED]...
 I actually think this is the book I have been waiting for. A bookstore in
 New Zealand told me not until March 2001. It must be pretty good, all the
 Sams books are. The only problem is in NZ it is about $170 as opposed to
 amazons $49.95US ($100NZ). If you know somewhere cheaper than amazon, I am
 all ears.

 Cheers
 Chris

 ""Luke Welling"" [EMAIL PROTECTED] wrote in message
 99528g$v58$[EMAIL PROTECTED]">news:99528g$v58$[EMAIL PROTECTED]...
 : ""YoBro"" [EMAIL PROTECTED] wrote:
 :  Does anybody know any good books  websites to recommend for PHP 
MySql
 :  together. I am looking to advance my knowledge and would really
 appreciate
 : a
 :  helpful tip.
 : 
 :  Really looking for a book that explains all the advanced features of
 PHP4
 :  and MySql as a compliment.
 :
 : I can't give you an unbiased opinion on whether it is good or not, but
you
 : might like to look at "PHP and MySQL Web Development"
 : by Luke Welling and Laura Thomson.
 :
 : Here is a link to it on Amazon.
 : http://www.amazon.com/exec/obidos/ASIN/0672317842
 : although you can probably get it cheaper elsewhere.
 :
 : It will be published in 10 days.
 :
 : Cheers,
 :
 : Luke Welling
 :
 :
 :
 : --
 : PHP General Mailing List (http://www.php.net/)
 : To unsubscribe, e-mail: [EMAIL PROTECTED]
 : For additional commands, e-mail: [EMAIL PROTECTED]
 : To contact the list administrators, e-mail: [EMAIL PROTECTED]
 :



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




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




Re: [PHP] Using php4.02 on IIS5

2001-03-20 Thread Phil Driscoll

I guess you have installed the ISAPI module which, as stated in the
instructions, is not very stable.
Switch to the cgi version and all will come good. Change php4isapi.dll to
php.exe in your script mappings, and remove phpp from the filters list.

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


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




Re: [PHP] dl()-function

2001-03-20 Thread Yasuo Ohgaki

Did you read
http://www.php.net/manual/en/function.dl.php
and related manual pages?

If you are having problem with dl(), what is  your PHP version?
I forgot which version, but some PHP seems does not load extensions with dl().
Look for bug db, I think this bug is closed.

As a short term resolution, how about just use php.ini to load it?

Regards,
--
Yasuo Ohgaki

"Jochen Kaechelin" [EMAIL PROTECTED] wrote in message
NFBBLHGFAKNLFNPOHMPHGEHFCCAA.jk@intern">news:NFBBLHGFAKNLFNPOHMPHGEHFCCAA.jk@intern...
 How can I dynamically load the PDF-extension only when
 needed?


 --
 phpArbeitsgruppe in Gruendung - Jochen Kaechelin
 Stuttgarter Str.3, D-73033 Goeppingen
 Tel. 07161-92 95 94, Fax 07161-92 95 98
 http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED]

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



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




RE: [PHP] Conversion between dates and weeknumbers

2001-03-20 Thread Jennifer Woodhead

I think you can do it using
strftime

%V - The ISO 8601:1988 week number of the current year as a decimal number,
range 01 to 53, where week 1 is the first week that has at least 4 days in
the current year, and with Monday as the first day of the week. 

%W - week number of the current year as a decimal number, starting with the
first Monday as the first day of the first week 


-Original Message-
From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 09:03
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Conversion between dates and weeknumbers


How about use PEAR/Date/Calc.php?

Regards,
--
Yasuo Ohgaki

"Michel Groenenstijn" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello everybody,

 I need to convert between dates and weeknumbers, with PHP.  Converting a
 given date to a weeknumber can be done with MySQL, but I don't know how
 to go the other way around. I need a function like
 get_dates_in_week($weeknumber). A function to convert between a date and
 a weeknumber without using mysql would help too...

 Can anyone help?

 Thanx!
 Michel


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



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

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




Re: [PHP] off the topic but relevant with us

2001-03-20 Thread Yasuo Ohgaki

Are you sure your domain is managed by NSI (network solutions)?
My domains are not (bunch of .com .net .org), and your domain might be.

If you are just looking for whois server, I suggest to use search engines. (i.e.
yahoo, lycos, etc)

Regards,
--
Yasuo Ohgaki

""Jacky"" [EMAIL PROTECTED] wrote in message
024801c0b15f$a53e31e0$[EMAIL PROTECTED]">news:024801c0b15f$a53e31e0$[EMAIL PROTECTED]...
Hi people
this is off the topic but I want to change teh DNS setup for one of my site
www.europeanevents.com and I went to http://www.networksolutions.com/makechanges
to do that , but it said the domain was not found in WHOIS database, wherelse I
can check up to chaneg DNS?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



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




Re: [PHP] deleted cookie

2001-03-20 Thread Yasuo Ohgaki

"Nikolai Vladychevski" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 My site has been working with cookies just fine  until i discovered
 that some browsers (i think it is some browser under MacOS, I'm
 investigating) instead of deleting a cookie, set it to value "deleted",
 so in my code this variable has a value and believes there is a user
 called "deleted" trying to reauth. a lot users can't login to my
 site ater their session times out due to this cause My question is,

I'm not sure what you ment for "deleted cookie". Anyway,

I heard some of Internet Explor will not take cookies that have expire time less
than current_time + 7200 sec.
(I don't verify this myself, though) Is your cookie expire time is long enough?

Regards,
--
Yasuo Ohgaki

 I am dealing with some new bug of explorer or there is a standard I am
 missing? Should I implement in my code this feature doing with "deleted"
 cookies? Or maybe it's a php bug? I run php-4.0.4pl1 

 Thanks in advance

 Nikolai

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



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




[PHP] presentation software used by Rasmus Lerdorf

2001-03-20 Thread Henkie

Hi,

Recently, I saw a presentation by Rasmus Lerdorf about php.  He used
netscape and php scripts as presentation software and it looked really cool.
Does someone know if this is somewhere available ?

Thanks,

Henk



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




RE: [PHP] Editing Variables from another script.

2001-03-20 Thread Stewart Taylor



include "database.inc"
.
.
.
.
$dbhost='localhost';



-Stewart

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 09:26
To: Jason Stechschulte
Cc: 'PHP General List. (E-mail)'
Subject: Re: [PHP] Editing Variables from another script.


Okay, basically,

I'm trying to create a script such that it will change the variables inside
of my .inc page.

Something like

lets say I have this file called "database.inc"
Inside it I have :

$dbhost = 'blah'
$dbuser= 'blah'
$dbpass= 'blah'

I would like to make a script such that I can modify the $variables into
something else like, $dbhost into localhost.

How can it be done?
- Original Message -
From: "Jason Stechschulte" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED]
Sent: Monday, March 19, 2001 11:03 PM
Subject: Re: [PHP] Editing Variables from another script.


 On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote:

  I'm trying to create a form whereby I can edit the variables with just
the form.
 
  It will be something like a form for me to change the database
details(username,server,password) in a .inc I'm using.
 
  Is there anyway for me to pass information into another file's variable
and have it saved in there?
 
  If anyone have seen Newspro (CGI) before, when you edit some parts in a
form, the information will be saved. How can it be done in PHP?

 There is probably a hundred or more ways this can be done.  For me to be
 able to give you specifics, you will have to be more specific with what
 you are doing and what you have tried.

 --
 Jason Stechschulte
 [EMAIL PROTECTED]
 --
 Well, I think Perl should run faster than C.  :-)
  -- Larry Wall in [EMAIL PROTECTED]

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



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

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




Re: [PHP] Editing Variables from another script.

2001-03-20 Thread techzeus

I think you didn't get what I meant,

I need a script such that I can change the content of database.inc from an
external script (form or whatever)


- Original Message -
From: "Stewart Taylor" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 5:57 PM
Subject: RE: [PHP] Editing Variables from another script.




 include "database.inc"
 .
 .
 .
 .
 $dbhost='localhost';



 -Stewart

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 20 March 2001 09:26
 To: Jason Stechschulte
 Cc: 'PHP General List. (E-mail)'
 Subject: Re: [PHP] Editing Variables from another script.


 Okay, basically,

 I'm trying to create a script such that it will change the variables
inside
 of my .inc page.

 Something like

 lets say I have this file called "database.inc"
 Inside it I have :

 $dbhost = 'blah'
 $dbuser= 'blah'
 $dbpass= 'blah'

 I would like to make a script such that I can modify the $variables into
 something else like, $dbhost into localhost.

 How can it be done?
 - Original Message -
 From: "Jason Stechschulte" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED]
 Sent: Monday, March 19, 2001 11:03 PM
 Subject: Re: [PHP] Editing Variables from another script.


  On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote:
 
   I'm trying to create a form whereby I can edit the variables with just
 the form.
  
   It will be something like a form for me to change the database
 details(username,server,password) in a .inc I'm using.
  
   Is there anyway for me to pass information into another file's
variable
 and have it saved in there?
  
   If anyone have seen Newspro (CGI) before, when you edit some parts in
a
 form, the information will be saved. How can it be done in PHP?
 
  There is probably a hundred or more ways this can be done.  For me to be
  able to give you specifics, you will have to be more specific with what
  you are doing and what you have tried.
 
  --
  Jason Stechschulte
  [EMAIL PROTECTED]
  --
  Well, I think Perl should run faster than C.  :-)
   -- Larry Wall in [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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

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




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




Re: [PHP] Why not 'file_exists()' for URLs?

2001-03-20 Thread Mike

On 19 Mar 2001 06:53:00 -0800, [EMAIL PROTECTED] ("David G.") wrote:
 Since fopen/fread/fclose all work with standard URLs, why not allow
 file_exists() to work with URLs as well?
 What is the procedure to make such a request?


Try this:

function url_exist($url) {
$url_parts = parse_url($url);
$fp = fsockopen($url_parts["host"], 80);
if (!$fp) return false;
$path = $url_parts["path")?$url_parts["path"]:"/";
fwrite($fp, "GET $path HTTP/1.0\r\n\r\n");
$response = fgets($fp, 500);
preg_match("/^HTTP\/\d\.\d[ \t]+(\d+)[ \t]*([^\r]*)/", $response, $matches);
switch ($matches[1]) {
case 404: // HTTP error not found
return false;
case 200: // HTTP OK
return true;
default:
return false; // other responses probably counts false
}
}


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




[PHP] imap functions

2001-03-20 Thread Calin Rotaru

I cofigured apache 1.3.14 with php4 on my computer(Mandrake 7.2) but I can 
not use imap functions. I read that I have to compile PHP with imap. I did 
it, but I get some errors when compile apache whit this php.
Can anybody help me with some advices?
Thanks.

Calin

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




Re: [PHP] Editing Variables from another script.

2001-03-20 Thread ben

On Tue, 20 Mar 2001 [EMAIL PROTECTED] wrote:

 I think you didn't get what I meant,
 
 I need a script such that I can change the content of database.inc from an
 external script (form or whatever)

Have you tried with global variables (see array $GLOBALS) ?

--
Ben
Committee, n.: A group of men who individually can do nothing but as a
group decide that nothing can be done. -- Fred Allen

 - Original Message -
 From: "Stewart Taylor" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, March 20, 2001 5:57 PM
 Subject: RE: [PHP] Editing Variables from another script.
 
  include "database.inc"
  .
  .
  .
  .
  $dbhost='localhost';
 
  -Stewart
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 20 March 2001 09:26
  To: Jason Stechschulte
  Cc: 'PHP General List. (E-mail)'
  Subject: Re: [PHP] Editing Variables from another script.
 
  Okay, basically,
 
  I'm trying to create a script such that it will change the variables
 inside
  of my .inc page.
 
  Something like
 
  lets say I have this file called "database.inc"
  Inside it I have :
 
  $dbhost = 'blah'
  $dbuser= 'blah'
  $dbpass= 'blah'
 
  I would like to make a script such that I can modify the $variables into
  something else like, $dbhost into localhost.
 
  How can it be done?
  - Original Message -
  From: "Jason Stechschulte" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED]
  Sent: Monday, March 19, 2001 11:03 PM
  Subject: Re: [PHP] Editing Variables from another script.
 
 
   On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote:
  
I'm trying to create a form whereby I can edit the variables with just
  the form.
   
It will be something like a form for me to change the database
  details(username,server,password) in a .inc I'm using.
   
Is there anyway for me to pass information into another file's
 variable
  and have it saved in there?
   
If anyone have seen Newspro (CGI) before, when you edit some parts in
 a
  form, the information will be saved. How can it be done in PHP?
  
   There is probably a hundred or more ways this can be done.  For me to be
   able to give you specifics, you will have to be more specific with what
   you are doing and what you have tried.
  
   --
   Jason Stechschulte
   [EMAIL PROTECTED]
   --
   Well, I think Perl should run faster than C.  :-)
-- Larry Wall in [EMAIL PROTECTED]
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]



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




Re: [PHP] Dynamic generation of text files?

2001-03-20 Thread Dan Costello

Michael-

Thank you, it works perfectly!

--Dan

"Michael Kimsal" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 a href="/scripts/GenericCard.php?uid=UniqueUserKey"Click here for John
 Doe's vCard/a

 GenericCard.php would have something like...

 //
 // build $text from $uid passed in
 //
 header("Content-type: x/y");
 header("Content-Disposition: attachment; filename=$filename" );
 print $text;
 exit();

 "x/y" would be something like text/html or application/vnd.excel or
 something like that.  Whatever the defined MIME header for
 Vcards is, put that after the content-type.  $filename
 would be the name of the file you want to call this - something.vcf
 I'd expect.

 We do this with Excel files all the time - sending down tab-delimited
text,
 and putting an excel application header on the file.

 Dan Costello wrote:

  Hi,
 
  I'm trying to get my site to generate text files with a certain
extension
  and MIME-type from a database, "on the fly".
 
  Specifically, I would like to build something that can create vCards,
that
  is, text files of a particular format with the extension *.vcf,
mime-type
  text/x-vcard, _at the time that the user clicks the link to download the
  file_.
 
  Currently, the only way I have of doing this is prebuilding all the vcf
  files when the page is built, then deleting them when the user goes
  somewhere else -- pretty inefficient. I'd really like to have, e.g. a
bunch
  of links that look like this:
 
  a href="/scripts/GenericCard.vcf?uid=UniqueUserKey"Click here for John
  Doe's vCard/a
 
  ...so that when the user clicks the link, their contact manager
(Outlook, or
  whatever) fires up on their machine and displays the freshly-generated
  vCard.
 
  I have, of course, thought of modifying the httpd.conf to have apache
parse
  files with a .vcf extension through the php interpreter -- I think that
this
  would be a very bad idea. ;-)
 
  So, is this too much to hope for?


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




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




RE: [PHP] Editing Variables from another script.

2001-03-20 Thread Neil Kimber

Do you mean that you want to alter the physical contents of 'database.inc'?
This would require you parsing the existing file yourself, writing a new
version of the file, altering the relevant line of code, removing the
original file and renaming your new file to the original filename.

This isn't a good approach, are you sure there isn't a different way for you
acheive your aims?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 10:02
To: Stewart Taylor; [EMAIL PROTECTED]
Subject: Re: [PHP] Editing Variables from another script.


I think you didn't get what I meant,

I need a script such that I can change the content of database.inc from an
external script (form or whatever)


- Original Message -
From: "Stewart Taylor" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 5:57 PM
Subject: RE: [PHP] Editing Variables from another script.




 include "database.inc"
 .
 .
 .
 .
 $dbhost='localhost';



 -Stewart

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 20 March 2001 09:26
 To: Jason Stechschulte
 Cc: 'PHP General List. (E-mail)'
 Subject: Re: [PHP] Editing Variables from another script.


 Okay, basically,

 I'm trying to create a script such that it will change the variables
inside
 of my .inc page.

 Something like

 lets say I have this file called "database.inc"
 Inside it I have :

 $dbhost = 'blah'
 $dbuser= 'blah'
 $dbpass= 'blah'

 I would like to make a script such that I can modify the $variables into
 something else like, $dbhost into localhost.

 How can it be done?
 - Original Message -
 From: "Jason Stechschulte" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED]
 Sent: Monday, March 19, 2001 11:03 PM
 Subject: Re: [PHP] Editing Variables from another script.


  On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote:
 
   I'm trying to create a form whereby I can edit the variables with just
 the form.
  
   It will be something like a form for me to change the database
 details(username,server,password) in a .inc I'm using.
  
   Is there anyway for me to pass information into another file's
variable
 and have it saved in there?
  
   If anyone have seen Newspro (CGI) before, when you edit some parts in
a
 form, the information will be saved. How can it be done in PHP?
 
  There is probably a hundred or more ways this can be done.  For me to be
  able to give you specifics, you will have to be more specific with what
  you are doing and what you have tried.
 
  --
  Jason Stechschulte
  [EMAIL PROTECTED]
  --
  Well, I think Perl should run faster than C.  :-)
   -- Larry Wall in [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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

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




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




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




Re: [PHP] Hash syntaxes? simple but helpful

2001-03-20 Thread Alexander Gräf


$xy=array("a"="orange","b"="banana","c"="fruit");



--


[EMAIL PROTECTED]
+49 9721 188848
+49 171 370 97 15


""Costas"" [EMAIL PROTECTED] schrieb im Newsbeitrag
997b0s$3cl$[EMAIL PROTECTED]">news:997b0s$3cl$[EMAIL PROTECTED]...
 I am used to perl syntax of:

 $var-{'abc'}   for a hash (associative array)

 Can this syntax be done for PHP.

 What other syntax is there for PHP hashes? Any that look like this?



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




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




Re: [PHP] Why not 'file_exists()' for URLs?

2001-03-20 Thread Yasuo Ohgaki

[Since original poster requests for procedure for feature/change request.]

You can use bug reporting system to request new feature or changes.
http://www.php.net/bugs.php

Use "Feature/Change Request" as "Type of bug".
It will be sent to php-dev mail list and stored as feature/change request in db.

Regards,

--
Yasuo Ohgaki

"Mike" [EMAIL PROTECTED] wrote in message 1103_985083470@matthew">news:1103_985083470@matthew...
 On 19 Mar 2001 06:53:00 -0800, [EMAIL PROTECTED] ("David G.") wrote:
  Since fopen/fread/fclose all work with standard URLs, why not allow
  file_exists() to work with URLs as well?
  What is the procedure to make such a request?


 Try this:

 function url_exist($url) {
 $url_parts = parse_url($url);
 $fp = fsockopen($url_parts["host"], 80);
 if (!$fp) return false;
 $path = $url_parts["path")?$url_parts["path"]:"/";
 fwrite($fp, "GET $path HTTP/1.0\r\n\r\n");
 $response = fgets($fp, 500);
 preg_match("/^HTTP\/\d\.\d[ \t]+(\d+)[ \t]*([^\r]*)/", $response, $matches);
 switch ($matches[1]) {
 case 404: // HTTP error not found
 return false;
 case 200: // HTTP OK
 return true;
 default:
 return false; // other responses probably counts false
 }
 }


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



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




Re: [PHP] get_meta_tags bug?

2001-03-20 Thread Yasuo Ohgaki
FYI:
Looks like it is fixed in CVS version and get_meta_tags() now accepts single
quotes.
(I still recommends to use double quotes for your application, but we cannot
force
others and single quotes should be accepted for older HTML versions)

Regards,

--
Yasuo Ohgaki

""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
9974us$e26$[EMAIL PROTECTED]">news:9974us$e26$[EMAIL PROTECTED]...
 May be get_meta_tags() is XHTML compliant.
 (XHTML requires "" and lowercases for attributes)
 I suggest you to use double quotes.

 --
 Yasuo Ohgaki

 "Paul Rees" [EMAIL PROTECTED] wrote in message
 r19NDKAFmot6Ew$[EMAIL PROTECTED]">news:r19NDKAFmot6Ew$[EMAIL PROTECTED]...
  Hi,
 
  The php function 'get_meta_tags' doesn't work when the meta tag name/
  content values are single quoted. It's fine for double quotes. I've had
  a look but can't find anything on the w3 site to say whether or not
  double quotes are required in meta tags. Does anyone know what the rule
  is?
 
  (php v 4.04pl1, apache, linux 2.2.18)
 
  All the best
  --
  Paul
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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



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


[PHP] General security Question (Databases)

2001-03-20 Thread ben . 2 . edwards

The examples of holding passwords in databases (i.e. mysql) tend to encrypt
the password.  Although this seems sensible (if not necessary) it douse mean
that if a user forgets there password the normal solution is to generate a
new random password and email it to them.  Then I realised that this fafing
about was all a bit unnecessary.  Surly if security has been breached to the
extent that the user table can be accesses chances are that the intruder
could delete data from tables or even drop them.  In fact the best solution
is to set up proper database users rather than your own 'application' users.
This way you can set it up (at database level) so that for 'Punters' they
can only read most of the data and 'Administrators' have fuller access.

So maybe the conclusion is there is no point in encryption passwords but
there are very good reasons to have users an 'real' database users.

What do you lot reckon.

Ben.

--
[EMAIL PROTECTED] (ben@work until end March)
[EMAIL PROTECTED] (ben@home)


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




[PHP] Easy Object Reading

2001-03-20 Thread Thorsten Viel

Hi,

does somebody know a function where I can read all variables of an object
independent of there name?

I have to test with large classes, more than 30 vars per class, and dont
want to implement a function just for testing.
I want to echo all values of vars of a class without specifyieng explicitly
every single varname.

Hope somebody can help me.


Thanks

Thorsten



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




[PHP] get filename?

2001-03-20 Thread KPortsmout

Hi

Whats the best method to get the filename of the file I am using. E.G if the 
file is called tom_woz_here.php and would I go about stickin that into 
$FileName= ???

Thanks

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




Re: [PHP] get_meta_tags bug?

2001-03-20 Thread Paul rees

In article 997dil$t5u$[EMAIL PROTECTED], Yasuo Ohgaki
[EMAIL PROTECTED] writes

 "Paul Rees" [EMAIL PROTECTED] wrote in message
 r19NDKAFmot6Ew$[EMAIL PROTECTED]">news:r19NDKAFmot6Ew$[EMAIL PROTECTED]...
  Hi,
 
  The php function 'get_meta_tags' doesn't work when the meta tag name/
  content values are single quoted. It's fine for double quotes. I've had
  a look but can't find anything on the w3 site to say whether or not
  double quotes are required in meta tags. Does anyone know what the rule
  is?
 
  (php v 4.04pl1, apache, linux 2.2.18)

FYI:
Looks like it is fixed in CVS version and get_meta_tags() now accepts single
quotes.
(I still recommends to use double quotes for your application, but we cannot
force
others and single quotes should be accepted for older HTML versions)

Yes, you're right. Thanks very much. Out of interest, why do you
recommend the use of double quotes? It's so much easier to use single
quotes in these sort of cases:

echo "INPUT type='text' name='name' value='value'\n";

rather than:

echo "INPUT type=\"text\" name=\"name\" value=\"value\"\n";

or:

echo 'INPUT type="text" name="name" value="value"' . "\n";

...and according to this:

http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2

... double, single, and (sometimes) no quotes are all acceptable.

All the best,
-- 
Paul Rees

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




[PHP] RE: Help with array creation

2001-03-20 Thread Tim Ward

they are already in one ... $HTTP_POST_VARS or $HTTP_GET_VARS

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: Chris Carbaugh [mailto:[EMAIL PROTECTED]]
 Sent: 19 March 2001 21:58
 To: [EMAIL PROTECTED]
 Subject: Help with array creation
 
 
 
 Hello,
 
 I'm trying to take the query string of a url and turn it into an
 associative array.
 
 Let's say I have a URL like 
 
 myHost.com/somepage.php?val1=oneval2=two
 
 I can get the query with HTTP_SERVER_VARS["QUERY_STRING"], 
 but how do I
 generate an array equivilent to
 
 array('val1'='one', 'val2'='two')
 
 Also, this example uses a GET method.  First, can I do this?  
 Also, can
 I do this with a POST method?
 
 Thanks,
 Chris
 
 

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




Re: [PHP] usage of constants

2001-03-20 Thread Yasuo Ohgaki
""almir"" [EMAIL PROTECTED] wrote in message
997fat$jdk$[EMAIL PROTECTED]">news:997fat$jdk$[EMAIL PROTECTED]...
 are constants global, do i have to do something in my classes so that i can
 use them as object variables, i have tested in with functions seems to be
 global but how about classes and has anybody used it realy


I'm not sure if I get your point or not, anyway.
Constants can be accessed from anywhere, in function, in class - NOT class
initilizer if there are expressions involved.
i.e.
classs foo {
   var $something = CONSTANT1 | CONSTANT2; // This is INVALID
   var $another = CONSTANT1; // This is VALID
}

I use a lots of constants with my classes.

Regards,
--
Yasuo Ohgaki

 regards
 almir



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



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


FW: [PHP] PHP4 Compile As Per Bug id #2933 AMMENDED - FIXED!

2001-03-20 Thread Grant Walters

 Actually my error is
 php_odbc.c: In function `odbc_column_lengths':
 php_odbc.c:606: `SQLINTEGER' undeclared (first use in this function)
 php_odbc.c:606: (Each undeclared identifier is reported only once
 php_odbc.c:606: for each function it appears in.)
 php_odbc.c:606: parse error before `len'
 php_odbc.c:634: `len' undeclared (first use in this function)

I went back to the latest source relaaes and found the following which I
have included in my pl2 version.


---
#if defined(HAVE_SOLID) || defined(HAVE_SOLID_30) || defined(HAVE_OPENLINK)
/* this seems to be necessary for Solid2.3 ( tested by
 * [EMAIL PROTECTED]) and Solid 3.0 (tested by
[EMAIL PROTECTED])
 * Solid does not seem to declare a SQLINTEGER, but it does declare a
 * SQL_INTEGER which does not work (despite being the same type as a
SDWORD.
 * Solid 3.5 does not have this issue.
 */
SDWORD len;
#else
SQLINTEGER len;
#endif

---

php_odbc.c now compiles, the rest is still compiling :-)

Regards

Grant Walters
Brainbench 'Most Valuable Professional' for Unix Admin
Walters  Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989


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




RE: [PHP] get filename?

2001-03-20 Thread Jon Haworth

$FileName = $PHP_SELF;

HTH
Jon


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 13:20
To: [EMAIL PROTECTED]
Subject: [PHP] get filename?


Hi

Whats the best method to get the filename of the file I am using. E.G if the

file is called tom_woz_here.php and would I go about stickin that into 
$FileName= ???

Thanks

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



**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**

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




[PHP] phpinfo() doesn't list compiled --with

2001-03-20 Thread Gary Huntress

I compiled php --with-pgsql, but phpinfo() doesn't list that.is this a
problem with php.ini?

Thanks,

Gary



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




[PHP-CVS] cvs: php4 /ext/yp yp.c

2001-03-20 Thread Sascha Schumann

sas Tue Mar 20 04:50:26 2001 EDT

  Modified files:  
/php4/ext/ypyp.c 
  Log:
  fix build
  
  
Index: php4/ext/yp/yp.c
diff -u php4/ext/yp/yp.c:1.17 php4/ext/yp/yp.c:1.18
--- php4/ext/yp/yp.c:1.17   Mon Mar 19 09:01:35 2001
+++ php4/ext/yp/yp.cTue Mar 20 04:50:26 2001
@@ -16,7 +16,7 @@
|  Fredrik Ohrn|
+--+
  */
-/* $Id: yp.c,v 1.17 2001/03/19 17:01:35 ohrn Exp $ */
+/* $Id: yp.c,v 1.18 2001/03/20 12:50:26 sas Exp $ */
 
 #include "php.h"
 #include "ext/standard/info.h"
@@ -214,6 +214,7 @@
 static int php_foreach_all (int instatus, char *inkey, int inkeylen, char *inval, int 
invallen, char *indata)
 {
int r;
+   CLS_FETCH();
 
zval *status, *key, *value;
zval **args [3] = { status, key, value };
@@ -227,8 +228,6 @@
 
MAKE_STD_ZVAL (value);
ZVAL_STRINGL (value, inval, invallen, 1);
-
-   CLS_FETCH();
 
if(call_user_function_ex(CG(function_table), NULL, *((zval **)indata), 
retval, 3, args, 0, NULL) != SUCCESS)
{



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




[PHP] Problems connecting to remote mySQL server

2001-03-20 Thread Floyd Piedad

I am trying to connect to a remote mySQL server through PHP but I get a
mySQL error of "Unknown Database".  I can connect to the remote mySQL server
using the mysql command but not with PHP.

1. How can I debug what the problem is?
2. Do I need to specify the Port parameter in PHP?
3. Which mySQL error logs do I examine to help me out - the one on the local
machine or on the remote machine?
4. And where is the mySQL error logs anyway?

I tried other lists but no help there.  I hope this list helps!

Thanks all,

Floyd Piedad


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




Re: [PHP] get filename?

2001-03-20 Thread Data Driven Design

$PHP_SELF will be the filename including $QUERY_STRING and $PATH_INFO
variables, $SCRIPT_NAME should be just the filename.

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 5:19 AM
Subject: [PHP] get filename?


 Hi

 Whats the best method to get the filename of the file I am using. E.G if
the
 file is called tom_woz_here.php and would I go about stickin that into
 $FileName= ???

 Thanks

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




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




Re: [PHP] Editing Variables from another script.

2001-03-20 Thread techzeus

What other ways might there be ?


- Original Message -
From: "Neil Kimber" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "Stewart Taylor"
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 6:10 PM
Subject: RE: [PHP] Editing Variables from another script.


 Do you mean that you want to alter the physical contents of
'database.inc'?
 This would require you parsing the existing file yourself, writing a new
 version of the file, altering the relevant line of code, removing the
 original file and renaming your new file to the original filename.

 This isn't a good approach, are you sure there isn't a different way for
you
 acheive your aims?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 20 March 2001 10:02
 To: Stewart Taylor; [EMAIL PROTECTED]
 Subject: Re: [PHP] Editing Variables from another script.


 I think you didn't get what I meant,

 I need a script such that I can change the content of database.inc from an
 external script (form or whatever)


 - Original Message -
 From: "Stewart Taylor" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, March 20, 2001 5:57 PM
 Subject: RE: [PHP] Editing Variables from another script.


 
 
  include "database.inc"
  .
  .
  .
  .
  $dbhost='localhost';
 
 
 
  -Stewart
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 20 March 2001 09:26
  To: Jason Stechschulte
  Cc: 'PHP General List. (E-mail)'
  Subject: Re: [PHP] Editing Variables from another script.
 
 
  Okay, basically,
 
  I'm trying to create a script such that it will change the variables
 inside
  of my .inc page.
 
  Something like
 
  lets say I have this file called "database.inc"
  Inside it I have :
 
  $dbhost = 'blah'
  $dbuser= 'blah'
  $dbpass= 'blah'
 
  I would like to make a script such that I can modify the $variables into
  something else like, $dbhost into localhost.
 
  How can it be done?
  - Original Message -
  From: "Jason Stechschulte" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED]
  Sent: Monday, March 19, 2001 11:03 PM
  Subject: Re: [PHP] Editing Variables from another script.
 
 
   On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED]
wrote:
  
I'm trying to create a form whereby I can edit the variables with
just
  the form.
   
It will be something like a form for me to change the database
  details(username,server,password) in a .inc I'm using.
   
Is there anyway for me to pass information into another file's
 variable
  and have it saved in there?
   
If anyone have seen Newspro (CGI) before, when you edit some parts
in
 a
  form, the information will be saved. How can it be done in PHP?
  
   There is probably a hundred or more ways this can be done.  For me to
be
   able to give you specifics, you will have to be more specific with
what
   you are doing and what you have tried.
  
   --
   Jason Stechschulte
   [EMAIL PROTECTED]
   --
   Well, I think Perl should run faster than C.  :-)
-- Larry Wall in [EMAIL PROTECTED]
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




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



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




RE: [PHP] Easy Object Reading

2001-03-20 Thread Grant Walters

 -Original Message-
 From: Thorsten Viel [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 21 March 2001 00:59
 To: [EMAIL PROTECTED]
 Subject: [PHP] Easy Object Reading


 Hi,

 does somebody know a function where I can read all variables of an object
 independent of there name?

 I have to test with large classes, more than 30 vars per class, and dont
 want to implement a function just for testing.
 I want to echo all values of vars of a class without specifyieng
 explicitly
 every single varname.


var_dump(PHP3 = 3.0.5, PHP4 )
Dumps information about a variable
void var_dump (mixed expression)
This function returns structured information about an expression that
includes its type and value.
Arrays are explored recursively with values indented to show structure.
Compare var_dump() to print_r().

1
2 pre
3 ?php
4 $a = array (1, 2, array ("a", "b", "c"));
5 var_dump ($a);
6 ?
7 /pre
8


Regards

Grant Walters
Brainbench 'Most Valuable Professional' for Unix Admin
Walters  Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989


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




Re: [PHP] get filename?

2001-03-20 Thread Joe Sheble (Wizaerd)

excuse my ignorance here, but is this a configurable options?  Anytime I 
use $PHP_SELF, it strictly the directory and filename..

for example say I have a forum running at 
www.somedomain.com/forum/index?Message=12

my $PHP_SELF strictly gives me /forum/index.php.  I know this for a fact 
because I use a hybrid of the CF coding style of fusebox, and all my form 
actions are set to $PHP_SELF and the $QUERY_STRING info is never appended 
to it...

At 09:05 AM 3/20/01 -0800, Data Driven Design wrote:
$PHP_SELF will be the filename including $QUERY_STRING and $PATH_INFO
variables, $SCRIPT_NAME should be just the filename.

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 5:19 AM
Subject: [PHP] get filename?


  Hi
 
  Whats the best method to get the filename of the file I am using. E.G if
the
  file is called tom_woz_here.php and would I go about stickin that into
  $FileName= ???
 
  Thanks
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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


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




RE: [PHP] Editing Variables from another script.

2001-03-20 Thread Neil Kimber

It depends upon what your overall aim actually is.

If you want a different value depending upon where this file is being used
in your site, then you should probably just set the value accordingly in
that part of the site.
i.e.
  include "database.inc"
  .
  .
  .
  .
  $dbhost='localhost';

If you want a different value in the same place based upon a different
'user' or other criteria, then you should probably write some logic to
handle the situation.
i.e.

include "database.inc";

if (MYCRITERIA)
{
$dbhost='localhost';
}

The only reason that I can think of for you wanting to change the physical
file would be if you are writing some code to generate a release for
different users. In which case, you'll probably want to build a parser and
use some kind of templating system.

Neil

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 14:08
To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
Subject: Re: [PHP] Editing Variables from another script.


What other ways might there be ?


- Original Message -
From: "Neil Kimber" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "Stewart Taylor"
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 6:10 PM
Subject: RE: [PHP] Editing Variables from another script.


 Do you mean that you want to alter the physical contents of
'database.inc'?
 This would require you parsing the existing file yourself, writing a new
 version of the file, altering the relevant line of code, removing the
 original file and renaming your new file to the original filename.

 This isn't a good approach, are you sure there isn't a different way for
you
 acheive your aims?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 20 March 2001 10:02
 To: Stewart Taylor; [EMAIL PROTECTED]
 Subject: Re: [PHP] Editing Variables from another script.


 I think you didn't get what I meant,

 I need a script such that I can change the content of database.inc from an
 external script (form or whatever)


 - Original Message -
 From: "Stewart Taylor" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, March 20, 2001 5:57 PM
 Subject: RE: [PHP] Editing Variables from another script.


 
 
  include "database.inc"
  .
  .
  .
  .
  $dbhost='localhost';
 
 
 
  -Stewart
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 20 March 2001 09:26
  To: Jason Stechschulte
  Cc: 'PHP General List. (E-mail)'
  Subject: Re: [PHP] Editing Variables from another script.
 
 
  Okay, basically,
 
  I'm trying to create a script such that it will change the variables
 inside
  of my .inc page.
 
  Something like
 
  lets say I have this file called "database.inc"
  Inside it I have :
 
  $dbhost = 'blah'
  $dbuser= 'blah'
  $dbpass= 'blah'
 
  I would like to make a script such that I can modify the $variables into
  something else like, $dbhost into localhost.
 
  How can it be done?
  - Original Message -
  From: "Jason Stechschulte" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED]
  Sent: Monday, March 19, 2001 11:03 PM
  Subject: Re: [PHP] Editing Variables from another script.
 
 
   On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED]
wrote:
  
I'm trying to create a form whereby I can edit the variables with
just
  the form.
   
It will be something like a form for me to change the database
  details(username,server,password) in a .inc I'm using.
   
Is there anyway for me to pass information into another file's
 variable
  and have it saved in there?
   
If anyone have seen Newspro (CGI) before, when you edit some parts
in
 a
  form, the information will be saved. How can it be done in PHP?
  
   There is probably a hundred or more ways this can be done.  For me to
be
   able to give you specifics, you will have to be more specific with
what
   you are doing and what you have tried.
  
   --
   Jason Stechschulte
   [EMAIL PROTECTED]
   --
   Well, I think Perl should run faster than C.  :-)
-- Larry Wall in [EMAIL PROTECTED]
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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

RE: [PHP] Easy Object Reading

2001-03-20 Thread Neil Kimber

If you don't want to dump this to the screen but would prefer to have this
in a string (to send to a log file etc..) then use the following function:

function getStringFromObject($prmAryIn)
{
// Following code was ripped from
http://www.php.net/manual/en/function.var-dump.php
// it's very nice indeed!!
ob_start();
var_dump($prmAryIn);
$output = ob_get_contents();
ob_end_clean();

return $output;
}


-Original Message-
From: Grant Walters [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 14:08
To: Php-General
Cc: Thorsten Viel
Subject: RE: [PHP] Easy Object Reading


 -Original Message-
 From: Thorsten Viel [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 21 March 2001 00:59
 To: [EMAIL PROTECTED]
 Subject: [PHP] Easy Object Reading


 Hi,

 does somebody know a function where I can read all variables of an object
 independent of there name?

 I have to test with large classes, more than 30 vars per class, and dont
 want to implement a function just for testing.
 I want to echo all values of vars of a class without specifyieng
 explicitly
 every single varname.


var_dump(PHP3 = 3.0.5, PHP4 )
Dumps information about a variable
void var_dump (mixed expression)
This function returns structured information about an expression that
includes its type and value.
Arrays are explored recursively with values indented to show structure.
Compare var_dump() to print_r().

1
2 pre
3 ?php
4 $a = array (1, 2, array ("a", "b", "c"));
5 var_dump ($a);
6 ?
7 /pre
8


Regards

Grant Walters
Brainbench 'Most Valuable Professional' for Unix Admin
Walters  Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989


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




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




Re: [PHP] Editing Variables from another script.

2001-03-20 Thread techzeus

Basically, thats not what I'm going to do.

I'm making an administrative script such that admins can change the location
and values of the $dbhost, $dbuser, $dbpass in the database.inc with just a
form.

Kinda tough eh ?

- Original Message -
From: "Neil Kimber" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "Stewart Taylor"
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 10:25 PM
Subject: RE: [PHP] Editing Variables from another script.


 It depends upon what your overall aim actually is.

 If you want a different value depending upon where this file is being used
 in your site, then you should probably just set the value accordingly in
 that part of the site.
 i.e.
   include "database.inc"
   .
   .
   .
   .
   $dbhost='localhost';

 If you want a different value in the same place based upon a different
 'user' or other criteria, then you should probably write some logic to
 handle the situation.
 i.e.

 include "database.inc";

 if (MYCRITERIA)
 {
 $dbhost='localhost';
 }

 The only reason that I can think of for you wanting to change the physical
 file would be if you are writing some code to generate a release for
 different users. In which case, you'll probably want to build a parser and
 use some kind of templating system.

 Neil

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 20 March 2001 14:08
 To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
 Subject: Re: [PHP] Editing Variables from another script.


 What other ways might there be ?


 - Original Message -
 From: "Neil Kimber" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; "Stewart Taylor"
 [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, March 20, 2001 6:10 PM
 Subject: RE: [PHP] Editing Variables from another script.


  Do you mean that you want to alter the physical contents of
 'database.inc'?
  This would require you parsing the existing file yourself, writing a new
  version of the file, altering the relevant line of code, removing the
  original file and renaming your new file to the original filename.
 
  This isn't a good approach, are you sure there isn't a different way for
 you
  acheive your aims?
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 20 March 2001 10:02
  To: Stewart Taylor; [EMAIL PROTECTED]
  Subject: Re: [PHP] Editing Variables from another script.
 
 
  I think you didn't get what I meant,
 
  I need a script such that I can change the content of database.inc from
an
  external script (form or whatever)
 
 
  - Original Message -
  From: "Stewart Taylor" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Tuesday, March 20, 2001 5:57 PM
  Subject: RE: [PHP] Editing Variables from another script.
 
 
  
  
   include "database.inc"
   .
   .
   .
   .
   $dbhost='localhost';
  
  
  
   -Stewart
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: 20 March 2001 09:26
   To: Jason Stechschulte
   Cc: 'PHP General List. (E-mail)'
   Subject: Re: [PHP] Editing Variables from another script.
  
  
   Okay, basically,
  
   I'm trying to create a script such that it will change the variables
  inside
   of my .inc page.
  
   Something like
  
   lets say I have this file called "database.inc"
   Inside it I have :
  
   $dbhost = 'blah'
   $dbuser= 'blah'
   $dbpass= 'blah'
  
   I would like to make a script such that I can modify the $variables
into
   something else like, $dbhost into localhost.
  
   How can it be done?
   - Original Message -
   From: "Jason Stechschulte" [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED]
   Sent: Monday, March 19, 2001 11:03 PM
   Subject: Re: [PHP] Editing Variables from another script.
  
  
On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED]
 wrote:
   
 I'm trying to create a form whereby I can edit the variables with
 just
   the form.

 It will be something like a form for me to change the database
   details(username,server,password) in a .inc I'm using.

 Is there anyway for me to pass information into another file's
  variable
   and have it saved in there?

 If anyone have seen Newspro (CGI) before, when you edit some parts
 in
  a
   form, the information will be saved. How can it be done in PHP?
   
There is probably a hundred or more ways this can be done.  For me
to
 be
able to give you specifics, you will have to be more specific with
 what
you are doing and what you have tried.
   
--
Jason Stechschulte
[EMAIL PROTECTED]
--
Well, I think Perl should run faster than C.  :-)
 -- Larry Wall in [EMAIL PROTECTED]
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
   
  

RE: [PHP] off the topic but relevant with us

2001-03-20 Thread Angerer, Chad

Probably wherever you registered your domain name.  Unless you have had it
transferred somewhere.

chad angerer
html programmer

.. :one man with a club is a hooligan. a thousand men with clubs are a
regiment: ..



-Original Message-
From: Jacky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 11:03 AM
To: [EMAIL PROTECTED]
Cc: Ben Weinberger
Subject: [PHP] off the topic but relevant with us


Hi people
this is off the topic but I want to change teh DNS setup for one of my site
www.europeanevents.com and I went to
http://www.networksolutions.com/makechanges to do that , but it said the
domain was not found in WHOIS database, wherelse I can check up to chaneg
DNS?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"

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




[PHP] Fwd: BEST Network Marketer Leads

2001-03-20 Thread jennivaughn_02




ATTENTION!

I Found this company on the internet.  They came very highly recommended
by several of my friends and associates.  They have the most qualified leads I
have ever worked.  Forget those generic phone leads... sign up 5 out of
15 or more every time!!

They Are having a 33% off sale this week only!!

Sale Ends Friday, So I wanted this to get out to anyone who would find this
service of use, as I very much did!!

Thanks,
Jenni Vaughn

Oh...by the waY... THERE SITE ADDRESS IS: 

http://www.geocities.com/leads4you911/






**
THIS EMAIL COMPLIES WITH ALL REGULATIONS.  TO BE REMOVED SIMPLY
EMAIL [EMAIL PROTECTED] FOR IMMEDIATE REMOVAL FROM ANY
FUTURE EMAILS FROM OUR COMPANY.
**

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




Re: [PHP] Problems connecting to remote mySQL server

2001-03-20 Thread almir

when you connect to server issue
"show databases" -query then look inside what you can see some servers are
case sensitive
i hope that will help,
and are you sure that you are connected , it could be that you may not
connect at all because of firewalls or something like that
-almir



"Floyd Piedad" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am trying to connect to a remote mySQL server through PHP but I get a
 mySQL error of "Unknown Database".  I can connect to the remote mySQL
server
 using the mysql command but not with PHP.

 1. How can I debug what the problem is?
 2. Do I need to specify the Port parameter in PHP?
 3. Which mySQL error logs do I examine to help me out - the one on the
local
 machine or on the remote machine?
 4. And where is the mySQL error logs anyway?

 I tried other lists but no help there.  I hope this list helps!

 Thanks all,

 Floyd Piedad


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




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




[PHP] Working with files

2001-03-20 Thread Jon

It is a newbie question about working with local files. I just want to know
if it posible to open and modify a local file (I mean that it is located in
the local hard disk of the client machine) or because of security reasons it
is only posible to open and modify it when the file resides in the server
machine. Besides, I would also like to know which are the functions I should
use to work with this file.

Thanks in advanced,



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




[PHP] Status on ISAPI PHP

2001-03-20 Thread Carsten Gehling

What is the status on the ISAPI version of PHP?

Last I looked (4.0.1) it was still rather unstable.

- Carsten



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




[PHP-CVS] cvs: php4 /tests testdom

2001-03-20 Thread Uwe Steinmann

steinm  Tue Mar 20 07:02:11 2001 EDT

  Modified files:  
/php4/tests testdom 
  Log:
  - test script for rewritten domxml module
  
  
Index: php4/tests/testdom
diff -u php4/tests/testdom:1.18 php4/tests/testdom:1.19
--- php4/tests/testdom:1.18 Fri Nov 10 02:28:30 2000
+++ php4/tests/testdom  Tue Mar 20 07:02:10 2001
@@ -1,49 +1,4 @@
 ?php
-
-function output_node($node, $level=0) {
-  switch($node-type) {
-case XML_ELEMENT_NODE:
-  for($i=0; $i$level; $i++)
-echo "  ";
-  echo "".$node-name;
-  $attributes = $node-attributes();
-  if(is_array($attributes)) {
-//var_dump($attributes);
-foreach($attributes as $attribute)
-  echo " ".$attribute-name."=".$node-getattr($attribute-name);
-  }
-  echo "\n";
-  $children = $node-children();
-  for($i=0; $i  count($children); $i++)
-output_node($children[$i], $level+1);
-  for($i=0; $i$level; $i++)
-echo "  ";
-  echo "/".$node-name."\n";
-  break;
-case XML_TEXT_NODE:
-  for($i=0; $i$level; $i++)
-echo "  ";
-  echo $node-content;
-  break;
-case XML_ENTITY_REF_NODE:
-  echo $node-content;
-  break;
-case XML_COMMENT_NODE:
-  for($i=0; $i$level; $i++)
-echo "  ";
-  echo "!--".$node-content."--";
-  echo "\n";
-  break;
-  }
-}
-
-function list_attr($node) {
-  $attr = domxml_attributes($node);
-  for(reset($attr); $key = key($attr); next($attr)) {
-echo $key."=".$attr[$key]."\n";
-  }
-}
-
 $xmlstr = "?xml version='1.0' standalone='yes'?
 !DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'
 [ !ENTITY sp \"spanish\"
@@ -65,69 +20,54 @@
 /para
 /chapter ";
 
-/* The following code traverses the xml tree node by node
-   by using the methods of the xmlnode object
-*/
 echo "Test 1: accessing single nodes from php\n";
-if(!$dom = xmldoc($xmlstr)) {
+$dom = xmldoc($xmlstr);
+if(!$dom) {
   echo "Error while parsing the document\n";
   exit;
 }
-echo "XML Version: ".$dom-version."\n";
-echo "Standalone: ".$dom-standalone."\n";
-$dtd = $dom-dtd();
-$rootnode = $dom-children();
-foreach($rootnode as $root)
-  output_node($root);
-$rootnode = $dom-root();
-  output_node($rootnode);
-
-/* This one creates a dom tree made of php objects */
-echo "Test 2: creating a tree with php objects\n";
-$dom = xmltree($xmlstr);
-$dom-root-name = "section";
-echo $dom-root-name;
-echo "\n";
-/* xmltree() creates a tree which is readonly. This means that a
-   function like 
- $dom-root-new_child("TEST", "ljdf");
-   won't work
-*/
-
-/* The following builds a xml document from scratch */
-echo "Test 3: building a xml document from scratch\n";
-$doc = new_xmldoc("1.0");
-$root = $doc-add_root("HTML");
-$head = $root-new_child("HEAD", "");
-$head-new_child("TITLE", "Hier der Titel");
-$body = $root-new_child("BODY", "");
-$table = $body-new_child("TABLE", "");
-$table-setattr("WIDTH", "100%");
-$table-new_child("TR", " ");
-echo $doc-dumpmem();
-
-/* The following does some testing of the xpath support */
-echo "Test 4: See if XPath works\n";
-if(!$dom = xmldoc($xmlstr)) {
-  echo "Error while parsing the document\n";
-  exit;
-}
 
-if(false === ($xpathctx = xpath_new_context($dom))) {
-   echo "Error in xpath_new_context()\n";
-   exit;
-}
+$children = $dom-childNodes();
+print_r($children);
+
+echo "- root\n";
+$rootnode = $dom-documentElement();
+print_r($rootnode);
+
+echo "- children of root\n";
+$children = $rootnode-childNodes();
+print_r($children);
+
+// The last node should be identical with the last entry in the children array
+echo "- last\n";
+$last = $rootnode-lastChild();
+print_r($last);
+
+// The parent of this last node is the root again
+echo "- parent\n";
+$parent = $last-parent();
+print_r($parent);
+
+// The children of this parent are the same children as one above
+echo "- children of parent\n";
+$children = $parent-childNodes();
+print_r($children);
+
+echo "- creating a new attribute\n";
+$attr = $dom-createAttribute("src", "picture.gif");
+print_r($attr);
+
+$rootnode-setAttributeNode($attr); /* Not implemented */
+$attr = $rootnode-setAttribute("src", "picture.gif");
+$attr = $rootnode-getAttribute("src");
+print_r($attr);
+
+echo "- attribute of rootnode\n";
+$attrs = $rootnode-attributes();
+print_r($attrs);
+
+echo "- children of an attribute\n";
+$children = $attrs[0]-childNodes();
+print_r($children);
 
-/* What you get back is an object of type XPathObject.
-   Depending on the sub type of XPathObject, the property
-   'value' or 'nodeset' contains the result.
-   The sub type is in property 'type'.
-   See docs for libxml for valid types.
-   1 means XPATH_NODESET which is in PHP an array of DomNodes.
-*/
-$xpathobj = xpath_eval($xpathctx, "/child::*");
-echo $xpathobj-type."\n";
-var_dump($xpathobj);
-foreach($xpathobj-nodeset as $node)
-   echo $node-name."\n";
 ?



-- 

[PHP] Cookies

2001-03-20 Thread Francesc Lladó

? setcookie("nombre1",'nombre2',time()+86400); ?

Utilizo este cdigo para depositar una cookie en el cliente, lo nico
que me caduca al cabo de un tiempo, alguin sabe qu es lo que tengo
que poner para que la cookie no caduque nunca?

Gracias

--
Francesc Llad i Dardet
[EMAIL PROTECTED]

Interkonet Publishers s.l.
Atenes 22
08006 Barcelona
Tel. 932 530 866
Fax. 932 530 866
http://www.interkonet.com
[EMAIL PROTECTED]



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




Re: [PHP] Working with files

2001-03-20 Thread Chris Lee

stanard newbie answer :)

php is server side, not client side

php is serverside there is no way of ever ever doing anything client side because of 
this.

http://php.net/manual/en/function.fopen.php

are the functions for opening files.


-- 

 Chris Lee
 [EMAIL PROTECTED]



""Jon"" [EMAIL PROTECTED] wrote in message 997rk2$q1i$[EMAIL PROTECTED]">news:997rk2$q1i$[EMAIL PROTECTED]...
It is a newbie question about working with local files. I just want to know
if it posible to open and modify a local file (I mean that it is located in
the local hard disk of the client machine) or because of security reasons it
is only posible to open and modify it when the file resides in the server
machine. Besides, I would also like to know which are the functions I should
use to work with this file.

Thanks in advanced,



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



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




RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Jeff Armstrong

One problem is that you are only checking the first booking.
  select * from booking where room='room'
gives ALL bookings, and you look like you are just testing
the FIRST one.

why not turn it round and do:
  select * from booking where
('$start'=startdate and '$start'=enddate) or
('$end'=startdate and '$end'=enddate)

This lets mySQL do the test for you.
If it returns a row you already have a booking.


-Original Message-
From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 11:50 AM
To: Peter Chr. Hansen
Cc: [EMAIL PROTECTED]
Subject: Re: SV: [PHP] Booking by Date/Time in mySQL


Peter,

what do you mean by Newdate between date1  date2??
the logic i'm using is that i'm checkin if the new
Start Date  End date lies between the old Start Date
 End Date or not. If it does, than entry is denied,
else booking is succesfull. But things are not
running, following is the code i'm using ...
--
?php
$db = mysql_connect("localhost","root");
mysql_select_db("nidc_intranet",$db);

$realsdate="$syear"."-"."$smonth"."-"."$stdate";
$realedate="$eyear"."-"."$emonth"."-"."$endate";
$realstime="$shh".":"."$smm"." "."$sttime";
$realetime="$ehh".":"."$emm"." "."$entime";

$result = mysql_query("SELECT * FROM booking where
room='$rooms',$db);
if ($myrow = mysql_fetch_array($result)) {
  do {
if ($realsdate=$myrow[sdate]) 
($realsdate=$myrow[edate]) 
($realedate=$myrow[sdate]) 
($realedate=$myrow[edate]) {
echo "Sorry";
}
else {

$sql = "INSERT INTO booking
(room,sdate,edate,stime,etime,purpose,reserved) VALUES
('$rooms','$realsdate','$realedate','$realstime','$realetime','$purpose','$r
es')";
$result = mysql_query($sql) or Die ("An unexpected
error occured. Please go back and book again.");
echo "font face=helvetica size=2
color=#140057bThank you! font
color=#ff$rooms/font, has been booked from
font color=#ff$realsdate/font to font
color=#ff$realedate/font.
brbr
** Entries will be deleted 2 weeks after the End
Date.
";
}
  } while ($myrow = mysql_fetch_array($result));
}
 ?


Regards,
T. Edison jr.

--- "Peter Chr. Hansen" [EMAIL PROTECTED] wrote:
 Can't you use "
   Newdate between date1 and date2


 -Oprindelig meddelelse-
 Fra: Thomas Edison Jr.
 [mailto:[EMAIL PROTECTED]]
 Sendt: 20. marts 2001 12:25
 Til: [EMAIL PROTECTED]
 Emne: [PHP] Booking by Date/Time in mySQL


 I'm facing this problem.
 I have made a room booking application.
 There is a Start Date  Time and End Date  Time of
 Booking a room.

 Problem is that once booked, you can't book a room
 with a date or time that falls between an Already
 booked  Date  Time.

 For example, if someone's booked a room from 3rd
 March
 to 10th March between 4:00 p.m. to 12:00 p.m. , you
 can't book the same room for the any date between
 3rd
 March to 10th March and between 4 pm  12 pm.

 How do i do that?

 Regards,
 T. Edison jr.


 =
 Rahul S. Johari (Director)
 **
 Abraxas Technologies Inc.
 Homepage : http://www.abraxastech.com
 Email : [EMAIL PROTECTED]
 Tel : 91-4546512/4522124
 ***

 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/

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


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

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


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




[PHP] RE: checboxex and sessions

2001-03-20 Thread Tim Ward

You need to submit the form, at which point any checkboxes ticked will be
available in php (under their html name attribute) for assigning as session
variables. Any not set will, unfortunately, not be sent. You can initialise
the session variables, defaulting to false, on the form page to get around
this.

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: karakedi [mailto:[EMAIL PROTECTED]]
 Sent: 20 March 2001 03:17
 To: [EMAIL PROTECTED]
 Subject: checboxex and sessions
 
 
 how can i store checkbox variables into sessions so that i 
 can use them on
 other pages ?
 
 i know how to register sessions but simply cant do that with 
 checkboxes.
 thx in adv.
 
 
 

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




php-general Digest 20 Mar 2001 15:53:13 -0000 Issue 578

2001-03-20 Thread php-general-digest-help


php-general Digest 20 Mar 2001 15:53:13 - Issue 578

Topics (messages 44681 through 44762):

off the topic but relevant with us
44681 by: Jacky
44703 by: Yasuo Ohgaki
44754 by: Angerer, Chad

Re: wordwrap() in php4.03pl1 does not work(?)
44682 by: Tiki

Re: PHP hosts?
44683 by: Robert Morse

Re: checboxex and sessions
44684 by: Yasuo Ohgaki
44688 by: karakedi
44694 by: Yasuo Ohgaki
44762 by: Tim Ward

Mail and a DSL Router
44685 by: Todd Cary

Re: Using php4.02 on IIS5
44686 by: Data Driven Design
44699 by: Phil Driscoll

Re: get name of file
44687 by: Data Driven Design

Re: PHP w/ Oracle OCI8 - how stable?
44689 by: Rudolf Visagie
44709 by: Neil Kimber
44730 by: Hardy Merrill
44731 by: Thies C. Arntzen

Re: HELP insert still dosn't work
44690 by: Rudolf Frint

The right way to include class files?
44691 by: Chien-pin Wang
44692 by: Chien-pin Wang

[Q] Parser behavior in a string
44693 by: Yasuo Ohgaki

Conversion between dates and weeknumbers
44695 by: Michel Groenenstijn
44701 by: Yasuo Ohgaki
44702 by: Jennifer Woodhead

Re: Help with array creation
44696 by: Yasuo Ohgaki
44740 by: Tim Ward

Re: get_meta_tags bug?
44697 by: Yasuo Ohgaki
44718 by: Yasuo Ohgaki
44738 by: Paul rees

Re: PHP  MYSQL BOOKS
44698 by: Luke Welling

Re: dl()-function
44700 by: Yasuo Ohgaki

Re: "deleted" cookie
44704 by: Yasuo Ohgaki

Re: Editing Variables from another script.
44705 by: techzeus.pacific.net.sg
44707 by: Stewart Taylor
44708 by: techzeus.pacific.net.sg
44713 by: ben
44715 by: Neil Kimber
44719 by: Thomas Schneider
44748 by: techzeus.pacific.net.sg
44751 by: Neil Kimber
44753 by: techzeus.pacific.net.sg

presentation software used by Rasmus Lerdorf
44706 by: Henkie

Re: Why not 'file_exists()' for URLs?
44710 by: Mike
44717 by: Yasuo Ohgaki

imap functions
44711 by: Calin Rotaru

Hash syntaxes? simple but helpful
44712 by: Costas
44716 by: Alexander Gräf
44733 by: almir

Re: Dynamic generation of text files?
44714 by: Dan Costello

General security Question (Databases)
44720 by: ben.2.edwards.bt.com

Re: weeks revisited
44721 by: Christian Reiniger

Re: Remember my username  password
44722 by: Batis

Booking by Date/Time in mySQL
44723 by: Thomas Edison Jr.
44726 by: Thomas Edison Jr.
44761 by: Jeff Armstrong

Re: php editors
44724 by: almir

usage of constants
44725 by: almir
44741 by: Yasuo Ohgaki

is PHP sftp ready?
44727 by: Nando2

Re: \"deleted\" cookie
44728 by: almir
44729 by: almir

PHP4 Compile As Per Bug id #2933
44732 by: Grant Walters

Easy Object Reading
44734 by: Thorsten Viel
44737 by: Stewart Taylor
44749 by: Grant Walters
44752 by: Neil Kimber

get filename?
44735 by: KPortsmout.aol.com
44743 by: Jon Haworth
44745 by: Yasuo Ohgaki
44747 by: Data Driven Design
44750 by: Joe Sheble (Wizaerd)

Re: Script to convert # of seconds to HH:mm
44736 by: Tim Ward

PHP4 Compile As Per Bug id #2933 AMMENDED
44739 by: Grant Walters

Re: PHP4 Compile As Per Bug id #2933 AMMENDED - FIXED!
44742 by: Grant Walters

phpinfo() doesn't list compiled --with
44744 by: Gary Huntress

Problems connecting to remote mySQL server
44746 by: Floyd Piedad
44758 by: almir

Re: BEST Network  Marketer Leads
44755 by: jennivaughn_02.juno.com

Cookies
44756 by: Francesc Lladó

Working with files
44757 by: Jon
44760 by: Chris Lee

Status on ISAPI PHP
44759 by: Carsten Gehling

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



Hi people
this is off the topic but I want to change teh DNS setup for one of my site 
www.europeanevents.com and I went to http://www.networksolutions.com/makechanges to do 
that , but it said the domain was not found in WHOIS database, wherelse I can check up 
to chaneg DNS?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




Are you sure your domain is managed by NSI (network solutions)?
My domains are not (bunch of .com .net .org), and your domain might be.

If you are just looking for whois server, I suggest to use search engines. (i.e.
yahoo, lycos, etc)

Regards,
--
Yasuo Ohgaki

""Jacky"" [EMAIL PROTECTED] wrote in message
024801c0b15f$a53e31e0$[EMAIL 

RE: [PHP] how do i get a variable type? - not that simple

2001-03-20 Thread Dennis Gearon

I discovered the same thing, that all values from text fields ARE
text, i.e. strings. Also, that an empty field IS set upon return,
s...

To check for empty field, check for empty STRING equivalence:
if ( $input_var_from_form == "" ){
Do something because filed is empty;
} else {
Do something because filed has a value;
}

To make a 'safe' casting from the input string to an int, I test
for the above test in combination with requiring the first
char in the field to be a number. I wasn't worried that
they all were numbers. This comes to .

if ( $input_var_from_form == "" || ! egrep( "^[0-9]",
$input_var_from_form ){
Do something because not an int;
} else {
$input_var_from_form = (int) $input_var_from_form;
Do something because it IS an in;
}

I'm sure there's similar things that could be done for a float, or if an
object
was being filled by a set of form fields, all the fields would be tested
the
same way as the object filled itself.

Dennis Gearon

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




Re: [PHP] Problems with Linux PHP

2001-03-20 Thread Dennis Gearon

try 'chmod 0700 session', as I believe it's octal in linux.

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




RE: [PHP] Editing Variables from another script.

2001-03-20 Thread Neil Kimber

Gotya. The why not limit your include file to only contain those values that
are important to you. So you get something like:

varsdatabase.inc

$dbhost="x";
$dbuser="y";
$dbpass="z";

Then, in your PHP code you just rewrite this simple file. That way you don't
have to worry about parsing files etc... Just delete the existing
varsdatabase.inc and build a new one from scratch. It's no longer difficult
because it's only 3 lines long.




   $dbhost='localhost';

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 14:26
To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
Subject: Re: [PHP] Editing Variables from another script.


Basically, thats not what I'm going to do.

I'm making an administrative script such that admins can change the location
and values of the $dbhost, $dbuser, $dbpass in the database.inc with just a
form.

Kinda tough eh ?

- Original Message -
From: "Neil Kimber" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "Stewart Taylor"
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 10:25 PM
Subject: RE: [PHP] Editing Variables from another script.


 It depends upon what your overall aim actually is.

 If you want a different value depending upon where this file is being used
 in your site, then you should probably just set the value accordingly in
 that part of the site.
 i.e.
   include "database.inc"
   .
   .
   .
   .
   $dbhost='localhost';

 If you want a different value in the same place based upon a different
 'user' or other criteria, then you should probably write some logic to
 handle the situation.
 i.e.

 include "database.inc";

 if (MYCRITERIA)
 {
 $dbhost='localhost';
 }

 The only reason that I can think of for you wanting to change the physical
 file would be if you are writing some code to generate a release for
 different users. In which case, you'll probably want to build a parser and
 use some kind of templating system.

 Neil

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 20 March 2001 14:08
 To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
 Subject: Re: [PHP] Editing Variables from another script.


 What other ways might there be ?


 - Original Message -
 From: "Neil Kimber" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; "Stewart Taylor"
 [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, March 20, 2001 6:10 PM
 Subject: RE: [PHP] Editing Variables from another script.


  Do you mean that you want to alter the physical contents of
 'database.inc'?
  This would require you parsing the existing file yourself, writing a new
  version of the file, altering the relevant line of code, removing the
  original file and renaming your new file to the original filename.
 
  This isn't a good approach, are you sure there isn't a different way for
 you
  acheive your aims?
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 20 March 2001 10:02
  To: Stewart Taylor; [EMAIL PROTECTED]
  Subject: Re: [PHP] Editing Variables from another script.
 
 
  I think you didn't get what I meant,
 
  I need a script such that I can change the content of database.inc from
an
  external script (form or whatever)
 
 
  - Original Message -
  From: "Stewart Taylor" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Tuesday, March 20, 2001 5:57 PM
  Subject: RE: [PHP] Editing Variables from another script.
 
 
  
  
   include "database.inc"
   .
   .
   .
   .
   $dbhost='localhost';
  
  
  
   -Stewart
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: 20 March 2001 09:26
   To: Jason Stechschulte
   Cc: 'PHP General List. (E-mail)'
   Subject: Re: [PHP] Editing Variables from another script.
  
  
   Okay, basically,
  
   I'm trying to create a script such that it will change the variables
  inside
   of my .inc page.
  
   Something like
  
   lets say I have this file called "database.inc"
   Inside it I have :
  
   $dbhost = 'blah'
   $dbuser= 'blah'
   $dbpass= 'blah'
  
   I would like to make a script such that I can modify the $variables
into
   something else like, $dbhost into localhost.
  
   How can it be done?
   - Original Message -
   From: "Jason Stechschulte" [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED]
   Sent: Monday, March 19, 2001 11:03 PM
   Subject: Re: [PHP] Editing Variables from another script.
  
  
On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED]
 wrote:
   
 I'm trying to create a form whereby I can edit the variables with
 just
   the form.

 It will be something like a form for me to change the database
   details(username,server,password) in a .inc I'm using.

 Is there anyway for me to pass information into another file's
  variable
   and have it saved in there?

 If anyone have seen Newspro (CGI) before, when you edit 

[PHP-CVS] cvs: php4 / NEWS

2001-03-20 Thread Uwe Steinmann

steinm  Tue Mar 20 07:03:33 2001 EDT

  Modified files:  
/php4   NEWS 
  Log:
  - news about domxml
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.615 php4/NEWS:1.616
--- php4/NEWS:1.615 Mon Mar 19 18:09:17 2001
+++ php4/NEWS   Tue Mar 20 07:03:33 2001
@@ -2,6 +2,7 @@
 |||
 
 ?? ??? 200?, Version 4.0.6
+- rewrite of domxml. It's now mostly DOM Level 2 conform (Uwe)
 - Added array_map() function that applies a callback to the elements
   of given arrays and returns the result. It can also be used with a
   null callback to transpose arrays. (Andrei)



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




Re: [PHP] MS SQL databse connecting

2001-03-20 Thread Dennis Gearon

 Michael Kimsa wrote:
What am I missing?

What you are missing, Michael, is that ODBC is for access to a
proprietary, commercial product from a monopolist megalith.

To use ODBC, on is accessing (pun intended) a non open source database,
i.e., you gots to pay M$. This means for someone to write an open source
library, they are aiming it at people who are trying to AVOID paying for
M$ products OR use products where the technical support leaves a lot to
be desired and there's no control over problems in the product. Pretty
incompatible.

Which is not to say someone wouldn't do it, there's always a NEED for
that in individual cases like yours, but there's not much of a MARKET, I
would guess.

Dennis Gearon.

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




[PHP-CVS] cvs: php4 /ext/domxml php_domxml.c php_domxml.h

2001-03-20 Thread Uwe Steinmann

steinm  Tue Mar 20 07:01:14 2001 EDT

  Modified files:  
/php4/ext/domxmlphp_domxml.c php_domxml.h 
  Log:
  - complete rewrite of domxml module.
It is now mostly conform to DOM Level 2 though some classes and 
methods are still missing
  
  

Index: php4/ext/domxml/php_domxml.c
diff -u php4/ext/domxml/php_domxml.c:1.28 php4/ext/domxml/php_domxml.c:1.29
--- php4/ext/domxml/php_domxml.c:1.28   Sun Feb 25 22:06:53 2001
+++ php4/ext/domxml/php_domxml.cTue Mar 20 07:01:13 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_domxml.c,v 1.28 2001/02/26 06:06:53 andi Exp $ */
+/* $Id: php_domxml.c,v 1.29 2001/03/20 15:01:13 steinm Exp $ */
 
 
 #include "php.h"
@@ -24,33 +24,46 @@
 
 #if HAVE_DOMXML
 #include "ext/standard/info.h"
-/*#define newcode*/
 #define PHP_XPATH 1
 #define PHP_XPTR 2
 
 static int le_domxmldocp;
+static int le_domxmldoctypep;
 static int le_domxmldtdp;
 static int le_domxmlnodep;
+static int le_domxmlelementp;
 static int le_domxmlattrp;
-/* static int le_domxmlnsp; */
+static int le_domxmlcdatap;
+static int le_domxmltextp;
+static int le_domxmlpip;
+static int le_domxmlcommentp;
+static int le_domxmlentityp;
+static int le_domxmlnsp;
 
 #if defined(LIBXML_XPATH_ENABLED)
 static int le_xpathctxp;
 static int le_xpathobjectp;
-static zend_class_entry *xpathctx_class_entry_ptr;
-static zend_class_entry *xpathobject_class_entry_ptr;
 #endif
 
-static zend_class_entry *domxmldoc_class_entry_ptr;
-static zend_class_entry *domxmldtd_class_entry_ptr;
-static zend_class_entry *domxmlnode_class_entry_ptr;
-static zend_class_entry *domxmlattr_class_entry_ptr;
-static zend_class_entry *domxmlns_class_entry_ptr;
-
-#ifdef newcode
-static zend_class_entry *domxmltestnode_class_entry_ptr;
+zend_class_entry *domxmldoc_class_entry;
+zend_class_entry *domxmldoctype_class_entry;
+zend_class_entry *domxmlelement_class_entry;
+zend_class_entry *domxmldtd_class_entry;
+zend_class_entry *domxmlnode_class_entry;
+zend_class_entry *domxmlattr_class_entry;
+zend_class_entry *domxmlcdata_class_entry;
+zend_class_entry *domxmltext_class_entry;
+zend_class_entry *domxmlpi_class_entry;
+zend_class_entry *domxmlcomment_class_entry;
+zend_class_entry *domxmlnotation_class_entry;
+zend_class_entry *domxmlentity_class_entry;
+zend_class_entry *domxmlns_class_entry;
+#if defined(LIBXML_XPATH_ENABLED)
+zend_class_entry *xpathctx_class_entry;
+zend_class_entry *xpathobject_class_entry;
 #endif
 
+
 static int node_attributes(zval **attributes, xmlNode *nodep);
 static int node_children(zval **children, xmlNode *nodep);
 
@@ -58,19 +71,26 @@
PHP_FE(xmldoc,  NULL)
PHP_FE(xmldocfile,  NULL)
PHP_FE(xmltree, NULL)
-   PHP_FE(domxml_root, NULL)
+   PHP_FALIAS(domxml_root, domxml_doc_document_element, NULL)
PHP_FE(domxml_add_root, NULL)
PHP_FE(domxml_dumpmem,  NULL)
-   PHP_FE(domxml_attributes,   NULL)
-   PHP_FE(domxml_get_attribute,NULL)
-   PHP_FALIAS(domxml_getattr,  domxml_get_attribute, NULL)
-   PHP_FE(domxml_set_attribute,NULL)
-   PHP_FALIAS(domxml_setattr,  domxml_set_attribute, NULL)
-   PHP_FE(domxml_children, NULL)
-   PHP_FE(domxml_new_child,NULL)
+   PHP_FE(domxml_node_attributes,  NULL)
+   PHP_FALIAS(domxml_attributes,   domxml_node_attributes, NULL)
+   PHP_FE(domxml_elem_get_attribute,   NULL)
+   PHP_FALIAS(domxml_get_attribute,domxml_elem_get_attribute, NULL)
+   PHP_FALIAS(domxml_getattr,  domxml_elem_get_attribute, NULL)
+   PHP_FE(domxml_elem_set_attribute,   NULL)
+   PHP_FALIAS(domxml_set_attribute,domxml_elem_set_attribute, NULL)
+   PHP_FALIAS(domxml_setattr,  domxml_elem_set_attribute, NULL)
+   PHP_FE(domxml_node_children,NULL)
+   PHP_FALIAS(domxml_children, domxml_node_children, NULL)
+   PHP_FE(domxml_node_new_child,   NULL)
+   PHP_FALIAS(domxml_new_child,domxml_node_new_child, NULL)
PHP_FE(domxml_node, NULL)
-   PHP_FE(domxml_unlink_node,  NULL)
-   PHP_FE(domxml_set_content,  NULL)
+   PHP_FE(domxml_node_unlink_node, NULL)
+   PHP_FALIAS(domxml_unlink_node,  domxml_node_unlink_node, NULL)
+   PHP_FE(domxml_node_set_content, NULL)
+   PHP_FALIAS(set_content, domxml_node_set_content,NULL)
PHP_FE(domxml_new_xmldoc,   NULL)
PHP_FALIAS(new_xmldoc, domxml_new_xmldoc,   NULL)
 #if defined(LIBXML_XPATH_ENABLED)
@@ -86,41 +106,151 @@
 };
 
 
-static zend_function_entry php_domxmldoc_class_functions[] = {
-   PHP_FALIAS(root,domxml_root,NULL)
-   PHP_FALIAS(children,domxml_children,NULL)
+static function_entry php_domxmldoc_class_functions[] = {
+// PHP_FALIAS(domdocument, xmldoc, NULL)
+   {"domdocument", PHP_FN(xmldoc), NULL},
+   PHP_FALIAS(doctype, domxml_doc_doctype, 

[PHP] URGENT! Regarding file manipulation

2001-03-20 Thread Nemanja Djuric

Hi!

What is the best way to delete line from a file?

I want to delete line which is located somewhere in the middle of the
.txt file.
I dont want to leave blank line.

10x
Nemanja

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




[PHP-CVS] cvs: php4 /win32 registry.c

2001-03-20 Thread Daniel Beulshausen

dbeuTue Mar 20 07:44:55 2001 EDT

  Modified files:  
/php4/win32 registry.c 
  Log:
  fix registry per directory values
  # they never really worked for me before
  
Index: php4/win32/registry.c
diff -u php4/win32/registry.c:1.8 php4/win32/registry.c:1.9
--- php4/win32/registry.c:1.8   Sun Oct 29 03:38:26 2000
+++ php4/win32/registry.c   Tue Mar 20 07:44:55 2001
@@ -1,10 +1,6 @@
 #include "php.h"
 #include "php_ini.h"
-#include "php_registry.h"
 
-#define MAX_NAMEBUF_LEN512
-#define MAX_VALUE_LEN  512
-
 void UpdateIniFromRegistry(char *path)
 {
char *p, *orig_path;
@@ -53,23 +49,36 @@
 
while (p) {
HKEY hKey;
-   char namebuf[MAX_NAMEBUF_LEN], valuebuf[MAX_VALUE_LEN];
DWORD lType;
-   DWORD namebuf_length=MAX_NAMEBUF_LEN, valuebuf_length=MAX_VALUE_LEN;
-   DWORD i=0;
-
+   DWORD values = 0, max_name = 0, max_value = 0, i = 0;
+   
if (ppath) {
*(p-1) = '\\'; /* restore the slash */
}
+
if (RegOpenKeyEx(MainKey, path, 0, KEY_READ, hKey)!=ERROR_SUCCESS) {
break;
}
-   while (RegEnumValue(hKey, i++, namebuf, namebuf_length, NULL, lType, 
valuebuf, valuebuf_length)==ERROR_SUCCESS) {
-   if (lType != REG_SZ) {
-   continue;
+
+   if(RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, NULL, NULL, values, 
+max_name, max_value, NULL, NULL) == ERROR_SUCCESS) {
+   LPTSTR namebuf = (LPTSTR)emalloc(max_name + 1);
+   PBYTE valuebuf = (PBYTE)emalloc(max_value);
+
+   while (i  values) {
+   DWORD namebuf_len  = max_name + 1;
+   DWORD valuebuf_len = max_value;
+
+   RegEnumValue(hKey, i, namebuf, namebuf_len, NULL, 
+lType, valuebuf, valuebuf_len);
+
+   if ((lType == REG_SZ) || (lType == REG_EXPAND_SZ)) {
+   zend_alter_ini_entry(namebuf, namebuf_len + 1, 
+valuebuf, valuebuf_len, PHP_INI_PERDIR, PHP_INI_STAGE_ACTIVATE);
+   }
+
+   i++;
}
-   /*printf("%s - %s\n", namebuf, valuebuf);*/
-   zend_alter_ini_entry(namebuf, namebuf_length+1, valuebuf, 
valuebuf_length+1, PHP_INI_PERDIR, PHP_INI_STAGE_ACTIVATE);
+
+   efree(namebuf);
+   efree(valuebuf);
}
 
RegCloseKey(hKey);



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




[PHP] Couple Questions

2001-03-20 Thread acleave

I'm new to this list (and relatively new to PHP) so if I'm failing in some 
point of list ettiquette, please excuse me.  I have two questions:

1)  How do I return multiple data types at once from a function?  For instance 
I might want to return 5, "apple", and true (an int, a string, and a boolean) 
all at once from a function.

2)  How does the predefined variable $HTTP_REFERER work with forms?  I know 
the documentation says that it doesn't work with all browsers as the browser 
has the actual info but I tested it with IE 5 and NS 4.7 and it worked 
perfectly (for me).  My real concern is could it be fooled in a simple manner 
or even turned off by selecting different settings in either of those two 
browsers?  Or would it require a dedicated cracker and/or someone writing 
their own browser to give a false report (vs. no report at all)?

Was I even clear on what I want to know? :)

Thanks.
Allan


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




[PHP] Anyone interested to build with me a chat software (in php and MySQL)

2001-03-20 Thread Marian Vasile

I want to create a free php and MySQL chat.

Anyone interested in this project ?



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




RE: [PHP] how do i get a variable type? - not that simple

2001-03-20 Thread Rudolf Visagie

Under some conditions (I haven't determined which) 
 if ($input_var_from_form == "")
doesn't work, but
 if (strlen($input_var_from_form) == 0)
does.

Rudolf Visagie
[EMAIL PROTECTED]

-Original Message-
From: Dennis Gearon [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 06:24
To: [EMAIL PROTECTED]
Subject: RE: [PHP] how do i get a variable type? - not that simple


I discovered the same thing, that all values from text fields ARE
text, i.e. strings. Also, that an empty field IS set upon return,
s...

To check for empty field, check for empty STRING equivalence:
if ( $input_var_from_form == "" ){
Do something because filed is empty;
} else {
Do something because filed has a value;
}

To make a 'safe' casting from the input string to an int, I test
for the above test in combination with requiring the first
char in the field to be a number. I wasn't worried that
they all were numbers. This comes to .

if ( $input_var_from_form == "" || ! egrep( "^[0-9]",
$input_var_from_form ){
Do something because not an int;
} else {
$input_var_from_form = (int) $input_var_from_form;
Do something because it IS an in;
}

I'm sure there's similar things that could be done for a float, or if an
object
was being filled by a set of form fields, all the fields would be tested
the
same way as the object filled itself.

Dennis Gearon

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

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




Re: [PHP] how do i get a variable type? - not that simple

2001-03-20 Thread Dennis Gearon

Very interesting! I'd think it would be a bug if it did work that way.

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




[PHP] PHPLIB cart with back/forward buttons

2001-03-20 Thread Dan Troxell

Hi,

I've built a shopping cart using PHPLIB. When using the BACK or FORWARD
buttons in IE, argument values are passed to the new page, inappropriately
updating the information. Ack! This does not appear to be an issue with most
versions of netscape.

When called with the BACK or FORWARD button is there any way to 
1. force the expiration of the page (not perfectly desirable) 
or
2. pass the URL link only (without the attached argument string)

the example can be viewed at

www.yoursound.com

Thanks!
Dan Troxell, x494
===
Dir. of Information Technology
Citizens Energy Corp.
530 Atlantic Ave, 5FL
Boston, MA 02210
===

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




RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Thomas Edison Jr.

I do get your message Jeff, but tell me, after having
used the following code ..

select * from booking where
('$start'=startdate and '$start'=enddate) or
('$end'=startdate and '$end'=enddate)

what code should be written to actually insert booking
data into the table? Because this is basically picking
up data or booking from the Table that fall in this
period. What i want to do is to check if any booking
has been made for this period that i'm inserting
now

T. Edison jr.

--- Jeff Armstrong [EMAIL PROTECTED] wrote:
 One problem is that you are only checking the first
 booking.
   select * from booking where room='room'
 gives ALL bookings, and you look like you are just
 testing
 the FIRST one.
 
 why not turn it round and do:
   select * from booking where
 ('$start'=startdate and '$start'=enddate) or
 ('$end'=startdate and '$end'=enddate)
 
 This lets mySQL do the test for you.
 If it returns a row you already have a booking.
 
 
 -Original Message-
 From: Thomas Edison Jr.
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 20, 2001 11:50 AM
 To: Peter Chr. Hansen
 Cc: [EMAIL PROTECTED]
 Subject: Re: SV: [PHP] Booking by Date/Time in mySQL
 
 
 Peter,
 
 what do you mean by Newdate between date1  date2??
 the logic i'm using is that i'm checkin if the new
 Start Date  End date lies between the old Start
 Date
  End Date or not. If it does, than entry is denied,
 else booking is succesfull. But things are not
 running, following is the code i'm using ...
 --
 ?php
 $db = mysql_connect("localhost","root");
 mysql_select_db("nidc_intranet",$db);
 
 $realsdate="$syear"."-"."$smonth"."-"."$stdate";
 $realedate="$eyear"."-"."$emonth"."-"."$endate";
 $realstime="$shh".":"."$smm"." "."$sttime";
 $realetime="$ehh".":"."$emm"." "."$entime";
 
 $result = mysql_query("SELECT * FROM booking where
 room='$rooms',$db);
 if ($myrow = mysql_fetch_array($result)) {
   do {
 if ($realsdate=$myrow[sdate]) 
 ($realsdate=$myrow[edate]) 
 ($realedate=$myrow[sdate]) 
 ($realedate=$myrow[edate]) {
 echo "Sorry";
 }
 else {
 
 $sql = "INSERT INTO booking
 (room,sdate,edate,stime,etime,purpose,reserved)
 VALUES

('$rooms','$realsdate','$realedate','$realstime','$realetime','$purpose','$r
 es')";
 $result = mysql_query($sql) or Die ("An
 unexpected
 error occured. Please go back and book again.");
 echo "font face=helvetica size=2
 color=#140057bThank you! font
 color=#ff$rooms/font, has been booked from
 font color=#ff$realsdate/font to font
 color=#ff$realedate/font.
 brbr
 ** Entries will be deleted 2 weeks after the End
 Date.
 ";
 }
   } while ($myrow = mysql_fetch_array($result));
 }
  ?
 
 
 Regards,
 T. Edison jr.
 
 --- "Peter Chr. Hansen" [EMAIL PROTECTED] wrote:
  Can't you use "
  Newdate between date1 and date2
 
 
  -Oprindelig meddelelse-
  Fra: Thomas Edison Jr.
  [mailto:[EMAIL PROTECTED]]
  Sendt: 20. marts 2001 12:25
  Til: [EMAIL PROTECTED]
  Emne: [PHP] Booking by Date/Time in mySQL
 
 
  I'm facing this problem.
  I have made a room booking application.
  There is a Start Date  Time and End Date  Time
 of
  Booking a room.
 
  Problem is that once booked, you can't book a room
  with a date or time that falls between an Already
  booked  Date  Time.
 
  For example, if someone's booked a room from 3rd
  March
  to 10th March between 4:00 p.m. to 12:00 p.m. ,
 you
  can't book the same room for the any date between
  3rd
  March to 10th March and between 4 pm  12 pm.
 
  How do i do that?
 
  Regards,
  T. Edison jr.
 
 
  =
  Rahul S. Johari (Director)
  **
  Abraxas Technologies Inc.
  Homepage : http://www.abraxastech.com
  Email : [EMAIL PROTECTED]
  Tel : 91-4546512/4522124
  ***
 
  __
  Do You Yahoo!?
  Get email at your own domain with Yahoo! Mail.
  http://personal.mail.yahoo.com/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 
 =
 Rahul S. Johari (Director)
 **
 Abraxas Technologies Inc.
 Homepage : http://www.abraxastech.com
 Email : [EMAIL PROTECTED]
 Tel : 91-4546512/4522124
 ***
 
 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL 

Re: [PHP] Anyone interested to build with me a chat software (in php and MySQL)

2001-03-20 Thread Ashwin Kutty


PHPProjeckt at the following URL has not only a chat utility but a whole
lot others built in, maybe you should look into it..

http://www.phprojekt.de/en/

On Tue, 20 Mar 2001, Marian Vasile wrote:

 I want to create a free php and MySQL chat.
 
 Anyone interested in this project ?
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

---
Ashwin
kutty..
Systems Administrator
Dalhousie University Libraries
(902) 494-2694


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




[PHP] files with html extension

2001-03-20 Thread Rick VanNorman

Hi,

Is is possible to use the php script tags in files with an
html extension? I'm running 4.0.4pl1 and apache 1.3.12
on OpenBSD 2.8.

Thanks,
Rick VanNorman





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




Re: [PHP] General security Question (Databases)

2001-03-20 Thread Michael Kimsal

Hi Ben.

I see your point, but it's harder to deal with in those cases.

I'd reckon most people on this list are using some type of shared hosting
system anyway, where they CAN'T do that.

Creating extra users in most databases I've used is a bit of a pain, and trying
to
tie in your application's security with that of a database's may be problematic.

Example: we've got a system running on MSSQL7, with about 1 user
accounts, with a few different levels of permission.  They all can read and
write
the same tables, but only the rows which correspond with their user info.
Breaking that data up into 1 tables, each with a user that only has access
to that table, is just weird, imo.

At the end of the day, some process with higher permissions needs to run to
be creating the 'lower' accounts anyway, in whatever fashion that may be.
So anyone breaking into a machine is more than likely going to go
after the main process' security info anyway.



[EMAIL PROTECTED] wrote:

 The examples of holding passwords in databases (i.e. mysql) tend to encrypt
 the password.  Although this seems sensible (if not necessary) it douse mean
 that if a user forgets there password the normal solution is to generate a
 new random password and email it to them.  Then I realised that this fafing
 about was all a bit unnecessary.  Surly if security has been breached to the
 extent that the user table can be accesses chances are that the intruder
 could delete data from tables or even drop them.  In fact the best solution
 is to set up proper database users rather than your own 'application' users.
 This way you can set it up (at database level) so that for 'Punters' they
 can only read most of the data and 'Administrators' have fuller access.

 So maybe the conclusion is there is no point in encryption passwords but
 there are very good reasons to have users an 'real' database users.

 What do you lot reckon.


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




Re: [PHP] Script to convert # of seconds to HH:mm

2001-03-20 Thread Phillip Bow

Always assume people will attempt the most inane things...
--
phill

""Stephan Ahonen"" [EMAIL PROTECTED] wrote in message
9969kn$eho$[EMAIL PROTECTED]">news:9969kn$eho$[EMAIL PROTECTED]...
  Oh in addition this won't work accurately if $time is greater than about
2
  billion(2147483648 I believe).

 This shouldn't be a problem unless you're calculating how many hours and
 minutes a really old guy (68) has been alive or something.

 Sig for a Day
 Stephan Ahonen, ICQ 491101
 "That's very funny Scotty, now beam down my clothes!"
 Come back tomorrow for a different sig!
 Backspace a single "s" to reply by email


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



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




[PHP-CVS] cvs: php4 /ext/domxml php_domxml.c

2001-03-20 Thread Sebastian Bergmann

sbergmann   Tue Mar 20 09:04:45 2001 EDT

  Modified files:  
/php4/ext/domxmlphp_domxml.c 
  Log:
  Nuke another warning.
  
Index: php4/ext/domxml/php_domxml.c
diff -u php4/ext/domxml/php_domxml.c:1.30 php4/ext/domxml/php_domxml.c:1.31
--- php4/ext/domxml/php_domxml.c:1.30   Tue Mar 20 08:20:42 2001
+++ php4/ext/domxml/php_domxml.cTue Mar 20 09:04:45 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_domxml.c,v 1.30 2001/03/20 16:20:42 steinm Exp $ */
+/* $Id: php_domxml.c,v 1.31 2001/03/20 17:04:45 sbergmann Exp $ */
 
 
 #include "php.h"
@@ -1620,7 +1620,6 @@
 {
zval *id, *arg1;
xmlNode *nodep;
-   char *value;

if ((ZEND_NUM_ARGS() == 1)  getParameters(ht, 1, arg1) == SUCCESS) {
id = getThis();



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




RE: [PHP] files with html extension

2001-03-20 Thread Jack Dempsey

You can tell apache to have the php interpreter parse files with an html
extension, thereby letting you use the tags in html files...whether this
is a good solution or not is another question.that would mean that each
file would get parsedwhy are you trying to do this?

jack

-Original Message-
From: Rick VanNorman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 12:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] files with html extension


Hi,

Is is possible to use the php script tags in files with an
html extension? I'm running 4.0.4pl1 and apache 1.3.12
on OpenBSD 2.8.

Thanks,
Rick VanNorman





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



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




[PHP] is PHP sftp ready?

2001-03-20 Thread Nando2

Hello everybody,

I already am familiar with PHP's ftp capabilities. My question though is if
anyone has ever used or know wether PHP is compatible or not with sftp
(OpenSSH secure FTP). If so, can I use the same libraries or is there any
PHP extention that I must download in order to enable it.

Thank you,

Carlos Fernando Scheidecker Antunes.



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




Re: [PHP] URGENT! Regarding file manipulation

2001-03-20 Thread Chris Boot

Hi,

 What is the best way to delete line from a file?
 
 I want to delete line which is located somewhere in the middle of the
 .txt file.
 I dont want to leave blank line.

Well, pretty much the only way to do that is to copy the data line by line
to another file, skipping the unwanted line.  Then, replace the old file
with the new.  Slow, but it works.

-- 
.-. Chris Boot
/v\  [EMAIL PROTECTED]
   // \\
  /(   )\L   I   N   U   X
   ^^-^^Phear the Penguin



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




[PHP] Help Socket

2001-03-20 Thread

Hello

I am tring to make socket program.
I compile php with --enable-sockets option
But when I write code, the error message appears which is "Fatal error: Call to 
undefined function: socket() in /www/htdocs/test.php on line 6"

I can't understand what am I doing wrong 

here is the code that I wrote 

?
error_reporting (E_ALL);
$sockfd =socket (AF_INET, SOCK_STREAM, 0);
$imsi = connect($sockfd, "211.43.180.82", 9000);
$func_type = 1024 + 18;
$packet_size = 8;
write($sockfd, $packet_size, 4);
write($sockfd, $func_type, 4);
read($sockfd, $packet_size,4);
read($sockfd, $errornum, 4);
echo("errornum : $errornum");
?




[PHP] Objectclass

2001-03-20 Thread Thorsten Viel

Hi,

first thanks for your help on my last thread.

Another question.

Is there a function what specifies the class of an object?

for example:

class test
{
blabla
}

$object = new test;

any_function($object)  results "test"

thanks for your help




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




RE: [PHP] Objectclass

2001-03-20 Thread Neil Kimber

see

http://www.php.net/manual/en/function.get-class.php

-Original Message-
From: Thorsten Viel [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 17:33
To: [EMAIL PROTECTED]
Subject: [PHP] Objectclass


Hi,

first thanks for your help on my last thread.

Another question.

Is there a function what specifies the class of an object?

for example:

class test
{
blabla
}

$object = new test;

any_function($object)  results "test"

thanks for your help




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




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




Re: [PHP] Couple Questions

2001-03-20 Thread CC Zona

In article [EMAIL PROTECTED], [EMAIL PROTECTED] (acleave) 
wrote:

 1)  How do I return multiple data types at once from a function?  For 
 instance 
 I might want to return 5, "apple", and true (an int, a string, and a boolean) 
 all at once from a function.

return array(5, "apple", TRUE);

 2)  How does the predefined variable $HTTP_REFERER work with forms?  I know 
 the documentation says that it doesn't work with all browsers as the browser 
 has the actual info but I tested it with IE 5 and NS 4.7 and it worked 
 perfectly (for me).  My real concern is could it be fooled in a simple manner 
 or even turned off by selecting different settings in either of those two 
 browsers?  Or would it require a dedicated cracker and/or someone writing 
 their own browser to give a false report (vs. no report at all)?

IE and NS aren't the only browsers in use today.  I know iCab allows the 
user to disable sending of HTTP_REFERER.  I believe Opera may too.  I'm not 
sure about the capabilities of Konqueror and Lynx in this regard.  Also, 
AFAIK, no browser will send an HTTP_REFERER where the url request was 
typed/pasted in directly by the user, or where the request came via a 
bookmark.  Most of the robots which visit my sites also don't leave an 
HTTP_REFERER.  So there are some common examples of "no report".  

And while I haven't actually tried this, I assume that anyone could write 
their own HTTP_REFERER simply by using fsockopen().  Thanks to PHP's ease 
of use, using fsockopen does not require one to have the skills of a 
"dedicated cracker".

(Relying on HTTP_REFERER for any security-related check is generally 
considered a Bad Idea.)

-- 
CC

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




[PHP] PHP Web-based server-side mail client

2001-03-20 Thread Steven Katz

I'm looking for a PHP web-based POP/IMAP mail client to install on my 
RH7 machine. Anyone know of any with really good looking interfaces? 
I found a few that I like, but they're CGI, and commercial or 
ad-sponsored. I'll be happy with a free CGI package if anyone knows of 
a great one.

Thanks,
Steven

EMU Webmail
http://www.emumail.com/emuwebmail.html
http://www.mollymail.com

MailStudio
http://www.mailstudio.com


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




[PHP-CVS] cvs: php4 /ext/pgsql pgsql.dsp

2001-03-20 Thread Daniel Beulshausen

dbeuTue Mar 20 09:45:11 2001 EDT

  Modified files:  
/php4/ext/pgsql pgsql.dsp 
  Log:
  fix dsp
  
Index: php4/ext/pgsql/pgsql.dsp
diff -u php4/ext/pgsql/pgsql.dsp:1.16 php4/ext/pgsql/pgsql.dsp:1.17
--- php4/ext/pgsql/pgsql.dsp:1.16   Thu Sep 28 13:25:03 2000
+++ php4/ext/pgsql/pgsql.dspTue Mar 20 09:45:10 2001
@@ -45,7 +45,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "PGSQL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I 
"D:\Projects\php_build\postgresql\src\interfaces\libpq" /I 
"..\..\..\php_build\PostgreSQL\src\include" /I "..\.." /I "..\..\main" /I "..\..\Zend" 
/I "..\..\..\php_build\postgresql\src\interfaces\libpq" /I "..\..\..\bindlib_w32" /D 
"NDEBUG" /D "PGSQL_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D 
"ZEND_WIN32" /D "PHP_WIN32" /D "COMPILE_DL_PGSQL" /D HAVE_PGSQL=1 /D ZEND_DEBUG=0 /FD 
/c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I 
+"D:\Projects\php_build\postgresql\src\interfaces\libpq" /I 
+"..\..\..\php_build\PostgreSQL\src\include" /I "..\.." /I "..\..\main" /I 
+"..\..\Zend" /I "..\..\..\php_build\postgresql\src\interfaces\libpq" /I 
+"..\..\..\bindlib_w32" /D "NDEBUG" /D "PGSQL_EXPORTS" /D "WIN32" /D "_WINDOWS" /D 
+"_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /D "COMPILE_DL_PGSQL" /D 
+HAVE_PGSQL=1 /D ZEND_DEBUG=0 /D "HAVE_PQCMDTUPLES" /FD /c
 # SUBTRACT CPP /YX
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -72,7 +72,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" 
/D "_MBCS" /D "_USRDLL" /D "PGSQL_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I 
"D:\Projects\php_build\postgresql\src\interfaces\libpq" /I 
"..\..\..\php_build\PostgreSQL\src\include" /I "..\.." /I "..\..\main" /I "..\..\Zend" 
/I "..\..\..\php_build\postgresql\src\interfaces\libpq" /I "..\..\..\bindlib_w32" /D 
"_DEBUG" /D "PGSQL_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D 
"ZEND_WIN32" /D "PHP_WIN32" /D "COMPILE_DL_PGSQL" /D HAVE_PGSQL=1 /D ZEND_DEBUG=1 /YX 
/FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I 
+"D:\Projects\php_build\postgresql\src\interfaces\libpq" /I 
+"..\..\..\php_build\PostgreSQL\src\include" /I "..\.." /I "..\..\main" /I 
+"..\..\Zend" /I "..\..\..\php_build\postgresql\src\interfaces\libpq" /I 
+"..\..\..\bindlib_w32" /D "_DEBUG" /D "PGSQL_EXPORTS" /D "WIN32" /D "_WINDOWS" /D 
+"_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /D "COMPILE_DL_PGSQL" /D 
+HAVE_PGSQL=1 /D ZEND_DEBUG=1 /D "HAVE_PQCMDTUPLES" /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -100,7 +100,7 @@
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I 
"..\..\..\PostgreSQL\include" /I "..\..\..\bindlib_w32" /D "NDEBUG" /D "ZTS" /D 
"PGSQL_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D 
"PHP_WIN32" /D "COMPILE_DL_PGSQL" /D HAVE_PGSQL=1 /D ZTS=1 /FD /c
 # SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /GX /O2 /I 
"..\..\..\php_build\postgresql\src\interfaces\libpq" /I 
"..\..\..\php_build\PostgreSQL\src\include" /I "..\.." /I "..\..\main" /I "..\..\Zend" 
/I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "NDEBUG" /D "ZTS" /D "PGSQL_EXPORTS" /D 
"WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /D 
"COMPILE_DL_PGSQL" /D HAVE_PGSQL=1 /D ZEND_DEBUG=0 /FR /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I 
+"..\..\..\php_build\postgresql\src\interfaces\libpq" /I 
+"..\..\..\php_build\PostgreSQL\src\include" /I "..\.." /I "..\..\main" /I 
+"..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "NDEBUG" /D "ZTS" /D 
+"PGSQL_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D 
+"PHP_WIN32" /D "COMPILE_DL_PGSQL" /D HAVE_PGSQL=1 /D ZEND_DEBUG=0 /D 
+"HAVE_PQCMDTUPLES" /FR /FD /c
 # SUBTRACT CPP /YX
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -127,7 +127,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "PGSQL_EXPORTS" /D 
"WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /D 
"COMPILE_DL_PGSQL" /D HAVE_PGSQL=1 /D ZTS=1 /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I 
"D:\Projects\php_build\postgresql\src\interfaces\libpq" /I 
"..\..\..\php_build\PostgreSQL\src\include" /I "..\.." /I "..\..\main" /I "..\..\Zend" 
/I "..\..\..\php_build\postgresql\src\interfaces\libpq" /I "..\..\..\bindlib_w32" /I 
"..\..\TSRM" /D "_DEBUG" /D "PGSQL_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D 
"_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /D "COMPILE_DL_PGSQL" /D HAVE_PGSQL=1 

[PHP] dbase functions still supported?

2001-03-20 Thread Don Pro

Hi,

Using PHP 4.04pl1

I am getting an error executing the dbase_create function. Th elines of
code are:

if (!dbase_create($export_file, $dbf_def))
  echo "Error creating DBF file";

my error message is:

Fatal error:  Call to undefined function:  dbase_create() in my_prog.
php on line 59

I found this function in the PHP docs. Is it still supported?


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




Re: [PHP] phpinfo() doesn't list compiled --with

2001-03-20 Thread Christian Reiniger

On Tuesday 20 March 2001 14:59, you wrote:
 I compiled php --with-pgsql, but phpinfo() doesn't list that.is
 this a problem with php.ini?

Are you sure you didn't have a typo in that? Configure silently ignores 
unknown opitons.

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

"use the source, luke." (obi-wan gnuobi)

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




[PHP] Dynamically build a form from mySQL table

2001-03-20 Thread Martin E. Koss

Hi,
I've been trying to figure this out by looking through the code in
phpMyAdmin but I'm not getting very far. There's probably some help about it
somewhere.

What I want to do is dynamically generate a form where I get a table row
containing the field name in one cell and the input field in the next cell,
for example:

$DatabaseName = "FocusDynamics";
$TableName = "Items";

// open the table and get all field names, sizes, etc.,

// for each Field name, print something like:

PRINT "tr\n";
PRINT "td$FieldName/td\n";
PRINT "tdinput type=\"text\" name=\"$FieldName\" value=\"$FieldValue\"
maxlength=\"FieldSize\"/td\n";
PRINT "/tr";

How do I get all this info from the table?

Thanks for any help.


Martin E. Koss
M: 07946-706459
E: [EMAIL PROTECTED]


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




RE: [PHP] files with html extension

2001-03-20 Thread Rick VanNorman


On 3/20/2001 at 12:29 PM Jack Dempsey wrote:

You can tell apache to have the php interpreter parse files with an html
extension, thereby letting you use the tags in html files...whether
this
is a good solution or not is another question.that would mean that each
file would get parsedwhy are you trying to do this?


To be able to include php code in otherwise full html files;
most especially to allow me to do it without having to change
the name of every file and fix every href in the entire site.

So, exactly how do I tell apache to do this?

Thanks,
Rick
1


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




RE: [PHP] files with html extension

2001-03-20 Thread Mark Maggelet

for php4:
AddType application/x-httpd-php .html

for php3:
AddType application/x-httpd-php3 .html

On Tue, 20 Mar 2001 10:12:56 -0800, Rick VanNorman
([EMAIL PROTECTED]) wrote:
On 3/20/2001 at 12:29 PM Jack Dempsey wrote:

You can tell apache to have the php interpreter parse files with an
html
extension, thereby letting you use the tags in html
files...whether
this
is a good solution or not is another question.that would mean
that each
file would get parsedwhy are you trying to do this?


To be able to include php code in otherwise full html files;
most especially to allow me to do it without having to change
the name of every file and fix every href in the entire site.

So, exactly how do I tell apache to do this?

Thanks,
Rick
1


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



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




Re: [PHP] files with html extension

2001-03-20 Thread Phillip Bow

Personally I recommend people don't do this unless their web server is going
to serve only(or mostly) php pages, and very few straight html pages.  It
will save you time mucking around on the server, but the increase in
overhead isn't really worth it. IMHO of course.
--
phill



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




RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Jeff Armstrong

the logic goes:

$start = some_start_date_a_keen_punter_entered();
$end = the_date_he_wants_to_leave();

select * from booking where
('$start'=startdate and '$start'=enddate) or
('$end'=startdate and '$end'=enddate)

if (uh_ohh_I_got_a_row_back())
  echo "Someone else is sleeping in the bed! No can do!",
   "Cheap discounts for those willing to share a bed!",
   "Are you gorgeous??";
else
  print "You got it!"
  insert good bits into database here


Of course this is not guaranteed safe, as you can end up
with double bookings in the pico seconds between the select
and the insert - but hey, how many hits a second do you expect.


Regards
Jeff's Granny


-Original Message-
From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 5:08 PM
To: Jeff Armstrong
Cc: [EMAIL PROTECTED]
Subject: RE: SV: [PHP] Booking by Date/Time in mySQL


I do get your message Jeff, but tell me, after having
used the following code ..

select * from booking where
('$start'=startdate and '$start'=enddate) or
('$end'=startdate and '$end'=enddate)

what code should be written to actually insert booking
data into the table? Because this is basically picking
up data or booking from the Table that fall in this
period. What i want to do is to check if any booking
has been made for this period that i'm inserting
now

T. Edison jr.

--- Jeff Armstrong [EMAIL PROTECTED] wrote:
 One problem is that you are only checking the first
 booking.
   select * from booking where room='room'
 gives ALL bookings, and you look like you are just
 testing
 the FIRST one.

 why not turn it round and do:
   select * from booking where
 ('$start'=startdate and '$start'=enddate) or
 ('$end'=startdate and '$end'=enddate)

 This lets mySQL do the test for you.
 If it returns a row you already have a booking.


 -Original Message-
 From: Thomas Edison Jr.
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 20, 2001 11:50 AM
 To: Peter Chr. Hansen
 Cc: [EMAIL PROTECTED]
 Subject: Re: SV: [PHP] Booking by Date/Time in mySQL


 Peter,

 what do you mean by Newdate between date1  date2??
 the logic i'm using is that i'm checkin if the new
 Start Date  End date lies between the old Start
 Date
  End Date or not. If it does, than entry is denied,
 else booking is succesfull. But things are not
 running, following is the code i'm using ...
 --
 ?php
 $db = mysql_connect("localhost","root");
 mysql_select_db("nidc_intranet",$db);

 $realsdate="$syear"."-"."$smonth"."-"."$stdate";
 $realedate="$eyear"."-"."$emonth"."-"."$endate";
 $realstime="$shh".":"."$smm"." "."$sttime";
 $realetime="$ehh".":"."$emm"." "."$entime";

 $result = mysql_query("SELECT * FROM booking where
 room='$rooms',$db);
 if ($myrow = mysql_fetch_array($result)) {
   do {
 if ($realsdate=$myrow[sdate]) 
 ($realsdate=$myrow[edate]) 
 ($realedate=$myrow[sdate]) 
 ($realedate=$myrow[edate]) {
 echo "Sorry";
 }
 else {

 $sql = "INSERT INTO booking
 (room,sdate,edate,stime,etime,purpose,reserved)
 VALUES

('$rooms','$realsdate','$realedate','$realstime','$realetime','$purpose','$r
 es')";
 $result = mysql_query($sql) or Die ("An
 unexpected
 error occured. Please go back and book again.");
 echo "font face=helvetica size=2
 color=#140057bThank you! font
 color=#ff$rooms/font, has been booked from
 font color=#ff$realsdate/font to font
 color=#ff$realedate/font.
 brbr
 ** Entries will be deleted 2 weeks after the End
 Date.
 ";
 }
   } while ($myrow = mysql_fetch_array($result));
 }
  ?
 

 Regards,
 T. Edison jr.

 --- "Peter Chr. Hansen" [EMAIL PROTECTED] wrote:
  Can't you use "
  Newdate between date1 and date2
 
 
  -Oprindelig meddelelse-
  Fra: Thomas Edison Jr.
  [mailto:[EMAIL PROTECTED]]
  Sendt: 20. marts 2001 12:25
  Til: [EMAIL PROTECTED]
  Emne: [PHP] Booking by Date/Time in mySQL
 
 
  I'm facing this problem.
  I have made a room booking application.
  There is a Start Date  Time and End Date  Time
 of
  Booking a room.
 
  Problem is that once booked, you can't book a room
  with a date or time that falls between an Already
  booked  Date  Time.
 
  For example, if someone's booked a room from 3rd
  March
  to 10th March between 4:00 p.m. to 12:00 p.m. ,
 you
  can't book the same room for the any date between
  3rd
  March to 10th March and between 4 pm  12 pm.
 
  How do i do that?
 
  Regards,
  T. Edison jr.
 
 
  =
  Rahul S. Johari (Director)
  **
  Abraxas Technologies Inc.
  Homepage : http://www.abraxastech.com
  Email : [EMAIL PROTECTED]
  Tel : 91-4546512/4522124
  ***
 
  __
  Do You Yahoo!?
  Get email at your own domain with Yahoo! Mail.
  http://personal.mail.yahoo.com/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  

[PHP] where to learn to make a shopping cart

2001-03-20 Thread Jerry Lake

What are some good resources I can look at
to learn how to make a shopping cart, that
will function with php3/MySQL ? I know of 
the one at Devshed, but any other resources
are certainly appreciated.

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


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




[PHP-CVS] cvs: php4(PHP_4_0_5) /sapi/fastcgi CREDITS Makefile.in README.FastCGI config.m4 fastcgi.c php.sym php_fastcgi.h

2001-03-20 Thread Andi Gutmans

andiTue Mar 20 10:13:21 2001 EDT

  Added files: (Branch: PHP_4_0_5)
/php4/sapi/fastcgi  CREDITS Makefile.in README.FastCGI config.m4 
fastcgi.c php.sym php_fastcgi.h 
  Log:
  - MFH
  
  


Index: php4/sapi/fastcgi/Makefile.in
+++ php4/sapi/fastcgi/Makefile.in

LTLIBRARY_NAME= libsapi.la
LTLIBRARY_SOURCES = fastcgi.c

include $(top_srcdir)/build/ltlib.mk

Index: php4/sapi/fastcgi/README.FastCGI
+++ php4/sapi/fastcgi/README.FastCGI
FastCGI module
--

This module requires the FastCGI development kit, available from
http://www.fastcgi.com/

Before building PHP, please enter the dev kit, and run:

/configure
make
make export

This will compile the library code required for the FastCGI module. All
that is then required is to configure PHP with the '--with-fastcgi' option.
After making the code, you will end up with a binary file called 'php'.
Installation of this file will depend on the web server being used, please
see their documentation for details.

Index: php4/sapi/fastcgi/config.m4
+++ php4/sapi/fastcgi/config.m4
AC_MSG_CHECKING(for FastCGI support)
AC_ARG_WITH(fastcgi,
[  --with-fastcgi=SRCDIR   Build PHP as FastCGI application],[
  if test "$withval" = "yes"; then
FASTCGIPATH=/usr/local
  else
FASTCGIPATH=$withval
  fi
  test -f "$FASTCGIPATH/lib/libfcgi.a" || AC_MSG_ERROR(Unable to find libfcgi.a in 
$FASTCGIPATH/lib)
  test -f "$FASTCGIPATH/include/fastcgi.h" || AC_MSG_ERROR(Unable to find fastcgi.h in 
$FASTCGIPATH/include)
  PHP_SAPI=fastcgi
  PHP_LIBS=$FASTCGIPATH/lib/libfcgi.a
  AC_ADD_INCLUDE($FASTCGIPATH/include)
  EXT_PROGRAM_LDADD="$EXT_PROGRAM_LDADD $FASTCGIPATH/lib/libfcgi.a"
  INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_PROGRAM \$(bindir)/$SAPI_FASTCGI"
  RESULT="yes"
  PHP_SUBST(FASTCGI_LIBADD)
  PHP_SUBST(EXT_PROGRAM_LDADD)
],[
  RESULT="no"
])
AC_MSG_RESULT($RESULT)

Index: php4/sapi/fastcgi/fastcgi.c
+++ php4/sapi/fastcgi/fastcgi.c
/*
   +--+
   | PHP version 4.0  |
   +--+
   | Copyright (c) 1997-2001 The PHP Group|
   +--+
   | This source file is subject to version 2.02 of the PHP license,  |
   | that is bundled with this package in the file LICENSE, and is|
   | available at through the world-wide-web at   |
   | http://www.php.net/license/2_02.txt. |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to  |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
   +--+
   | Author: Ben Mansell [EMAIL PROTECTED]|
   +--+
*/

/* Debugging */
/* #define DEBUG_FASTCGI 1 */

/* Two configurables for the FastCGI runner.
 *
 * PHP_FCGI_CHILDREN - if set, the FastCGI will pre-fork this many processes
 * which will accept requests.
 *
 * PHP_FCGI_MAX_REQUESTS - if set, the runner will kill itself after handling
 * the given number of requests. This is to curb any
 * memory leaks in PHP.
 */


/* The following code is based mainly on the thttpd sapi and the original
 * CGI code, no doubt with many new and interesting bugs created... :)
 */

#include "php.h"
#include "SAPI.h"
#include "php_main.h"
#include "php_fastcgi.h"
#include "php_variables.h"

#include "fcgi_config.h"
#include "fcgiapp.h"
#include stdio.h
#include stdlib.h
#include unistd.h
#include sys/wait.h
#include sys/stat.h


#define TLS_D
#define TLS_DC
#define TLS_C
#define TLS_CC
#define TLS_FETCH()


FCGX_Stream *in, *out, *err;
FCGX_ParamArray envp;
char *path_info = NULL;

/* Our original environment from when the FastCGI first started */
char **orig_env;

/* The environment given by the FastCGI */
char **cgi_env;

/* The manufactured environment, from merging the base environ with
 * the parameters set by the per-connection environment
 */
char **merge_env;


static int sapi_fastcgi_ub_write(const char *str, uint str_length)
{
uint sent = FCGX_PutStr( str, str_length, out );
return sent;
}


static void sapi_fastcgi_flush( void *server_context )
{
if( FCGX_FFlush( out ) == -1 ) {
php_handle_aborted_connection();
}
}


static int sapi_fastcgi_send_headers(sapi_headers_struct *sapi_headers SLS_DC)
{
char buf[1024];
int n = 0;
zend_llist_position pos;
sapi_header_struct *h;

switch( sapi_headers-http_response_code ) {
case 200:
/* Default, 

RE: [PHP] where to learn to make a shopping cart

2001-03-20 Thread Jerry Lake

Now that I take a look, the one at devshed
assumes PHP4... of course. and that would
be great if I could get my sysadmin to upgrade.

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


-Original Message-
From: Jerry Lake [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 10:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] where to learn to make a shopping cart


What are some good resources I can look at
to learn how to make a shopping cart, that
will function with php3/MySQL ? I know of 
the one at Devshed, but any other resources
are certainly appreciated.

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


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



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




[PHP] Q: NSAPI support

2001-03-20 Thread Joe Rice


Hi,
  I have a funny situation where i can't use apache
due Macromedia's ARIA software and lack of it's support
for apache.  So, i'm stuck with using iPlanet. My question
is how stable,fast,usable is the PHP4 NSAPI support?

Thanks,
joe rice

Web Admin
www.bigidea.com


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




RE: [PHP] files with html extension

2001-03-20 Thread Jeff Armstrong

I agree with Phill, don't make all your HTML into PHP
unless you aint got much - but hey if you aint got much then
you can fix the real problem!

soapbox: {
 The issue here seems to derive from the fact that all
 the internal HREFs point to xxx.html

 This is exactly why http://www.w3.org recommend that you DONT
 SPECIFY A FILE TYPE TYPE in your HREFs.

 Cool URIs Dont change - http://www.w3.org/Provider/Style/URI
 Good!!
   A HREF=/somepage Some Page!/A
 NOT good!
   A HREF=/somepage.html Some Page!/A
   ^
 Let the server decide which page to dish.
 Then it's easy peasy to replace xxx.html with xxx.php or even
 xxx.my_new_language_of_the_moment.
};

Jeff

-Original Message-
From: Phillip Bow [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 6:35 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] files with html extension


Personally I recommend people don't do this unless their web server is going
to serve only(or mostly) php pages, and very few straight html pages.  It
will save you time mucking around on the server, but the increase in
overhead isn't really worth it. IMHO of course.
--
phill


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




Re: [PHP] PHP Web-based server-side mail client

2001-03-20 Thread Rouvas Stathis

Check SquirelMail (I'm propably spelling it wrong) on freshmeat.net
-Stathis.


Steven Katz wrote:
 
 I'm looking for a PHP web-based POP/IMAP mail client to install on my
 RH7 machine. Anyone know of any with really good looking interfaces?
 I found a few that I like, but they're CGI, and commercial or
 ad-sponsored. I'll be happy with a free CGI package if anyone knows of
 a great one.
 
 Thanks,
 Steven
 
 EMU Webmail
 http://www.emumail.com/emuwebmail.html
 http://www.mollymail.com
 
 MailStudio
 http://www.mailstudio.com
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




[PHP] How to convert '2001032018' - '2001 03 20 18' ? (Fomating Date)

2001-03-20 Thread SED

Hi,

I'm trying to convert the timestamp '2001032018' into '2001 03 20 18' or an
Array which I can easily format. Do you remember any date or string function
I can use?

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is - New Homepage!
--


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




RE: [PHP] How to convert '2001032018' - '2001 03 20 18' ? (Fomating Date)

2001-03-20 Thread Altunergil, Oktay


function sql_to_unix_time($timeString)
{
return mktime(substr($timeString, 8,2), substr($timeString,
10,2), substr($timeString, 12,2),
substr($timeString, 4,2), substr($timeString, 6,2),
substr($timeString, 0,4));
}


you can use the above function to convert your mysql time stamp to a unix
timestamp (how long ago was the epoch? ) and use php time related functions
(such as time() )to manipulate it however you want.
PS: The function is not mine.



-Original Message-
From: SED [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to convert '2001032018' - '2001 03 20 18' ?
(Fomating Date)


Hi,

I'm trying to convert the timestamp '2001032018' into '2001 03 20 18' or an
Array which I can easily format. Do you remember any date or string function
I can use?

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is - New Homepage!
--


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

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




[PHP] escaping php syntax within perl

2001-03-20 Thread Clayton Dukes



Hey everyone,

Doesn anyone knowhow to escape the following 
line in a perl print statement?

if(!isset($mainfile)) { include("mainfile.php"); 
}

ie:

sub 
header{ print "?php echo 
if(!isset($mainfile)) { include(\"mainfile.php\"); } ?\n";
}

What all needs to be escaped?


Thanks!
Clayton DukesCCNA, CCDA, CCDP, 
CCNPInternetwork Solutions EngineerInternetwork Management 
Engineer-Download 
Free Essays, Term Papers and Cisco Training from http://www.gdd.net


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


RE: [PHP] files with html extension

2001-03-20 Thread Rick VanNorman

This is the best idea I've heard/read yet. Thanks Jeff!
Rick VanNorman

*** REPLY SEPARATOR  ***

On 3/20/2001 at 6:49 PM Jeff Armstrong wrote:

 This is exactly why http://www.w3.org recommend that you DONT
 SPECIFY A FILE TYPE TYPE in your HREFs.

 Cool URIs Dont change - http://www.w3.org/Provider/Style/URI
 Good!!
   A HREF=/somepage Some Page!/A
 NOT good!
   A HREF=/somepage.html Some Page!/A
   ^
 Let the server decide which page to dish.
 Then it's easy peasy to replace xxx.html with xxx.php or even
 xxx.my_new_language_of_the_moment.
};

e


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




[PHP] enum and set possible values

2001-03-20 Thread Michael George

I'm looking here at the mysql functions for PHP4.0.4 and I'm not finding what
I seek...

I see that mysql_fetch_field() will get information about a field in the
result set from a mysql_db_query().  What I'm wanting to find out is what the
possible values are for an enum or a set.

So if I have an enum with possible values "Yes" and "No" or a set with
possible values "Single", "Married", "Divorced", "Widowed", I seek a function
that will return an array of strings containing those possible values.

Does such a function exist?

I suppose if not it would be possible to write one from the output of a "show
columns from X" query...

Thanks!

-Michael

-- 
No, my friend, the way to have good and safe government, is not to trust it
all to one, but to divide it among the many, distributing to every one exactly
the functions he is competent to.  It is by dividing and subdividing these
republics from the national one down through all its subordinations, until it
ends in the administration of every man's farm by himself; by placing under
every one what his own eye may superintend, that all will be done for the
best.
-- Thomas Jefferson, to Joseph Cabell, 1816

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




RE: [PHP] How to convert '2001032018' - '2001 03 20 18' ? (Fomating Date)

2001-03-20 Thread Hoover, Josh

You could try this:

function convertTimeStamp($yourTimeStamp)
{
$strTime[0] = substr($yourTimeStamp, 0,4);
$strTime[1] = substr($yourTimeStamp, 4,2);
$strTime[2] = substr($yourTimeStamp, 6,2);
$strTime[3] = substr($yourTimeStamp, 8,2);

return $strTime;
}

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 I'm trying to convert the timestamp '2001032018' into '2001 
 03 20 18' or an
 Array which I can easily format. Do you remember any date or 
 string function
 I can use?



Re: [PHP-CVS] cvs: php4(PHP_4_0_5) /sapi/fastcgi CREDITS Makefile.inREADME.FastCGI config.m4 fastcgi.c php.sym php_fastcgi.h

2001-03-20 Thread Jani Taskinen

On Tue, 20 Mar 2001, Andi Gutmans wrote:

andi   Tue Mar 20 10:13:21 2001 EDT

  Added files: (Branch: PHP_4_0_5)
/php4/sapi/fastcgi CREDITS Makefile.in README.FastCGI config.m4
   fastcgi.c php.sym php_fastcgi.h
  Log:
  - MFH


Are you sure you want to include this in 4.0.5?
It was just added into the repository.

--Jani



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




[PHP] PHP/Perl/CGI Question

2001-03-20 Thread Clayton Dukes



Howdy,

I have a search cgi form that has the following 
function:

sub 
header{ print "Content-type: 
text/html\n\n"; print "?php 
include(\"mainfile.php\")\;?\n"; 
print "?php 
include(\"header.php\")\;?\n"; 
print "titleSearch/title\n";}

When I use the function though, the web page 
(source) comes up as:
?php include("mainfile.php");??php 
include("header.php");?titleSearch/title...data?include("footer.php");?

What am I doing wrong? Why is it printing the php 
tags instead of executing them?

Clayton 
Dukes-Download 
Free Essays, Term Papers and Cisco Training from http://www.gdd.net


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


[PHP] Attachment problem with web based mail

2001-03-20 Thread lists

We hired a developer about a year ago to develop a
web based email system for us in php. The developer
is no longer around, so I am having to pick up
the development on the project...When clicking
on the attachment link of an email in Internet
Explorer 5.5 in Windows 98, I get the save as dialog
and when I select ok, it tries to save the html
page. If I right click and do save target as, it
gets the correct file. This all works correctly in
IE 5.0 and Netscape 4.76, and what's weird is that
it even works as expected in IE 5.5 running on Win2k.
Can anyone offer any suggestions? I'll be glad to send
any code snipplets, or info if anyone can clue me in...

Thanks in advance,
Jack Davis
Network Admin
Bootheel Internet Services
[EMAIL PROTECTED]

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




Re: [PHP] Couple Questions

2001-03-20 Thread CC Zona

In article 9984hb$c4e$[EMAIL PROTECTED],
 [EMAIL PROTECTED] (CC Zona) wrote:

 And while I haven't actually tried this, I assume that anyone could write 
 their own HTTP_REFERER simply by using fsockopen().  Thanks to PHP's ease 
 of use, using fsockopen does not require one to have the skills of a 
 "dedicated cracker".

Err, obviously I meant fwrite().

-- 
CC

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




  1   2   >