Re: [PHP] checboxex and sessions
For example, if you have Please check here 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]
[PHP] Conversion between dates and weeknumbers
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]
Re: [PHP] Help with array creation
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=one&val2=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?
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
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
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
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
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]
RE: [PHP] Conversion between dates and weeknumbers
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
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
"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]
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] presentation software used by Rasmus Lerdorf
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.
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.
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] PHP w/ Oracle OCI8 - how stable?
Nothing unusual. Very robust and stable. -Original Message- From: Hardy Merrill [mailto:[EMAIL PROTECTED]] Sent: 19 March 2001 23:18 To: [EMAIL PROTECTED] Subject: [PHP] PHP w/ Oracle OCI8 - how stable? I'm thinking of using PHP to talk to an Oracle database with the OCI8 interface - is PHP's OCI8 interface stable? Anything unusual I should know about? I'm using: Redhat 6.1 Linux PHP 4.0.4pl1 Oracle 8i 8.1.6 Apache 1.3.14 TIA. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.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]
Re: [PHP] Why not 'file_exists()' for URLs?
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
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]
[PHP] Hash syntaxes? simple but helpful
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]
Re: [PHP] Editing Variables from another script.
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?
Michael- Thank you, it works perfectly! --Dan "Michael Kimsal" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Click here for John > Doe's vCard > > 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: > > > > Click here for John > > Doe's vCard > > > > ...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.
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
$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?
[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?
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]
Re: [PHP] Editing Variables from another script.
I think there should not be a problem to do it just with a global variable or you can pass variables from external script to the (internal) script just by post or get-methods. but what, if the scripts are on different domains? i have the problem that netscape 4.6 and more can't allow access to scripts/documents at another domain (javascript error). anyway i have a checking_status-script on domain first.xxx.xx which calls a script on domain second.yyy.yy, ie and netscape 4.0 work quit well with this... but not 4.6 and more. error: not allowed/disaccess script on other domain... now i was thinking to manage it with a (global?)php-variable (same php-modul running on the domains) to communicate to the script in the second domain... can somenone help or have some tips? greetings tom At 11:34 20.03.01 +0100, you wrote: >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] > > > - - -foerderverein kunst und internet e.V. -lothringerstr. 23 -D-52062 aachen thomas schneider tel:+49 241.33686(buero) mobil: +49 179.4548 234 fax:+49 241.33636 'kulturraum raststaette' 'kulturserver heimat.de' 'kulturdatennetzwerk culturebase.org' -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] General security Question (Databases)
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]
Re: [PHP] weeks revisited
On Monday 19 March 2001 23:55, you wrote: > my next question would be. I'm working on a list of meetings. I > return a list for the current month, what I would like to do is make > the current week meetings show in red. However, I'm not sure of the > best approach to do this. Just get the current week via getdate() and do an if ($RecordWeek == $CurrentWeek) Highlight() on each record. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Those who will not reason, are bigots, those who cannot, are fools, and those who dare not, are slaves. - George Gordon Noel Byron (1788-1824), [Lord Byron] -- 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: Remember my username & password
Hello, thanx to everyone who replied, I have found all the info I was looking for. Cheers. . .. Dimitris Batis ... [EMAIL PROTECTED] .. .. http://www.ravencrypt.com .. ICQ: 18204204 Yahoo! ID: deggial_wrath .. . "The road to truth is long, and lined the entire way with annoying bastards." -- Alexander Jablokov, The place of no shadows -- 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] 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]
Re: [PHP] Re: php editors
homesite is very nice www.allaire.com almir ""Richard Lynch"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 01f901c0b0c8$291ba800$[EMAIL PROTECTED]">news:01f901c0b0c8$291ba800$[EMAIL PROTECTED]... > > I am looking for good php editors. Currently, i am using PHP coder. It > > highlights syntax and checks my syntax. It's also executes my PHP codes. > Are > > there any editors like that? I just want a editor that highlights my code > > and check my syntax. > > Give the Zend IDE a trial run. > > You'll be able to debug your code with an integrated debugger. > > There's also a site somewhere that lists all the PHP Editors, but I don't > have the URL handy... > > -- > Visit the Zend Store at http://www.zend.com/store/ > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > > > > -- > 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] usage of constants
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 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]
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 ... -- =$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','$res')"; $result = mysql_query($sql) or Die ("An unexpected error occured. Please go back and book again."); echo "Thank you! $rooms, has been booked from $realsdate to $realedate. ** 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] is PHP sftp ready?
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.
Re: [PHP] \"deleted\" cookie
set its valu to nothing , or expiery date to yesterday the best is both -almir "Nikolai Vladychevski" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > [EMAIL PROTECTED] wrote: > > > > How do you "delete" the cookie? > > I delete like this: > > > setcookie("username"); >setcookie("passwd"); >header("Location: http://".$HTTP_HOST."/logout.html"); >exit; > ?> > > is this correct? > to set cookie i use: > setcookie("username",$username); > > Nikolai > > > > > Nikolai Vladychevski <[EMAIL PROTECTED]> wrote: > > > > > > 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 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 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
and I dont think you should use haeder functions with cookie together do it with javascript , i had some problems if I used this two together (cookie, and header) -almir "Nikolai Vladychevski" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > [EMAIL PROTECTED] wrote: > > > > How do you "delete" the cookie? > > I delete like this: > > > setcookie("username"); >setcookie("passwd"); >header("Location: http://".$HTTP_HOST."/logout.html"); >exit; > ?> > > is this correct? > to set cookie i use: > setcookie("username",$username); > > Nikolai > > > > > Nikolai Vladychevski <[EMAIL PROTECTED]> wrote: > > > > > > 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 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 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-I18N] Encoding detection
You've been quite helpful for which I thank you very much! I found an article in phpbuilder.com introducing NCTLS - a class that checks the preferred languages and looks for a language file untill it finds a match - now I have it up and running ;-) There's one more issue that bothers me... : On my site I have to use both german umlauts (ü for example) and cyrillic (windows-1251) charset - IE handles them perfectly but NS either shows windows-1251 chars correctly (when you switch to that encoding of course) or umlauts, but only if the encoding is iso-88591 in which case I loose the cyrillic symbols. What can I do about this? Gustav Foseid <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Atanas Vassilev: > > I formed my include like this: > > include "lang_".$HTTP_ACCEPT_LANGUAGE.".INC"; > > This will not work properly. Firts of all, youmight get a request from > someone having another language set in their preferences. You can also have > more than one language set, in my requests HTTP_ACCEPT_LANGUAGE is set to > "no, en, sv". > > -- > Gustav Foseid, Initio IT-løsninger AS > [EMAIL PROTECTED] > > -- > PHP Internationalization 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 Internationalization 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 w/ Oracle OCI8 - how stable?
I configured PHP --with-oci8=/path/to/oracle/home, and I'm seeing "flaky" behavior when I restart Oracle without restarting the web server - ORA-03113 and ORA-03114 errors all over. Then when I restart the webserver everything is fine again. Is this unusual? Did I do something wrong in the setup? I shouldn't have to restart the webserver after I restart Oracle should I? TIA. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com Neil Kimber [[EMAIL PROTECTED]] wrote: > Nothing unusual. Very robust and stable. > > -Original Message- > From: Hardy Merrill [mailto:[EMAIL PROTECTED]] > Sent: 19 March 2001 23:18 > To: [EMAIL PROTECTED] > Subject: [PHP] PHP w/ Oracle OCI8 - how stable? > > > I'm thinking of using PHP to talk to an Oracle database with > the OCI8 interface - is PHP's OCI8 interface stable? Anything > unusual I should know about? > > I'm using: > > Redhat 6.1 Linux > PHP 4.0.4pl1 > Oracle 8i 8.1.6 > Apache 1.3.14 > > TIA. > > -- > Hardy Merrill > Mission Critical Linux, Inc. > http://www.missioncriticallinux.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] -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.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] PHP w/ Oracle OCI8 - how stable?
On Tue, Mar 20, 2001 at 07:20:35AM -0500, Hardy Merrill wrote: > I configured PHP --with-oci8=/path/to/oracle/home, and I'm seeing > "flaky" behavior when I restart Oracle without restarting the > web server - ORA-03113 and ORA-03114 errors all over. Then when > I restart the webserver everything is fine again. > > Is this unusual? Did I do something wrong in the setup? I shouldn't > have to restart the webserver after I restart Oracle should I? if you use persistent connections it's a good idea to HUP you apache afer an oracle bounce. tc -- 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] PHP4 Compile As Per Bug id #2933
Hi, >From a search of the PHP Site. -- Status: Closed User Modify Dev Modify From: [EMAIL PROTECTED] Date: 1999-12-07 16:51:27 Type: Compile Failure OS: AIX 4.2.1 PHP Version: 4.0 Latest CVS (07/12/1999) Assigned To: Short Desc.: SQLCHAR undeclared -- I have the same error compiling php4.0.1p2 on SCO Openserver 5.0.5 (with gcc 2.95). I'm not sure about the CVS thing, but I downloaded a php-latest tar file from the snapshots site, which I can't get to compile at all. I even tried taking the etc/odbc directory from the snapshot and putting it into the pl2 directory I have (as you can see I'm not a C programmer :-) ). But this didn't work. Is it possible to get detail on the patch that was applied, or another solution. 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] Hash syntaxes? simple but helpful
use $aArray["abc"]=7; echo $aArray["abc"]; ""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]
[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. 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?
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] RE: Script to convert # of seconds to HH:mm
if your input is a number of seconds why not just treat it as a unix timestamp so ... echo date("H:i:s", $num_seconds) ... will work. 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: Yoshi Melrose [mailto:[EMAIL PROTECTED]] > Sent: 19 March 2001 22:09 > To: [EMAIL PROTECTED] > Subject: Script to convert # of seconds to HH:mm > > > Can someone direct me or send me a script that will convert number of > seconds into a format readable as HH:mm? I've tried making it > myself, but it > gets all messed up in the calculations. Thanks > > Yoshi > > -- 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
You could try echo serialize($object_var); to display the object in it's serialized form. -Stewart -Original Message- From: Thorsten Viel [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 12: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. 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 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?
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 "\n"; rather than: echo "\n"; or: echo '' . "\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
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=one&val2=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
""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!
> 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?
$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
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]
Re: [PHP] get filename?
$HTTP_SERVER_VARS['PHP_SELF'],$HTTP_SERVER_VARS['SCRIPT_NAME'], etc. There are many values, that you can use to get script name, in $HTTP_SERVER_VARS. Regards, -- Yasuo Ohgaki <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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-CVS] cvs: php4 /ext/yp yp.c
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
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?
$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.
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
> -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 3 7 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?
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.
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 u
RE: [PHP] Easy Object Reading
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 3 7 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.
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 St
RE: [PHP] off the topic but relevant with us
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
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
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
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
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
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 @@ 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 "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 ""; - 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 = " @@ -65,69 +20,54 @@ "; -/* 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 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 PRO
[PHP] Cookies
Utilizo este código para depositar una cookie en el cliente, lo único que me caduca al cabo de un tiempo, ¿alguién 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
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
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 ... -- =$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 "Thank you! $rooms, has been booked from $realsdate to $realedate. ** 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
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
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 PROTECTED]">news:024801
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]
Re: [PHP] Problems with Linux PHP
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.
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. >
[PHP-CVS] cvs: php4 / NEWS
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
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
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, NU
[PHP] URGENT! Regarding file manipulation
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
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 (p>path) { *(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
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)
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
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]
[PHP-CVS] cvs: php4 /ext/domxml php_domxml.c
steinm Tue Mar 20 08:20:43 2001 EDT Modified files: /php4/ext/domxmlphp_domxml.c Log: - fixed lot of compiler warnings Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.29 php4/ext/domxml/php_domxml.c:1.30 --- php4/ext/domxml/php_domxml.c:1.29 Tue Mar 20 07:01:13 2001 +++ php4/ext/domxml/php_domxml.cTue Mar 20 08:20:42 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.c,v 1.29 2001/03/20 15:01:13 steinm Exp $ */ +/* $Id: php_domxml.c,v 1.30 2001/03/20 16:20:42 steinm Exp $ */ #include "php.h" @@ -968,7 +968,7 @@ PHP_FUNCTION(domxml_node_name) { zval *id; - xmlNode *n, *first; + xmlNode *n; const char *str = NULL; id = getThis(); @@ -1173,7 +1173,6 @@ { zval *id; xmlNode *nodep; - int ret; id = getThis(); if(NULL == (nodep = php_dom_get_object(id, le_domxmlnodep, 0))) @@ -1193,7 +1192,6 @@ { zval *id; xmlNode *nodep; - int ret; id = getThis(); if(NULL == (nodep = php_dom_get_object(id, le_domxmlnodep, 0))) @@ -1260,9 +1258,8 @@ Returns list of children nodes */ PHP_FUNCTION(domxml_node_children) { - zval *id, **tmp; + zval *id; xmlNode *nodep, *last; - xmlDoc *docp; int ret; id = getThis(); @@ -1296,9 +1293,8 @@ Deletes node */ PHP_FUNCTION(domxml_node_unlink_node) { - zval *id, **tmp; - xmlNode *nodep, *last; - int ret; + zval *id; + xmlNode *nodep; id = getThis(); nodep = php_dom_get_object(id, le_domxmlnodep, 0); @@ -1393,7 +1389,7 @@ Sets name of a node */ PHP_FUNCTION(domxml_node_set_name) { - zval *id, *name, **tmp; + zval *id, *name; xmlNode *nodep; if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &name) == FAILURE) { @@ -1415,7 +1411,7 @@ Returns list of attributes of node */ PHP_FUNCTION(domxml_node_attributes) { - zval *id, **tmp; + zval *id; xmlNode *nodep; #ifdef oldstyle_for_libxml_1_8_7 xmlAttr *attr; @@ -1449,7 +1445,7 @@ Adds child node to parent node */ PHP_FUNCTION(domxml_node_new_child) { - zval *id, *name, *content, **tmp, *rv; + zval *id, *name, *content, *rv; xmlNodePtr child, nodep; int ret; @@ -1479,7 +1475,7 @@ Set content of a node */ PHP_FUNCTION(domxml_node_set_content) { - zval *id, *content, **tmp; + zval *id, *content; xmlNode *nodep; if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &content) == FAILURE) { @@ -1531,9 +1527,8 @@ Returns tag name of element node */ PHP_FUNCTION(domxml_elem_tagname) { - zval *id, *arg1, **tmp; + zval *id; xmlNode *nodep; - char *value; id = getThis(); nodep = php_dom_get_object(id, le_domxmlelementp, 0); @@ -1604,7 +1599,6 @@ { zval *id, *arg1; xmlNode *nodep; - char *value; if ((ZEND_NUM_ARGS() == 1) && getParameters(ht, 1, &arg1) == SUCCESS) { id = getThis(); @@ -1639,7 +1633,7 @@ /* FIXME: not implemented */ - RETURN_STRING(value, 1); + RETURN_TRUE; } /* }}} */ @@ -1671,7 +1665,6 @@ { zval *id, *arg1; xmlNode *nodep; - char *value; if ((ZEND_NUM_ARGS() == 1) && getParameters(ht, 1, &arg1) == SUCCESS) { id = getThis(); @@ -1712,7 +1705,7 @@ Returns DomDocumentType */ PHP_FUNCTION(domxml_doc_doctype) { - zval *arg, *id, *rv; + zval *id, *rv; xmlDtdPtr dtd; xmlDocPtr docp; int ret; @@ -1733,10 +1726,8 @@ Returns DomeDOMImplementation */ PHP_FUNCTION(domxml_doc_implementation) { - zval *arg, *id, *rv; - xmlNode *node; + zval *id; xmlDocPtr docp; - int ret; id = getThis(); if(NULL == (docp = php_dom_get_object(id, le_domxmldocp, 0))) { @@ -1877,7 +1868,7 @@ PHP_FUNCTION(domxml_doc_create_attribute) { zval *arg1, *arg2, *id, *rv; - xmlNode *node; + xmlAttrPtr node; xmlDocPtr docp; int ret; @@ -1898,7 +1889,7 @@ } node->doc = docp; - rv = php_domobject_new(node, &ret); + rv = php_domobject_new((xmlNodePtr) node, &ret); SEPARATE_ZVAL(&rv); *return_value = *rv; } @@ -1962,7 +1953,7 @@ Dumps document into string */ PHP_FUNCTION(domxml_dumpmem) { - zval *id, **tmp; + zval *id; xmlDoc *docp; xmlChar *mem; int size; @@ -2054,7 +2045,7 @@ Add string tocontent of a node */ PHP_FUNCTION(domxml_node_text_concat) { - zval *id, *content, **tmp; + zval *id, *content; xmlNode *nodep; if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &content)
Re: [PHP] how do i get a variable type? - not that simple
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
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
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 ... > -- > $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 " color=#140057>Thank you! color=#ff>$rooms, has been booked from > $realsdate to color=#ff>$realedate. > > ** 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: > [E
Re: [PHP] Anyone interested to build with me a chat software (in php and MySQL)
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
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)
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
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
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
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?
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
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
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
[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]
RE: [PHP] Objectclass
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
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
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]