Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Curt Zirzow
* Thus wrote K.Bogac Bokeer ([EMAIL PROTECTED]): > When $var is 0? > >$var = 0; or $var = ''; $var = array(); $var = false; > > // Output: $var: $var not exists > if ( $var ) > echo '$var: $var exists'; > else Curt -- "I used to think I was indecisive, but now I'm not so

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread K.Bogac Bokeer
When $var is 0? // Output: $var: $var not exists if ( $var ) echo '$var: $var exists'; else echo '$var: $var not exists'; // Output: isset(): var exists if ( isset($var) ) echo 'isset(): $var exists'; else echo 'isset(): $var not exists'; ?> Larry E . Ullman wrote: if($

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Larry E . Ullman
if($var) do something; verses if(isset($var)) do something; The simple form if($var) seems to work fine and I see it in code often. Is there a good reason for using isset? Yes, if you don't use isset(), you may see notices (errors) if the variable is not set. This depends upon the error reporting

RE: [PHP] Newbie Question: Variables on the fly

2004-05-28 Thread Tim Winters
Steve!!! This is great! I had no idea you could use arrays in url variables. That makes everything much easier. Thanks very much Tim At 06:26 AM 28/05/2004, Steve Edberg wrote: At 2:01 AM -0300 5/28/04, [EMAIL PROTECTED] wrote: Thanks for the reply Denis, Let me elaborate a bit. I have a php pag

Re: [PHP] Newbie Question: Variables on the fly

2004-05-28 Thread Curt Zirzow
* Thus wrote Steve Edberg ([EMAIL PROTECTED]): > At 2:01 AM -0300 5/28/04, [EMAIL PROTECTED] wrote: > > However, most of what you can do with them can be done more simply > with arrays. In your example above, use > > myPage.php?dataPoint[]=10&dataPoint[]=20&dataPoint[]=30 > I'd also sugg

RE: [PHP] Newbie Question: Variables on the fly

2004-05-28 Thread Steve Edberg
At 2:01 AM -0300 5/28/04, [EMAIL PROTECTED] wrote: Thanks for the reply Denis, Let me elaborate a bit. I have a php page which I want to pass a series of variables via a url string. eg myPage.php?dataPoint1=10&dataPoint2=20&dataPoint3=30 The thing is I won;t know until runtime how many dataPoints t

Re: [PHP] Newbie Question: Variables on the fly

2004-05-28 Thread PHP4web
ct vars by extract() to make them in normal shape if you get my point - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, May 28, 2004 8:01 AM Subject: RE: [PHP] Newbie Question: Variables on the fly > Thanks for

RE: [PHP] Newbie Question: Variables on the fly

2004-05-27 Thread csnm
Thanks for the reply Denis, Let me elaborate a bit. I have a php page which I want to pass a series of variables via a url string. eg myPage.php?dataPoint1=10&dataPoint2=20&dataPoint3=30 The thing is I won;t know until runtime how many dataPoints there will be so I have also included 1 additional

RE: [PHP] Newbie Question: Variables on the fly

2004-05-27 Thread Dennis Seavers
;JackArse" is silent) > [Original Message] > From: Dennis Seavers <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Date: 05/27/2004 9:30:19 PM > Subject: RE: [PHP] Newbie Question: Variables on the fly > > Maybe others will catch

RE: [PHP] Newbie Question: Variables on the fly

2004-05-27 Thread Dennis Seavers
Maybe others will catch on to your intention, but I think you need to provide a bit more information. For example, what variables do you want to create (drawn from a file source, or create on the fly)? Where will they come from (a database, perhaps)? You could create a script that creates variab

RE: [PHP] newbie question about preg_match

2004-05-20 Thread Chris W. Parker
Al on Thursday, May 20, 2004 12:51 PM said: > If I have multiple instances that match the pattern, but only want the > first one, which is the best way to handle it? reread the last sentence in John's post. > John W. Holmes wrote: > >> From: "Al" <[EMAIL PROTECTED

Re: [PHP] newbie question about preg_match

2004-05-20 Thread Al
If I have multiple instances that match the pattern, but only want the first one, which is the best way to handle it? Putting the "U" flag seems to work, but I don't understand the full implications of using it here. preg_match("|$start(.*?)$end |Ui", $contents, $text); Alternatively, I could

