[PHP] Serializing a DOM object

2002-12-30 Thread Boget, Chris
Consider the following: page1.php test\n"; $retval = serialize( domxml_open_mem( $xml )); return $retval; } ?> page2.php http://somepage.php' ); $xml = $soapclient->call( 'test', $parameters ); $xml = unserialize( $xml ); $xml->dump_mem(); ?> In the test function, if I ju

[PHP] PHP & PostgreSQL

2002-12-30 Thread Boget, Chris
I'm switching from a MySQL environment to PGSQL and I'm going through and trying to learn the differences between the two. I've come across some issues that I can't seem to find the answers to in the docs or on the web. I'm hoping someone can help me out. * MySQL has a function to reset the resu

RE: [PHP] PHP & PostgreSQL

2002-12-30 Thread Boget, Chris
> pg_result_seek() should perform a similar function. In most cases > you wouldn't need to use that because if you're going to be using > the results more than once you could store them in an array. Sometimes yes, sometimes no. But a valid point nonetheless. > > * For PGSQL, you can get the da

RE: [PHP] PHP & PostgreSQL

2002-12-30 Thread Boget, Chris
> Sorry, you've lost me. In your OP you say you wanted the > "table name", but now you're talking about the "dbname"? > For dbname, you can use (oddly enough) pg_dbname(). Eeep, I'm ever so sorry. That's what I get for responding at 4:30a when trying to battle insomnia. Yes, I am looking for th

Re: [PHP] Serializing a DOM object

2002-12-31 Thread Boget, Chris
> Try encoding like this: > $retval = base64_encode(serialize( domxml_open_mem( $xml ))); > and on the next page: > $xml = unserialize(base64_decode($xml)); > It works via html but don't know enough about soap Well, you don't have to use soap - you can use sessions and get the same result. As for

RE: [PHP] receiving XML stream as server via PHP

2002-12-31 Thread Boget, Chris
> Using PHP with cURL, I am currently able to dynamically > create XML documents and HTTP POST to a remote server, > receive an XML response, and parse XML as needed. > What I am having trouble finding information on is doing > the reverse. Basically, I am trying to create a PHP script > that a

[PHP] call_user_method_array

2003-01-01 Thread Boget, Chris
How does this function really work? I've been beating my head against the wall for the last 8 hours trying to figure it out. This is what I'm trying and it isn't working: {this is a very simplified version} class MyClass { function myFunc( $stringVar, $arrayVar ) { echo "$stringVar\n";

RE: [PHP] call_user_method_array

2003-01-01 Thread Boget, Chris
> On my system, the function works as expected (at least as I > understand it): myFunc receives the parameters "Hello!" and > array("this"=>"that"), which is what you pass to it in the > first place. See, that's not what I'm getting... :| > Were you expecting it to expand $myArrayVar into ind

RE: [PHP] looking for a PHP editor

2001-01-10 Thread Boget, Chris
> > >Personally, my team and I use HomeSite 4.5.x from Allaire. > > You did not mention the price (compared to HoTMetaL at $70). > my two cents on price. who cares! if an editor makes one > happy then pay as much as it takes to get it. consider how many > hours are spent with the editor. 18

RE: [PHP] looking for a PHP editor

2001-01-10 Thread Boget, Chris
> agreed, 4.5.2 still contains pretty old bugs. > UltraEdit is bugfree (at least I haven't encountered any), has > project management capabilities (but cannot make use of a > version control system, AFAIK). And that is definitely the most important feature I need, unfortunately... Chris

[PHP] Sessions, no cookies and enable-trans-sid, oh my

2001-01-11 Thread Boget, Chris
I know that if you compile PHP4 with --enable-trans-sid (as we have), it will automagically append SID to all href links. This is supposed to make it so that if a client's browser does not accept cookies, the session ID gets sent to any subsequent pages that the user gets to by clicking on links.

RE: [PHP] Sessions, no cookies and enable-trans-sid, oh my

2001-01-11 Thread Boget, Chris
> "allow per session cookies(not stored)" will enable cookies, > IE just does some garbage collection when its closed thats all. > so php realizes that IE is accepting cookies in this case and > uses cookies vs trans-sid. Ok. Makes sense. However, when this option is enabled, I see PHPSESSI

RE: [PHP] Sessions, no cookies and enable-trans-sid, oh my

2001-01-11 Thread Boget, Chris
> make sure of course too that session_start() is called from > in your code too. else your not using sessions :) These are the 3 files I'm using; they all reside in the same dir: "index.php" session_start(); header( "location: page1.php?" . SID ); exit(); "page1.php sessio

RE: [PHP] HELP! Date formatting

2001-01-16 Thread Boget, Chris
> Ive gotto format a date such as 30/12/1956 to format 30-Dec-1956, > I can not use mktime cause that only provides the timestamp from 1970. > Is there any other method of getting this right. mktime() can be used for this. 0 is from 1970. Negative values are used for dates prior. Chris

RE: [PHP] Sessions/security

2001-01-17 Thread Boget, Chris
> Try looking at register_shutdown_function at > http://www.php.net/manual/en/function.register-shutdown-function.php >From the documentation: "int register_shutdown_function (string func) Registers the function named by func to be executed when script processing is complete." What qualifies a

RE: [PHP] Integer division

2001-01-19 Thread Boget, Chris
> What is the syntax for dividing 7 by 2 and getting 3; not 3.5? you can use: $intVar = ((int)( 7 / 2 )); Chris

RE: [PHP] Function / String Problem

2001-01-19 Thread Boget, Chris
>echo "...are you logged in: $LoggedIn()";> // outputs:...are you logged in: () > > Function is: > function LoggedIn(){ > global $HTTP_POST_VARS > if ($HTTP_POST_VARS["Login"] == "PHPIsCool") > {return "YES";} > else > {return "NO";} > } Change your

RE: [PHP] "but what if.." Function / String Problem

2001-01-19 Thread Boget, Chris
> What if I want the function to be processed within the " " > quotes? Same as a variable might be interopelated? IOW, > can I call a function without concantenating the function > together with the string? > *being a little stubborn* No. Why would you want to? You *might* be able to do it

RE: [PHP] "but what if.." Function / String Problem

2001-01-19 Thread Boget, Chris
> It won't work even with single quotes. It'll just echo out > LoggedIn() as part of the string. Yeah, I didn't think so. But I knew that '' behaves differently than "". I just wasn't sure of the exact details of the differences. Chris

[PHP] "Authenticating" across sites/servers

2001-01-23 Thread Boget, Chris
I've been charged with trying to find out how something like this can be done if it is at all in fact possible. The info I'm hoping to get is what would be involved and where I can find information on it. I'm not asking for code or examples unless you really want to provide them. :P Anyways,

RE: [PHP] "Authenticating" across sites/servers

2001-01-23 Thread Boget, Chris
> Have the user log in to/authenticate against the first server. > That server generates a key, based on combining the username > and a private key known to the authenticating server and your > servers. > Pass that back to your servers in a URL - cookie wouldn't > work, but the key in the URL s

RE: [PHP] "Authenticating" across sites/servers

2001-01-23 Thread Boget, Chris
> Also, you can check the value of $HTTP_REFERER for the ip of > the trusted host, to further eliminate the potential. How do you get the IP out of $HTTP_REFERER? As far as I know, that only tells you the referring url, not the ip address. And couldn't that value be messed with? Chris

RE: [PHP] field types

2001-01-23 Thread Boget, Chris
> Does anyone know a function to give me the mySql field types? > I saw the function mysql_field_type, but that returns php types not > mysql. What I wanna do is if the type of the field is "Text" then I > wanna make a "textarea" to edit and add stuff. Thanks. If you have phpMySql, take a l

RE: [PHP] field types

2001-01-23 Thread Boget, Chris
> If you have phpMySql, take a look at the file: > /mysqladmin/tbl_properties.php > That code is doing something to return the type of the field. It's a > little hard to follow so I don't know exactly how he's doing it and > unfortunately, didn't have the time to decipher. :p However, I'm > sure