Re: [PHP] newbie question about preg_match

2004-05-20 Thread John W. Holmes
From: "Al" <[EMAIL PROTECTED]> > I'm trying to compose a general purpose text snip expression to extract > a text segment from a string. > > Should this work for all reasonable cases? It seems to work for several > test strings. > > $start= "str1"; > > $end= "str2"; > > preg_match ("|$start (.*)

Re: [PHP] Newbie question about operators

2004-04-07 Thread Red Wingate
arrays :-) you are defining arrays like: $x = array ( 'a' => 'Apple' , 'b' => 'Banana' , ... ); -- red Gabe wrote: Thanks for the page. That was helpful. Just to make sure, is that operator only typically used then with foreach loops and arrays? "Matt Matijevich" <[EMAIL PROTECTED]> wrote i

Re: [PHP] Newbie question about operators

2004-04-07 Thread Gabe
Thanks for the page. That was helpful. Just to make sure, is that operator only typically used then with foreach loops and arrays? "Matt Matijevich" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [snip] > foreach ($some_array as $name=>$value) > { > ... some code ... > } > [/sni

Re: [PHP] Newbie question about operators

2004-04-07 Thread Matt Matijevich
[snip] foreach ($some_array as $name=>$value) { ... some code ... } [/snip] http://www.php.net/foreach will give you a good explanation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie question on Array

2004-03-28 Thread Jason Wong
On Monday 29 March 2004 03:27, [EMAIL PROTECTED] wrote: > I am trying to construct an array with key-value from a resultSet which > will be used often within the page or between pages. > > Which looks like this: > > $optionBox="select used_1, rub from rub_table order by rub asc"; >

Re: [PHP] newbie question

2004-02-24 Thread Chris Hayes
could it be that this is an old script that requires register_globals to be turned ON or so? if you can read Dutch, read http://www.phpfreakz.nl/artikelen.php?aid=88 At 12:25 24-2-04, you wrote: hi - i don't know much about php, but somehow i managed to install a simple php-guestbook on my webs

Re: [PHP] Newbie question... date.

2004-01-13 Thread Ray
On Tuesday 13 January 2004 13:57, DL wrote: > Hi all, > > I was wondering how you get the year, month, and day from a > timestamp. (mySQL timestamp, Eg: 20040113130137) What PHP > function(s) do I use? An example would be great > > Cheers, > David http://www.php.net/manual/en/function.strtot

Re: [PHP] Newbie question... date.

2004-01-13 Thread Chris Boget
> I was wondering how you get the year, month, and day from a timestamp. > (mySQL timestamp, Eg: 20040113130137) What PHP function(s) do I use? An > example would be great I *believe* you can use strtotime(); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

RE: [PHP] Newbie question

2004-01-13 Thread Sam Masiello
It appears as if you don't have MySQL support compiled in with your PHP build. If you installed it from source you will want to recompile PHP with the --with-mysql option. I have never installed PHP from RPM though so if you installed it that way, perhaps someone else in the group can provide so

Re: [PHP] Newbie question

2004-01-13 Thread Richard Davey
Hello James, Tuesday, January 13, 2004, 3:37:17 PM, you wrote: JM> The book I'm learning from had some simple examples pages that I created JM> early on and they work; however this is the first attempt at trying to use JM> php to connect. Post your code (if it's from a book I'm guessing it isn't

Re: [PHP] newbie question about header()

2003-12-21 Thread Justin French
On Monday, December 22, 2003, at 01:13 PM, Website Managers.net wrote: Unless you're using an 'if' statement, the header redirect must be the first line of the page, above any HTML markup. That's not entirely accurate. ---Quoted from http://php.net/header --- Remember that header() must be call

Re: [PHP] newbie question about header()

2003-12-21 Thread John W. Holmes
Scott Taylor wrote: I am simply trying to redirect users from one page to another. Yet when I use this code I get the following error: *Warning*: Cannot add header information - headers already sent by (output started at /usr/local/psa/home/vhosts/miningstocks.com/httpdocs/etc/php/login/adm

Re: [PHP] newbie question about header()

2003-12-21 Thread Website Managers.net
Unless you're using an 'if' statement, the header redirect must be the first line of the page, above any HTML markup. Jim www.websitemanagers.net - Original Message - From: "Scott Taylor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 21, 2003 8:04 PM Subject: [PHP]

RE: [PHP] newbie question about scope

2003-11-12 Thread Jay Blanchard
[snip] Unless I'm misunderstanding something, PHP does not implement scoping (at least in the sense that many other programming languages do) prior to PHP5. [/snip] Actually it does implement scoping, see http://us2.php.net/language.variables.scope -- PHP General Mailing List (http://www.php.ne

Re: [PHP] newbie question about scope

2003-11-12 Thread news.comcast.giganews.com
"Derek Ford" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > news.comcast.giganews.com wrote: > > >I am an experienced web developer who is just getting into php. I have had > >a php project fall into my lap and wanted a little advice. Here is the > >scoop: > > > >A client move

RE: [PHP] newbie question about scope

2003-11-12 Thread Jay Blanchard
[snip] A client moved their site from a server (unknown details) to a hosting facility (php 4.3.2). Now none of the scripts work. I have guessed that they are coming from an earlier version of apache/php. [/snip] It is likely then that register_globals is set to OFF in the php.ini. In earlie

Re: [PHP] newbie question about scope

2003-11-12 Thread Derek Ford
news.comcast.giganews.com wrote: I am an experienced web developer who is just getting into php. I have had a php project fall into my lap and wanted a little advice. Here is the scoop: A client moved their site from a server (unknown details) to a hosting facility (php 4.3.2). Now none of t

Re: [PHP] Newbie question about Class

2003-10-17 Thread Rory McKinley
OTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 15, 2003 8:15 PM Subject: Re: [PHP] Newbie question about Class > I was afraid that was the case. > > Tom Rogers wrote: > > >Hi, > > > >Thursday, October 16, 2003, 3:35:56 AM, you wrote: > >A&g

Re: [PHP] Newbie question about Class

2003-10-17 Thread Becoming Digital
e - From: "Al" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, 15 October, 2003 14:15 Subject: Re: [PHP] Newbie question about Class I was afraid that was the case. Tom Rogers wrote: >Hi, > >Thursday, October 16, 2003, 3:35:56 AM, you wrote: >A> M

Re: [PHP] Newbie question about Class

2003-10-15 Thread Al
I was afraid that was the case. Tom Rogers wrote: Hi, Thursday, October 16, 2003, 3:35:56 AM, you wrote: A> My question seems fundamental. I want to set a variable in one function A> in a class and then want to use the value in a second function. A> However, the functions are called a html

Re: [PHP] Newbie question about Class

2003-10-15 Thread Tom Rogers
Hi, Thursday, October 16, 2003, 3:35:56 AM, you wrote: A> My question seems fundamental. I want to set a variable in one function A> in a class and then want to use the value in a second function. A> However, the functions are called a html page with two passes. Submit A> reloads the page an

RE: [PHP] Newbie question about Class

2003-10-15 Thread Chris W. Parker
Al on Wednesday, October 15, 2003 10:36 AM said: > Will the class structure do this for me or must I save the values in > $GLOBAL or something? I think you'd have to send the value via $_GET or save it in a session variable if you want to retrieve it on another page

RE: [PHP] newbie question

2003-10-14 Thread Ford, Mike [LSS]
On 13 October 2003 13:49, 'Eugene Lee' wrote: > On Mon, Oct 13, 2003 at 10:32:18AM +0100, Ford, Mike > [LSS] wrote: > > > > On 12 October 2003 23:36, Eugene Lee wrote: > > > > > > The PHP manual is vague in several sections. I wonder how bug > > > reports get submitted for it? > > > > htt

Re: [PHP] newbie question

2003-10-13 Thread 'Eugene Lee'
On Mon, Oct 13, 2003 at 10:32:18AM +0100, Ford, Mike [LSS] wrote: : : On 12 October 2003 23:36, Eugene Lee wrote: : > : > The PHP manual is vague in several sections. I wonder how bug : > reports get submitted for it? : : http://bugs.php.net/report.php and select "Documentation p

RE: [PHP] newbie question

2003-10-13 Thread Ford, Mike [LSS]
On 12 October 2003 23:36, Eugene Lee wrote: > On Mon, Oct 13, 2003 at 03:23:53AM +1000, Wang Feng wrote: > > > > "1. An optional padding specifier that says what character will be > > used for padding the results to the right string size. This may be > > a space character or a 0 (zero character)

Re: [PHP] newbie question

2003-10-12 Thread Eugene Lee
On Mon, Oct 13, 2003 at 03:23:53AM +1000, Wang Feng wrote: : : "1. An optional padding specifier that says what character will be used for : padding the results to the right string size. This may be a space character : or a 0 (zero character). The default is to pad with spaces. An alternate : pad

Re: [PHP] newbie question

2003-10-12 Thread Wang Feng
ge - From: "Robert Cummings" <[EMAIL PROTECTED]> To: "Wang Feng" <[EMAIL PROTECTED]> Cc: "Curt Zirzow" <[EMAIL PROTECTED]>; "PHP-General" <[EMAIL PROTECTED]> Sent: Monday, October 13, 2003 2:29 AM Subject: Re: [PHP] newbie question >

Re: [PHP] newbie question

2003-10-12 Thread Robert Cummings
> feng > > > > - Original Message - > From: "Curt Zirzow" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, October 13, 2003 2:01 AM > Subject: Re: [PHP] newbie question > > > > * Thus wrote Eugene Lee ([EMAIL PRO

Re: [PHP] newbie question

2003-10-12 Thread Wang Feng
rom: "Curt Zirzow" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 13, 2003 2:01 AM Subject: Re: [PHP] newbie question > * Thus wrote Eugene Lee ([EMAIL PROTECTED]): > > On Sun, Oct 12, 2003 at 06:57:35PM +1000, Wang Feng wrote: > &g

Re: [PHP] newbie question

2003-10-12 Thread Curt Zirzow
* Thus wrote Eugene Lee ([EMAIL PROTECTED]): > On Sun, Oct 12, 2003 at 06:57:35PM +1000, Wang Feng wrote: > : > : If I get rid of the 0 and tried this: > : > : $price=.65; > : $f_price=sprintf("%1.2f",$price); > : > : It displays "0.65" in my Mozilla browser correctly. What do you say then? > >

Re: [PHP] newbie question

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 06:57:35PM +1000, Wang Feng wrote: : : If I get rid of the 0 and tried this: : : $price=.65; : $f_price=sprintf("%1.2f",$price); : : It displays "0.65" in my Mozilla browser correctly. What do you say then? I say, "I dunno". :-) It seems to follow C's printf(3) convers

Re: [PHP] newbie question

2003-10-12 Thread Wang Feng
ot; <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, October 12, 2003 6:49 PM Subject: Re: [PHP] newbie question > On Sun, Oct 12, 2003 at 06:09:21PM +1000, Wang Feng wrote: > : > : This is the example from the php manual: > [...] > : $formatted = sprintf(&

Re: [PHP] newbie question

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 06:09:21PM +1000, Wang Feng wrote: : : This is the example from the php manual: [...] : $formatted = sprintf("%01.2f", $money);// my question comes here : // echo $formatted will output "123.10" [...] : : I don't understand the meaning of the 01 above, which follow

Re: [PHP] Newbie Question

2003-08-22 Thread Phil King
Hi Everyone, Thanks a lot for all your advice, I really appreciate it. PHP / mysql is new to me so excuse my ignorance of the subject.. I will go get phpMyAdmin and give it a whirl. Thanks again. Phil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

RE: [PHP] Newbie Question

2003-08-21 Thread Van Andel, Robbert
Whether you write the gui interface or someone else does doens't make a difference. Robbert van Andel -Original Message- From: Phil King [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 11:49 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Newbie Question Hi Robbert, I be

Re: [PHP] Newbie Question

2003-08-21 Thread Bryan Koschmann - GKT
> Hi Robbert, > > I beleive my ISP does not allow any GUI interface into mysql databases on > the server. > They have advised me that ALL functions, table creation, modification, > loading data etc has to be done from PHP. > > It appears I have to use SQL statements within a PHP page to load the da

Re: [PHP] Newbie Question

2003-08-21 Thread Robert Cummings
Even if they do know about it, it's functionality conforms to what they said you can do: use SQL statements within a PHP page to load the data *grin*. Cheers, Rob. On Thu, 2003-08-21 at 14:53, Curt Zirzow wrote: > * Thus wrote Phil King ([EMAIL PROTECTED]): > > Hi Robbert, > > > > I beleive my I

Re: [PHP] Newbie Question

2003-08-21 Thread Curt Zirzow
* Thus wrote Phil King ([EMAIL PROTECTED]): > Hi Robbert, > > I beleive my ISP does not allow any GUI interface into mysql databases on > the server. > They have advised me that ALL functions, table creation, modification, > loading data etc has to be done from PHP. > > It appears I have to use S

Re: [PHP] Newbie Question

2003-08-21 Thread Phil King
to:[EMAIL PROTECTED] > Sent: Thursday, August 21, 2003 9:25 AM > To: '[EMAIL PROTECTED]' > Subject: RE: [PHP] Newbie Question > > > On the same note I recommend phpMyAdmin(www.phpmyadmin.net). Its interface > is quite useful especially when you have multiple DB'

RE: [PHP] Newbie Question

2003-08-21 Thread Van Andel, Robbert
Sorry, I did mean phpMyAdmin (no such thing as phpMySQL). Brain fart. Won't happen again. Robbert van Andel -Original Message- From: Dan Van Derveer [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 9:25 AM To: '[EMAIL PROTECTED]' Subject: RE: [PHP] Newbie Qu

RE: [PHP] Newbie Question

2003-08-21 Thread Dan Van Derveer
EMAIL PROTECTED] Subject: RE: [PHP] Newbie Question You can download PHPMySQL and locate it in a secure portion of your site. It's an excellent gui interface into mySQL. This tool will allow you to upload the script file and insert the data. I'm sorry, but I don't know the URL whe

RE: [PHP] Newbie Question

2003-08-21 Thread Van Andel, Robbert
You can download PHPMySQL and locate it in a secure portion of your site. It's an excellent gui interface into mySQL. This tool will allow you to upload the script file and insert the data. I'm sorry, but I don't know the URL where to get it. Check sourceforge. Robbert van Andel -Origina

RE: [PHP] Newbie Question regarding Syntax

2003-08-17 Thread Creative Solutions New Media
PROTECTED] Sent: August 17, 2003 8:45 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Newbie Question regarding Syntax * Thus wrote Creative Solutions New Media ([EMAIL PROTECTED]): > Sorry guys.It think there is a bit of confusion. > > I miss typed what I need to do. > >

Re: [PHP] Newbie Question regarding Syntax

2003-08-17 Thread Curt Zirzow
* Thus wrote Creative Solutions New Media ([EMAIL PROTECTED]): > Sorry guys.It think there is a bit of confusion. > > I miss typed what I need to do. > > > HREF=mailto:'.$row_rep_RS['repEmail'].'>'.$row_rep_RS['repEmail'].''; ?> You should make sure to quote your html values ( href="va

RE: [PHP] Newbie Question regarding Syntax

2003-08-17 Thread Creative Solutions New Media
Zirzow [mailto:[EMAIL PROTECTED] Sent: August 17, 2003 8:28 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Newbie Question regarding Syntax * Thus wrote Creative Solutions New Media ([EMAIL PROTECTED]): > HREF="mailto:[EMAIL PROTECTED]">'.$row_rep_RS['repEmail'].'

Re: [PHP] Newbie Question regarding Syntax

2003-08-17 Thread Curt Zirzow
* Thus wrote Creative Solutions New Media ([EMAIL PROTECTED]): > HREF="mailto:[EMAIL PROTECTED]">'.$row_rep_RS['repEmail'].''; ?> > > Obviously this isn't working. What is the proper syntax when you have to use > double quotes inside the tag? I usually prefer this method, its a style choice and

RE: [PHP] Newbie Question regarding Syntax

2003-08-17 Thread Cesar Aracena
I would encourage you to use double quotes instead of single quotes inside the PHP code. After this, you must comment HTML double quotes so the PHP engine does not consider these as part of its code. I would type your example like this: mailto:[EMAIL PROTECTED]">".$row_rep_RS['repEmail'].""; ?>

RE: [PHP] newbie question

2003-06-24 Thread Jay Blanchard
[snip] I just setup php on my linux box and have been messing with a tutorial, and have had some issues. The tutorial says any name=value pairs in the querystring "automatically creates a variable with the name and value the querystring indicated". This does not seem to be happening. I have in

RE: [PHP] Newbie Question

2003-02-25 Thread Cal Evans
you have 2 functions named DBField. This was ok until 4.3. After 4.3 you couldn't re-declare a function like this. PHP does not allow for overloading like Java and C++ (It looks like that's what you are trying to do) Check the docs for overloading. There is some support for it but it's a bit of

RE: [PHP] Newbie Question

2002-12-02 Thread Jon Haworth
Hi Hacook, > I have a mySQL database called "srchresult" in a "srchresult" base. > In it, i have 9 fields. Everything works perfectly. > I would like to know how can i list in a HTML table 30 results for example > but only with 7 columns (7 fields only) ? Try this: ; // loop through the resul

Re: [PHP] newbie question, open file error

2002-10-30 Thread Marek Kilimajer
Give it a try, that's the way I do it. jennifer villany wrote: hi, thanks for your feedback. chmod is greyed out in my ftp client. im using smart ftp. can i make these changes at the command line? thanks again, jennifer "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTE

Re: [PHP] newbie question, open file error

2002-10-30 Thread Marek Kilimajer
You might be able to solve this yourself, connect using ftp and try "chmod o+w directory", where directory is the directory that you want to write to. [EMAIL PROTECTED] wrote: hi, i hope im sending this to the correct place. im getting this error (below) when i run a script on my server. Im

Re: [PHP] newbie question

2002-10-03 Thread Scott Houseman
This is very simple To access variables from GET form, which you would use request.querystring( ) for in ASP, use the $_GET array in PHP, e.g. $var = $_GET{'var'} To access POST form values, which you would use request.form( ) for in ASP, use the $_POST array in PHP e.g. $var = $_POST{'var'}.

RE: [PHP] newbie question

2002-10-03 Thread M.A.Bond
It depends on the version of PHP, in older versions you just use the variable name ie in your example just use $var to access it's contents. In new versions, with register globals turned off use $_GET['var'] to access it ie: Print $_GET['var'] Will print numberx Thanks Mark -Original Mes

RE: [PHP] newbie question

2002-08-30 Thread Daniel Masson
Just do this: Header("Location: $where_you_wanna_go\n\n"); And make sure you do this before produce any HTML autput !! Hope this is helpful !! How do I get PHP to automatically open another PHP page in a browser if a condition is met? I have a pull down HTML table that submits a form to a PHP

Re: [PHP] newbie question

2002-08-30 Thread Kevin Stone
include($thefile.".html"); http://www.php.net/manual/en/function.include.php header("Location: ".$thefile); http://www.php.net/manual/en/function.header.php -Kevin - Original Message - From: "Brian & Shannon Windsor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 30,

Re: [PHP] newbie question

2002-08-30 Thread Jason Wong
On Saturday 31 August 2002 03:25, Brian & Shannon Windsor wrote: Please do not be lazy and choose a proper descriptive text for your subject. Imagine the blandness and confusion and the utter uselessness if everybody used generic subjects such as "Help", "Quick question", "This one is easy",

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-12 Thread Rasmus Lerdorf
As mentioned a couple of times on that include page, you can just use ini_set() directly in your application to set include_path. eg. That will run through each directory listed in your include path. That is, it will check for: ./foo.inc ../foo.inc ../../foo.inc /usr/local/lib/php/foo.i

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-12 Thread Al
I wasn't clear before. The problem I'm having, and most of the others folks who commented, with include is really with "include_path". A good bit of the problem seems to be my virtual host's environment. Most things I've tried with directives in an htaccess don't work and the error log says

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Rasmus Lerdorf
What does include have to do with DirectoryIndex? And what exactly is your problem with include? The only trick is setting the include_path which doesn't seem all that obtuse to me. -Rasmus On Sun, 11 Aug 2002, Al wrote: > The problem may be due to the fact that my environment is Apache Unix.

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Al
The problem may be due to the fact that my environment is Apache Unix. I spent about two hours today pouring over the php on-line manual "include" spec and trying dozens of combinations. http://www.php.net/manual/en/function.include.php There must be at least 20 user contributed notes at the b

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Analysis & Solutions
On Sun, Aug 11, 2002 at 12:33:55PM -0400, Al wrote: > > The .htaccess approach appears to fit my situation best; but, I've not > been able to get it to work. I wondered about the DirectoryIndex directive's ability to utilize files in other directories, so did a little test, which is what you i

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Rasmus Lerdorf
Does your AllowOverride include "Indexes"? If it doesn't, you can't put DirectoryIndex in a .htaccess. httpd -L is your friend. -Rasmus On Sun, 11 Aug 2002, Al wrote: > Appreciate the feedback, but. > > The .htaccess approach appears to fit my situation best; but, I've not > been able to

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Al
Appreciate the feedback, but. The .htaccess approach appears to fit my situation best; but, I've not been able to get it to work. I have a folder with a php script and that folder has several sub-folders each with a small configuration script. I'd like the entry point to be a subfolder a

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-10 Thread Analysis & Solutions
On Sat, Aug 10, 2002 at 01:12:38PM -0400, Al wrote: > I'm on a virtual host without a shell account and need execute a UNIX > command. > > ln -s ../afile.php index.php In a PHP script, you can do this -- if permissions are favorable: exec('ln -s ../afile.php index.php'); > Is there some w

Re: [PHP] Newbie question about SQL result formatting

2002-08-09 Thread Analysis & Solutions
On Fri, Aug 09, 2002 at 10:55:52PM +0200, Kristoffer Strom wrote: > > How do I convert the result to HTML code, I especially want the linebreaks!! Two options. Put the output in between tags. Or if you want the regular font, in PHP use the nl2br() function. --Dan PS: For future reference.

RE: [PHP] Newbie Question on Efficiency : Follow-up Question

2002-07-16 Thread Michael Kennedy
y) a compiled version, it doesn't need to worry about not including something. Martin -Original Message- From: Michael Kennedy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 1:36 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Newbie Question on Efficiency : Follow-up Question Yeah

RE: [PHP] Newbie Question on Efficiency : Follow-up Question

2002-07-16 Thread Martin Towell
g. Martin -Original Message- From: Michael Kennedy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 1:36 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Newbie Question on Efficiency : Follow-up Question Yeah, that's what I figured. With C++ you could find evidence that it o

RE: [PHP] Newbie Question on Efficiency : Follow-up Question

2002-07-16 Thread Michael Kennedy
tle deeper sometimes. Thanks. Michael -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 8:05 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Newbie Question on Efficiency : Follow-up Question PHP loads everything up before it s

Re: [PHP] Newbie Question on Efficiency : Follow-up Question

2002-07-16 Thread Analysis & Solutions
On Tue, Jul 16, 2002 at 06:25:42PM -0500, Michael Kennedy wrote: > OK, if I understand C++ correctly, if I write a program and #include > or something similar and compile the program it only > compiles with the used functions in it, right? So, if I never use 'cin' > it leaves that function out o

RE: [PHP] Newbie Question on Efficiency : Follow-up Question

2002-07-16 Thread John Holmes
olmes... > -Original Message- > From: Michael Kennedy [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 7:26 PM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] Newbie Question on Efficiency : Follow-up Question > > OK, if I understand C++ correctly, if I write a

RE: [PHP] Newbie Question on Efficiency : Follow-up Question

2002-07-16 Thread Michael Kennedy
ial. Ah, well... Thanks for humoring me. Michael -Original Message- From: Monty [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 5:44 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Newbie Question on Efficiency If you have have a large number of functions, it might be better to sepa

Re: [PHP] Newbie Question on Efficiency

2002-07-16 Thread Monty
If you have have a large number of functions, it might be better to separate them into a few files that you can include as needed. I use one file that contains functions needed by every page. I have a few other files that contain functions that aren't needed by every page, so, I include them only

RE: [PHP] Newbie Question on Efficiency

2002-07-16 Thread Michael Kennedy
ly 16, 2002 4:01 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Newbie Question on Efficiency Unless the file is getting retartedly big (10-20K), then I wouldn't separate them. Though if you have enough functions, you could justify making separate files for you

Re: [PHP] Newbie Question on Efficiency

2002-07-16 Thread Martin Clifford
Unless the file is getting retartedly big (10-20K), then I wouldn't separate them. Though if you have enough functions, you could justify making separate files for your database functions, output functions, backend functions, etc. Martin Clifford Homepage: http://www.completesource.net Develop

Re: [PHP] Newbie question

2002-07-13 Thread Alberto Serra
ðÒÉ×ÅÔ! Cal Evans wrote: > ++ is an incrementor. He may also consider the position of the inc/decrementor. Example (note that the first element of an array has index 0): $a = Array(1,2,3,4,5); $i = 1; executing echo $a[++$i] will output 3 2 echo $a[$i++] will output 2 2 In both cases $i ge

RE: [PHP] Newbie question

2002-07-13 Thread Cal Evans
++ is an incrementor. $i=1; $i++; echo $i; =C= p.s. -- is a decrementor. * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Jay [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 13, 2002 8:32 PM To: [EMAIL PROTECTED] Subject: [PHP] Newbie question

Re: [PHP] newbie: question about question marks

2002-07-09 Thread Martin Clifford
In that case, the question marks are part of the PHP opening and closing tags. There are several ways to open and close sections of PHP script, mainly being , , and <% %>. What the below equals is , since http://www.completesource.net (Now Open!) >>> "Alexander Ross" <[EMAIL PROTECTED]> 07/09/0

Re: [PHP] newbie: question about question marks

2002-07-09 Thread Alexander Ross
How bout the question marks in the following line of php generated html: what do they mean? "Miguel Cruz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Sun, 7 Jul 2002, Alexander Ross wrote: > > Can someone explain to me what the ? does. I have a vagu

Re: [PHP] newbie: question about question marks

2002-07-07 Thread Miguel Cruz
On Sun, 7 Jul 2002, Alexander Ross wrote: > Can someone explain to me what the ? does. I have a vague idea of what > it means in a URL (please cearify that) but I haven't the slightest what > it means in php code. Thanks for your help Read about the ternary operator at: http://www.php.net/ma

Re: [PHP] newbie question - retaining values

2002-06-13 Thread Miguel Cruz
On Thu, 13 Jun 2002, Leston Drake wrote: > I've been creating forms that use hidden inputs to retain variables and > values from one instance of the form to the next (by calling itself in the > FORM ACTION). > > Are there other ways to retain *global* variables and values between > instances o

Re: [PHP] Newbie question about PHP and Oracle

2002-05-28 Thread DrouetL
I don't know how it works in my sql. I've written some functions to help me construct these sort of things. It might help you PS : Sorry but the comments are in French. Laurent Drouet /* ** Cette fonction retourne toutes les lignes d'u

Re: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Olexandr Vynnychenko
Hello r, Sunday, May 12, 2002, 4:25:37 AM, you wrote: r> Greetings people, r> Special greetings to all of you who have helped me in the past. r> As most of you know i am a newbie, I learned a bit of PHP via webmonkey and r> a few other places, seeing the power of PHP i decided to convert from J

RE: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread John Holmes
> 1)How many of you have seriously dug into arrays and has it been important > in your programming? > 1.1)Do you think you could have done the same thing you did with arrays > WITHOUT arrays? > (The reason i ask this is theres a whole chapter dedicated to arrays in > the > book & its pretty frustr

Re: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Rasmus Lerdorf
I have never really understood why people have problems with arrays. Just think of an array as a table of values. A one-dimensional array would be a table with a single column and each row has a number (or index) assigned to it: +---++ | 0 | Apple | +---++ | 1 | Orange

RE: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Matthew Walker
1. I have dug deeper into arrays than I care to remember. 2. Absolutely not. 3. See http://www.php.net/sleep and http://www.php.net/usleep Glad to hear you're converting to PHP! It's an amazing language, and I don't see it going away any time in the near future. Hope you have fun, and be sure t

Re: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Bogdan Stancescu
Hi! 1. I believe every serious programmer out there uses arrays on a regular basis... 1.1. ...exactly because there are so many problems virtually unsolvable without them. Take for instance the case of a product page where people would fill in ordering quantitites. My recommendation would be

Re: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Neil Highley
Why would you want a scripting language to sleep, there is no such thing as a loop in a web page (yes, I know it would be possible, but it would lock up a users machine). I know you can set up the apache daemon to run on-demand to conserver resources, but I think you are getting mixed up between

<    1   2   3   4   >