[PHP] Sockets

2001-01-23 Thread Boget, Chris
Are there any tutorials on how to use Sockets in PHP? If so, where can I find them? I've looked on several of the sites that are linked from the main php.net site but found nothing... :/ Thanks. Chris

[PHP] mysql_insert_id()

2001-01-24 Thread Boget, Chris
I'm having intermittent problems with this function. Most of the time, it returns the proper value. However, sometimes it doesn't return anything at all even when the insert query executes without error and I can see the new data in the database. I try to get the last insert id both by supplying

RE: [PHP] mysql_insert_id()

2001-01-24 Thread Boget, Chris
> When you are using mysql_insert_id, you don't want to pass it > the result of your previous SQL statement as in: > $result = mysql"mydb", "My SQL statement", $my_connect) ; > $last_id = mysql_insert_id($result) This is what it sounds like it's looking for in the documentation. It could be jus

RE: [PHP] mysql_insert_id()

2001-01-24 Thread Boget, Chris
> You probably stated this in your previous post, but what is > the result from your call to mysql() ? Is this call failing so > that when you get to mysql_insert_id(), the id doesn't exist? I did. It's returning a numerical one (1). What I'm doing now is as follows. It's getting me the val

RE: [PHP] mysql_insert_id()

2001-01-24 Thread Boget, Chris
> Instead of checking if(!$id), perhaps you would be better off to check the > result of your query (which in this example was successful, since you got > a return from mysql() ). I am. I just didn't include it in my previous message as it as I was trying to keep extraneous code down to a mini

RE: [PHP] how do you erase quotes from variable?

2001-01-24 Thread Boget, Chris
> I have a variable(s) that hold the string: > "name" > and I'd like to kill the quotes so it contains: > name > I am aware of the strlen() function but can find the concant $newVar = eregi_replace( "\"", "", $varWithAboveData ); Chris

[PHP] PHP Library for currency conversions

2001-01-26 Thread Boget, Chris
We need something to where we can poll a service and pull the exchange rates for various currencies against the dollar to our database for later use. Is there a PHP library/class that does something like this already? Just so I'm not reinventing the wheel? :p Chris

[PHP] Displaying an image, that is pulled from a DB, inline

2001-02-21 Thread Boget, Chris
Is it possible to pull an image, stored as binary data in a mySQL table, and display it on a page inline? So it acts as if the image was pulled from the file system normally? If it is possible, could you point me to some online resources that would give information on how this is done? I've trie

RE: [PHP] Variable Strangeness

2001-02-21 Thread Boget, Chris
> I came across this: > $confidential = 0; > echo "$confidential " . ($confidential == "yes"); > In which "0 1" was printed. > Is there something I'm missing? Yes. When comparing types, PHP generally typcasts one side of the operand to the type of what is on the other side. So in th

RE: [PHP] Form Variables!!!!!

2001-02-21 Thread Boget, Chris
> My problem is: > I wanna know the names of the variables that my actual page > recives from the last page (using the POST method). while( list( $formVarName, $formVarValue = each( $HTTP_POST_VARS )) { echo "$formVarName = $formVarValue\n"; } Chris

[PHP] fopen

2001-02-22 Thread Boget, Chris
I'm trying to fopen a URL that I have no problems getting to if I just past it into the address field of my browser. However, when I use it in my fopen() function call, I'm getting an "Error 0" (zero) message. I've looked all over the documentation and I could not find what 'Error 0' means. Any

RE: [PHP] crontab help

2001-02-22 Thread Boget, Chris
> 1. sleep(300) would mean pause by 300 mins, right? That's > why i thought you mean usleep(300) - 300 microseconds. No, 300 seconds - 5 minutes. Chris

[PHP] POST Referral

2001-02-28 Thread Boget, Chris
Is it possible, in PHP, for a page to determine if it was accessed via a form's submission (POST/GET)? IOW, if you click on a link to get to a page, you can find out (usually; I know it's not 100%) what page the user was at before when s/he clicked the link by accessing the $HTTP_REFERER variable

[PHP] Bitwise solution?

2001-03-01 Thread Boget, Chris
I'm wondering how I can do the following (if it is possible at all): I have 2 values. The first is a constant while the second is not. The second value, in this case, is a unix time stamp and as such will change every time it is set, down to the second. I need to somehow merge the two values s

RE: [PHP] Bitwise solution?

2001-03-01 Thread Boget, Chris
> on 3/1/01 02:34 PM, [EMAIL PROTECTED] split open and melted thusly: > > I was thinking I could do something like this: > > ( var1 & var2 ) > i think what you want is: > ${$var1$var2} But that would give me a value of a variable variable. And I need a numerical value so $var1 ="joe"; $var2 = da

[PHP] Munging hidden/form variables

2001-03-01 Thread Boget, Chris
It is possible (I've done it) to find out all the variables that make up a form on a particular site, generate a similar form on your site with that form's action being the CGI/PHP script that the particular site uses to process the form once submitted, modify the values for the form variables to

RE: [PHP] Munging hidden/form variables

2001-03-01 Thread Boget, Chris
> Is there any way to defend against this? Is there any way > to ensure that when a form is submitted that the submission > request originated from your site/domain and not somewhere > else? Knowing that $HTTP_REFERER cannot be relied on as containing valid data (as some browsers don't support i

RE: [PHP] Munging hidden/form variables

2001-03-01 Thread Boget, Chris
> I can think of one way that you can take in an attempy to prevent > this. It is not totally fool proof but it will make it more difficult > to send spoof data: > 1) Check your HTTP refereer when the form is submitted. If the > referer is not from your host then don't process the form. > Of cours

RE: [PHP] Munging hidden/form variables

2001-03-01 Thread Boget, Chris
> Don't bother with checking the HTTP_REFERER - it can be easily forged. > There is a very simple solution to this problem -- validate the data from > the form! [snip] > You should be doing this anyway, since who knows what the user could > type in your input box. Nevermind if somebody makes a c

RE: [PHP] Munging hidden/form variables

2001-03-01 Thread Boget, Chris
> > I'm already doing this. However, if I have a hidden > > variable containing a value of the current user I'm > > working with, that value can be changed to something > > else and it would pass the test. However, I need to find a > > way to determine if something like that has happened. >

[PHP] HREFs that can't be

2001-03-01 Thread Boget, Chris
I know I've been posing some funky wierd questions all day, but today has just been one of those days... I'm just trying to get a sense of other possibilities. And to find out what's plausable and what's not. Ok, here's my situation. I've a script that generates a variable number of HREFs/anchor

RE: [PHP] HREFs that can't be

2001-03-01 Thread Boget, Chris
>> Here >> There >> This Place >> That Place >> --- >> As you know, those variables are being passed to the >> linked page via GET variables. Now, here comes the >> oddball question: >> How can I (is it even possible) pass those variables >> to each page w/o using GETs and w/o using Cooki

RE: [PHP] HREFs that can't be

2001-03-02 Thread Boget, Chris
> Just include the SID as a hidden input. It'll be POSTED to > the next page right along with your other variables. Right. > There's even a way to configure your php.ini file so that PHP > includes the hidden SID for you. I forget which setting it > is--maybe "trans-id" or something like

RE: [PHP] Bitwise solution?

2001-03-02 Thread Boget, Chris
> > I have 2 values. The first is a constant while the second is not. > Is the first value a numerical value (real/integer?) or a > string value? String. This is what I've come up with and it seems to work pretty ok. What do you guys think? (test code to illustrate a point; other than the XOR

RE: [PHP] HREFs that can't be

2001-03-02 Thread Boget, Chris
> There are only three places you can pass data without using forms, and > using buttons, or images to trigger a POST of the data. > 1. Get parameters after a ? > 2. Cookies. > 3. In the URL itself. How is 3 different from 1? > Why do you want to eliminate all get params and cookies? That mi

RE: [PHP] HREFs that can't be

2001-03-02 Thread Boget, Chris
> > That won't work. Clicking on a link does not trigger > > sending of fields (hidden or not). > No? How about: > > > > Click here > or here This would require a form for every link and that was something I illustrated earlier as one of the possibilities I had come up with. But it was a po

RE: [PHP] HREFs that can't be

2001-03-02 Thread Boget, Chris
> > This would require a form for every link and that was something I > > illustrated earlier as one of the possibilities I had come > > up with. But it was a possibility that I was trying to avoid... > No, you could do following: > href="javascript:document.myForm.action='theLink';document.myF

RE: [PHP] Munging hidden/form variables

2001-03-02 Thread Boget, Chris
> Well, anything you get back from the client will be as GET > variables, I think. So, if your forms only use POST variables, > and you've turned on track_vars, then you can get your variables > through $HTTP_POST_VARS() like $foo=$HTTP_POST_VARS('foo'); > If I'm wrong on this, I'm sure some

RE: [PHP] HREFs that can't be

2001-03-02 Thread Boget, Chris
> [snip] > >It is "--enable-trans-sid" and it is turned on. However, the > >problem is that it doesn't work. :( If the user does not have > >cookies turned on, the SID will not be sent through to the next > >page on HREFs (I know you have to do it manually

RE: [PHP] HREFs that can't be

2001-03-05 Thread Boget, Chris
> > How is 3 different from 1? > 1: http://www.somedomain.com/program.php?parm1=value1 > 3: http://www.somedomain.com/program.php/value1 > $PATF_INFO now contains '/value1' Ahh. > This is pretty much acceptable to search engines. Even better add: > > ForceType application/x-httpd-php > > to h

RE: [PHP] Start you php script over??

2001-03-05 Thread Boget, Chris
> Is there a way for me to tell my php script to start over? I > want to have an if then statement to check if something is > done. Then if it isn't I want the php script to start over. header( "location: $PHP_SELF" ); OR header( "location: $REQUEST_URI" ); if you are using a query string/G

RE: [PHP] Is it odd or even???

2001-03-05 Thread Boget, Chris
> Is there an easy way to check and see if a number is odd or even? if( $num % 2 ) { echo "Odd"; } else { echo "Even"; } Chris

RE: [PHP] Is it odd or even???

2001-03-05 Thread Boget, Chris
> That won't work. % returns the remainder from a division of > the number divided by the mod number. Yours: > if($num %2 == 0){ > echo "even"; > }else{ > echo "odd"; > } Mine: > > if( $num % 2 ) { > > echo "Odd"; > > > > } else { > > echo "Even"; > > > > } Ours are identical, just the

RE: [PHP] Is it odd or even???

2001-03-05 Thread Boget, Chris
> Color me confused because I though true was any non zero > value and false was zero. Right. And if( $num % 2 ) { echo "it's odd"; } means that the operation returned a remainder - a non zero value. > I know I am using the following code: > if (!($num % 4){ do something} > and it does s

RE: [PHP] here's a tricky one (well for me)

2001-03-06 Thread Boget, Chris
> I am trying to let a user build a form, so on the first page they > decide on the number of fields , when they submit that number > it names them field1 2 3 etc,now I then want them to name the > fields but the problem is because the number of fields varies how > do I pass all the variables

[PHP] Auto Prepend/Append

2001-03-06 Thread Boget, Chris
Based on what I read, I believe the answer to this question is "No", but am hoping for confirmation because someone might have been able to find a way to make this work. Is it possible to use the auto prepend/append directives to prepend/append particular files only to files with a particular ext

RE: [PHP] Auto Prepend/Append

2001-03-06 Thread Boget, Chris
> >Is it possible to use the auto prepend/append directives to > >prepend/append particular files only to files with a particular > >extension? > I don't believe you can do this directly with PHP but you > probably can with > Apache: > > php_value prepend_file "foo.php" >

RE: [PHP] Auto Prepend/Append

2001-03-06 Thread Boget, Chris
> Try putting > > php_value auto_prepend_file "foo.php" > > in your httpd.conf file. Once you put this in the conf file > for Apache, restart Apache and see if the changes take place. > That should do what you want it to. Unfortunately, no. Here is what we have in our httpd.conf file:

[PHP] [A bit OT but not] Anchors and Query strings

2001-03-06 Thread Boget, Chris
I need to set up a link that has both. However, IE/NS isn't liking this: www.mydomain.com/thispage.php#joe?thisvar=thatvalue I need to pass "thisvar" into thispage.php and use it to determine information to display. I also need to pass the anchor name "joe" so the page jumps down to that ancho

RE: [PHP] Dynamic Links..

2001-03-08 Thread Boget, Chris
> > As a quick caveat you need to be *very* careful you're not > > obfuscating the target site copyright infringement, anyone? > We wont.. Their banners, logos, URL's etc. appear on the > pages, so even if it is in the frameset, it will be fine.. Yes, but their URL won't be in the address l

RE: [PHP] Anonymous Arrays

2001-03-09 Thread Boget, Chris
> To make it a little cleaner I would prefer to do something like: > my_func( { >'fname' => 'joe' > , 'lname'=>'coder' > , 'zip'=>'12345' > } ); > an not pollute the code with one-time vars Unless I'm misunderstanding what you are asking, you can do this: my_func( array( 'fna

RE: [PHP] oohform validation help

2001-03-09 Thread Boget, Chris
> What should I put in for the parameter jvs_name of the > oohform->start? Is that a name of another javascript file? > Where can I get a sample script? > I would like to make sure the clients put in something in the textbox. If you are talking about Jay Bloodworth's FormClass (one of the most

RE: [PHP] newbie array question

2001-03-09 Thread Boget, Chris
> I am trying to create an associative array dynamically. > Here's what I did first: > $form_val_list = > "firstname,lastname,address,address2,city,state,zip,phone,emai > l,resume"; > $form_arr = explode (",", $form_val_list); > while (list ($key, $val) = each ($form_arr)) > { >ech

RE: [PHP] Not isset

2001-03-09 Thread Boget, Chris
> how do I write a Not isset as in: > if != isset($order) > { > $order=$Table."ID"; > } if( !( isset( $order ))) { } I'm big on parens. :p OR if( empty( $order )) { } Chris

RE: [PHP] payment

2001-03-09 Thread Boget, Chris
> How to people typically integrate payment processors with PHP? > And what processors are used most often? I know that a number > of people are scrambling after cybercash died. There is a site out > there www.opay.com that says it supports payment processors > on any platform, anyone ever use i

RE: [PHP] Good Free PHP Editor?

2001-03-12 Thread Boget, Chris
> > Ive been using editpad up till now but my code is starting > > to get so large that ill need syntax highlighting soon... > HomeSite is great. www.allaire.com > - not totally free I'm afraid, but there is an eval version. > - runs under Windows yes > - supports syntax highlighting for lots of

RE: [PHP] Get next record

2001-03-12 Thread Boget, Chris
> How can one get the next record to compare two > fields... I want to check if the date of the first record > matches the date of the next record with the least amount > of code... You are going to have to work with row pointers. If you are using mySQL, look at the function: mysql_res

RE: [PHP] Good Free PHP Editor?

2001-03-12 Thread Boget, Chris
> > Has the worst memory management of any software I've ever used. > > I have to reboot at lest 10 times a day when I use it. The support > > forum on their site is filled with complaints on this issue. Their > > response to this issue was not to fix the memory leak (or whatever > > it is) but

RE: [PHP] Good Free PHP Editor?

2001-03-12 Thread Boget, Chris
> I use editplus. It has a feature that lets you add in auto > completion files, syntax files. It does have an eval version, > and it is not that expensive. The main feature I need of any editor is project management. Of all (and there have been *alot*) the editors I've looked at, Homesite is t

RE: [PHP] Good Free PHP Editor?

2001-03-12 Thread Boget, Chris
> It does have a project feature. Yup. It sure does. However, it doesn't work as we need it to. When I looked at EditPlus last time, it had a flat project structure. Meaning that you could add files to a project, but when you opened that project, all you would see is a list of all the files.

RE: [PHP] Day of Week??

2001-03-14 Thread Boget, Chris
> Hi wanna know How can i take the day of week of aany date... > Example: > How to know that 14 of march of 2001 is a Wednesday?? date( "l", $timeStamp ); // lowercase "L", or you could use "D" Look up the date() function. The documentation is your friend. Chris

RE: [PHP] Help needed - search problem

2001-03-15 Thread Boget, Chris
> If the keywords inputted from user are: "word2, word1", it > will reture News1 twice: That's because you are selecting all the records that match each single key word individually. > I want to search this table based on the Keywords. the code is: > $split = explode(" ",$keywords); > $Num = 0;

[PHP] PostToHost

2001-03-15 Thread Boget, Chris
After hours of searching :/ I was able to find Rasmus' PostToHost() function. It's working fine, for the most part. It's posting to the page and printing what it gets back as part of the page/code that calls the function. This is most likely expected behavior, just not what I expected. However,

RE: [PHP] PostToHost

2001-03-16 Thread Boget, Chris
> I am not sure exactly what you are asking but by this do you mean .. > > process_statements > ... > ... > Header("Location:http://www.some.net?id=$row->ID"); > > > > then use the string in $QUERY_STRING to retreive/parse your data. > Yes, more or less. However, I'm trying to find som

RE: [PHP] With all this talk about editors ...

2001-03-16 Thread Boget, Chris
> http://www.php.net/manual/en/ref.funchand.php > This page must be your friends. I took a look at this page (and all the functions referenced therein). While there must be a use for these functions otherwise they wouldn't have been included in PHP, I'm at a total loss as to why anyone would eve

RE: [PHP] Putting php at end of html?

2001-03-16 Thread Boget, Chris
> YES! > The only "problem" will be that these .php pages will be > maybe 5% slower since PHP is "parsing" them. That and all the links pointing to the old .html files will be broken... So if you mix PHP and HTML in a file, PHP will be slower to parse those files? I thought it was smart enough

RE: [PHP] include php3 -vs- 4

2001-03-16 Thread Boget, Chris
> Is there a workaround under php3 for include_once ? if( !$this_include_file_only_variable_declared ) { $this_include_file_only_variable_declared = 1; // your include script here } And if you attempt to include the file more than once in a script, the IF() will resolve true and skip past

RE: [PHP] Putting php at end of html?

2001-03-20 Thread Boget, Chris
> > So if you mix PHP and HTML in a file, PHP will be slower > > to parse those files? I thought it was smart enough to > > parse only what was within the recognized start and end > > tags (, , , > > etc)? > PHP *is* smart enough, but it has to "look" in the HTML to > see any

RE: [PHP] What does a ? do

2001-03-20 Thread Boget, Chris
> Could someone plese explain this line if code??? What does the "?" do? > $r = ($r < 1) ? $config['maxResults'] : $r; It's short circuit IF (I believe that's the right word for it). This is the same thing as doing this: if( $r < 1 ) { $r = $config['maxResults']; } else { $r = $r; } Chri

RE: [PHP] Create a Bulletin Board

2001-03-20 Thread Boget, Chris
> Yo! > I'm thinking of writing a bulletin board and I wonder about > threads. I want the board to be built on threads but I don't > know how to do it. I want it to look something like this: > subject 1 >| >|__ reply1 to 'subject 1' >| | >| |__ reply1 to 'reply1 to su

RE: [PHP] Create a Bulletin Board

2001-03-20 Thread Boget, Chris
> > Just keep track of a parent message number. You should be able > > to use that one field to trace any message back to a root message. > > And with that information, you should be able to build a "thread". > I concur on that. Good to see it's not just me. :p > However, I am more fond of the

[PHP] PEAR

2001-04-16 Thread Boget, Chris
Unless I'm missing something, I've looked all over the PHP site for a link to PEAR but have been unable to find one (including in the PEAR section of the manual, where you would think it would be...). Could someone please provide a link? Chris

RE: [PHP] PEAR

2001-04-16 Thread Boget, Chris
> > Unless I'm missing something, I've looked all over the > > PHP site for a link to PEAR but have been unable to find > > one (including in the PEAR section of the manual, where > > you would think it would be...). > > Could someone please provide a link? > http://www.php.net/manual/en/pear.php

RE: [PHP] PEAR

2001-04-16 Thread Boget, Chris
> > Could someone please provide a link? > http://pear.php.net/ > Don't be too disappointed about the website, some work on it is in > progress I can tell. :p There is an error when you access that page. Chris

[PHP] PEAR_Error

2001-04-16 Thread Boget, Chris
Is there any sample code for the above PEAR class around anywhere? Chris

RE: [PHP] function to add %20 in place of blank spaces

2001-04-16 Thread Boget, Chris
> I'm trying to remember what is the function to replace blank > spaces with %20. > Can anyone remind me of that? urlencode(); Chris

[PHP] set_error_handler()

2001-04-16 Thread Boget, Chris
Can you use the above function to set the error handler to a custom class? If so, how? I've been having no luck no matter what I do... Chris

RE: [PHP] set_error_handler()

2001-04-16 Thread Boget, Chris
> If I'm not mistaken set_error_handler() takes a string that > is the name of a function, I am sure in that function you can > instantiate whatever class you want. I thought about that. But ideally, what I'm trying to do is trap the errors with a class method (after instantiating) then print

RE: [PHP] set_error_handler()

2001-04-16 Thread Boget, Chris
> If I'm not mistaken set_error_handler() takes a string that > is the name of a function, I am sure in that function you > can instantiate whatever class you want. After thinking about it some more, I'm doing this. Not sure if this is the best way to go about it, but it allows me to do what I

RE: [PHP] set_error_handler()

2001-04-17 Thread Boget, Chris
> ""Boget, Chris"" <[EMAIL PROTECTED]> wrote: > > Can you use the above function to set the error > > handler to a custom class? If so, how? I've been > > having no luck no matter what I do... > I tried doing something like: > set_erro

[PHP] Running php as a CGI

2001-04-17 Thread Boget, Chris
We compiled PHP to be used as a CGI and it's working great. However, whenever we run a php script, the following message gets outputted at the start of the output: "X-Powered-By: PHP/4.0.3pl1 Content-type: text/html" Is there any way we can suppress that message? I looked all over the docs and

[PHP] Javascript mailing list

2001-04-17 Thread Boget, Chris
A bit OT, yes, but I don't want to ask an inappropriate question here (not that this isn't an inappropriate question :p). Can someone recommend a good Javascript mailing list? Chris

[PHP] get_class()

2001-04-17 Thread Boget, Chris
Given the following code: - class myClass { function myClass() { $classVar = get_class( $this ); } } $thisInstance = new myClass(); - What value should $classVar contain? "myClass" or "thisInstance" ? The documentation leads me to believe that it is the latter value, but

[PHP] Why is this happening

2001-04-17 Thread Boget, Chris
I've got the following code: --- while( list( $timeStamp, $elementArray ) = each( $this->ErrorMessages )) { $tmpArray = $elementArray; if( $tmpArray[errorNumber] & $typesToDisplay ) { // line to comment out while( list( $elementKey, $elementValu

RE: [PHP] Why is this happening

2001-04-17 Thread Boget, Chris
Ok, I found out what the problem was. I'm still curious why the problem is occuring. > if( $tmpArray[errorNumber] & $typesToDisplay ) { // line to comment out I almost always access associative arrays like the above - almost never without the quotes. IE $there = 5; echo "$this[that]\n"; ech

RE: [PHP] Why is this happening

2001-04-17 Thread Boget, Chris
> >Ok, I found out what the problem was. I'm still curious > >why the problem is occuring. > >> if( $tmpArray[errorNumber] & $typesToDisplay ) { > you're using the bitwise & when you want the logical && No, I actually wanted to use the bitwise &. I wanted to see if the "errorNumber" was in $t

  1   2   3   >