RE: [PHP] Re: Hostname

2004-12-15 Thread Boget, Chris
In earlier versions of PHP, you could use the $HOSTNAME global variable to get the server/machine name that is running Apache/PHP. However, that variable is no longer working and I can't seem to find a replacement in any of the super global variables. Is there one? How can you get

[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 $stringVarbr\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 individual

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 your

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 acts

[PHP] Serializing a DOM object

2002-12-30 Thread Boget, Chris
Consider the following: page1.php ?php // initializing soap server object, blah, blah, whatever here. // the important function, dumbed down to the barest essentials. // function test() { $retval = ; $xml = rootrowelementtest/element/row/root\n; $retval = serialize(

[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

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

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 the

RE: [PHP] PHP, XML

2002-01-07 Thread Boget, Chris
Does anyone know of a mailing list for PHP and XML or can I just pose them here?? PHP-XML. The list address is: [EMAIL PROTECTED] Chris

RE: [PHP] global generation

2002-01-07 Thread Boget, Chris
Wait until after the for loop has completed. for ($i=0; $i $num_results; $i++) { $variable[$i]; } global $variable; That's not going to work. The only thing that is doing is making an already global instance of $variable global within the function. What you want is this instead:

RE: [PHP] counting with dates (help!)

2002-01-07 Thread Boget, Chris
$today = date(Ymd, mktime(0,0,0, date(m),date(d),date(Y))); $last_week = date(Ymd, mktime(0,0,0, date(m),date(d)-7,date(Y))); echo ($today - $last_week); The result is a number like 8876 (20020107-20011231 = 8876) But in date thinking it should be 7! No, that's the difference in time

[PHP] Modulus and floating point...

2002-01-04 Thread Boget, Chris
Consider the following: $number = 102.52; echo $number % 50; echo bcmod( $number, 50 ); in both cases, it's spitting out 2. Why is it not spitting out 2.52? Is there a way I can get that information? w/o having to parse the string, breaking it up, getting the modulus and then adding it back

RE: [PHP] easy quickie..

2002-01-02 Thread Boget, Chris
I think it is $HTTP_SERVER_VARS['HTTP_REFERER'] Except that the value for this variable isn't always set and can be spoofed. This value should not be relied upon. Oftentimes (though, you'd have to be creative to make this work in a seperate window), what I use to send the user back to where

RE: [PHP] http referer problems

2001-12-13 Thread Boget, Chris
if ($efa != nm || $HTTP_REFERER != http://www.globalhealth.org/news/article.php3?id=1526;){ do this); } Not sure what the exact problem is as you haven't been all that descriptive as to what the values are or what is happening, but you should know that $HTTP_REFERER can't be trusted. You

[PHP] How do I do this

2001-12-13 Thread Boget, Chris
I've got the following possible (example) strings: [hi] there, this is me [HI] there, this is me [ho] there, that is you [HO] there, that is you [hey] there, where are you [HEY] there, where are you and so on. I'm trying to come up with a regex that will find the capitalized text (only)

RE: [PHP] Re: How do I do this

2001-12-13 Thread Boget, Chris
This is untested, but something like... $str = [hi] there, this is me [HI] there, this is me; $newstring = ereg_replace((\[[A-Z]*]), br\\1, $str); should do it. using the Perl regexe's might make it easier, but that should work. That worked perfectly. Is there any way I can make it so that

RE: [PHP] Logo proposal

2001-12-12 Thread Boget, Chris
H - killer - how about an Orca? We'll pretend that they get along well with the MySQL dolphin, but PHP is definitely a killer app. Yeah, but don't Orcas eat penguins? Chris

RE: [PHP] Re: Script like this for PHP

2001-12-12 Thread Boget, Chris
The pop outs are done using JavaScript. Its something to do with setting the STYLE=visibility: hidden property of the HTML element. I'm not sure exactly how its done though. Yeah, and it only works on IE (and maybe NN6+). It won't work (the same way) on NN 6. Chris

RE: [PHP] Global storage of objects.

2001-11-29 Thread Boget, Chris
I would like to know if there is a way to store objects globally from a php-page, so that the object can be used from another page. Yes, using sessions or cookies. Chris

[PHP] Coding methods (was RE: [PHP-DB] gzip image files)

2001-11-27 Thread Boget, Chris
$filename = 'kunden/'.$name.'.png'; I see this all the time and I'm curious: what takes more computing power (granted, either would be incredibly little I'm sure, just curious which requires more work by PHP)? this: $filename = this . $varname . that; or this: $filename = this $varname

RE: [PHP] schedule a task

2001-11-19 Thread Boget, Chris
thanks for a quick response but I have a major problem with that: no shell access = can't use cron Your Windows task manager? Just set it up to go to that page every night at your (not the server's) midnight... Chris

RE: [PHP] Php Array

2001-11-16 Thread Boget, Chris
How can I send the values inside the array into a function for calculation? function addValues( $arrayVar ) { $reteval = 0; foreach( $arrayVar as $element ) { $retval += $element; } return $retval; } $myArray = array( 1, 2, 3, 4, 4 ); echo addValues( $myArray ); Chris

RE: [PHP] Jump to internal link after $PHP_SELF post

2001-11-15 Thread Boget, Chris
A large page is generated with data from a MySQL database. The various paragraphs inside this page have variable, internal links, also extracted from the database. Example: a name=\$value\/a Let's assume that $value represents FOO. Ok Now i want to take the value of this variable to post

RE: [PHP] Jump to internal link after $PHP_SELF post

2001-11-15 Thread Boget, Chris
When is $value assigned a value? Before or after the script prints out the form action= line? This $value is somewhere within the form page ($PHP_SELF). So it is a value that the user sets? After the script runs and the HTML output generated? $PHP_SELF?#FOO in the script, it all

RE: [PHP] Jump to internal link after $PHP_SELF post

2001-11-15 Thread Boget, Chris
It depends on where value is coming from. If it's coming from the script server side, then you just need to make sure that $value is set before the line form action= gets printed. If it's coming from the client side, there may be other problems... $value is defined in the server-side

[PHP] Getting uploaded filename directory

2001-11-12 Thread Boget, Chris
In setting up a form to allow a user to upload a file, upon submission of that form, you can get the actual file name that is being uploaded by accessing the variable: $userfile_name (assuming the form element's name where the user specifies the file is $userfile). Is there a way to get the

RE: [PHP] how can I do this !!

2001-10-25 Thread Boget, Chris
i have txt file have this words -- bla bla bla [phpcode] ? echo 'hello word'; ? [/phpcode] bla bla bla --- now I want to convert the code that are between [phpcode] and [/phpcode] to colorized code .. How I can do that Copy the file to .phps and access that page

RE: [PHP] Searching for a word in a string

2001-10-19 Thread Boget, Chris
How can I search for a certain word in a string? strpos() ereg() preg() and similar functions. Chris

RE: [PHP] something like alert (javascript)

2001-10-03 Thread Boget, Chris
Is there any function in PHP that is similar to alert() or confirm() of javascript ? I tried die() but that's not what I need. What do you want it to do? Remember, though, that PHP = server side while Javascript = client side. If you want alert() or confirm() functionality on the client

RE: [PHP] header() confusion

2001-09-26 Thread Boget, Chris
Yes that's what I do but it freeze on netscape 6 ? FAFAIK the client's browser can't influence the header() call in your script. Are you sure there aren't any errors somewhere else. Eg before the header() call or at the start of the page where you redirect the user to? Indeed. A good way

RE: [PHP] handling errors

2001-09-26 Thread Boget, Chris
How do I turn off the error messages that appear at the top of the page? I have this function below that if an image is not there for $url, it give a warning. $size = GetImageSize($url); Example error message below... Warning: getimagesize: Unable to open 'http://www.yahoo.com' for

RE: [PHP] Variable declaration

2001-09-26 Thread Boget, Chris
I want PHP parser to warn/fail when I try to use a variable not declared before. Like Option Explicit on ASP/VBA. Look here: http://www.php.net/manual/en/function.error-reporting.php Chris

RE: [PHP] dates only in the future

2001-09-25 Thread Boget, Chris
I'm looking for a function which enables me to allow user only to enter those dates which are still to come. In my head I have three select things... one for day, one for month and one for year. In order to prevent the user from submitting the form with the date which is in past, I need

RE: [PHP] 2 decimal places

2001-09-25 Thread Boget, Chris
What if I want to pad a number with zeros in the other direction? I.E: 524 becomes 00524 printf() / sprintf() is your friend. Chris

RE: [PHP] 2 decimal places

2001-09-25 Thread Boget, Chris
Yeah, but what if they don't JUST want to print it... Umm, have you read the documentation on either of the functions? They both return a string; they don't send anything to standard out (like echo or print does). $myString = printf(); $myString = sprintf(); echo $myString; Chris

RE: [PHP] Variable naming

2001-09-25 Thread Boget, Chris
I want to use the value of a variable in a variable name. For instance: $id = 1; $sql_$id = hey; //set variable $sql_1 to hey print $sql_1; //should print hey I *believe* (could be wrong) what you want is this: print ${$sql_1}; Check out variable variables in the dox. Chris

RE: [PHP] Merging Arrays

2001-09-21 Thread Boget, Chris
I've got to different files of words. One on each line. What would be the best way to combine both into one file alphabetically? after you merge the arrays, use asort(); Chris

RE: [PHP] emails with attachements

2001-09-21 Thread Boget, Chris
i want to send emails with attachements... can I modify the mail()-function or how can I perform this? You can get classes that do this very thing at the following site: http://phpclasses.upperdesign.com/ Chris

RE: [PHP] importing text file

2001-09-20 Thread Boget, Chris
I would even go for $Something and just $SomethingMore with $Something really being $Something-$SomethingElse. I don't know if that makes sense. Any help would be greatly appreciated. Take a look at file(); and just loop through the resulting array and removing all the blank elements.

RE: [PHP] Re: Is it *really* an associative array?

2001-09-18 Thread Boget, Chris
what are you trying to do? why do you want to diffirentiate between 99 as a string or as a number? Because if it is a string, more than likely it means that the key was user defined and is not PHP defined as an element number. Again, consider the differences between these two arrays:

[PHP] Is it *really* an associative array?

2001-09-13 Thread Boget, Chris
Sample code: script language=php $array = array( one, two, three ); while( list( $key, $val ) = each( $array )) { if( is_string( $key )) { echo Key is a string\n; } echo Key: $key = $val :Val\n; } echo \n\n; $array = array( SS = one, 15 = two, 19 = three

RE: [PHP] test for empty $result??

2001-09-10 Thread Boget, Chris
Then you can use: if (mysql_num_rows($result) == 0) { stuff here } This will check the number of rows returned from your query. If zero, then do somethingmodify as you need. What I generally do is this: if(( !$result ) || ( mysql_errno() 0 )) { // error code here } OR if((

RE: [PHP] adding functions to a class

2001-09-04 Thread Boget, Chris
the require(morefunctions.php); will ofcource not work but bassicly this is what I want. en all the functions added should be able to use VAR1 VAR2 VAR3 (and the other functions that are allready in the class) is there a why to do this ?? Yes, there is. Go here:

RE: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Boget, Chris
So sprach »Arcadius A.« am 2001-08-31 um 05:27:04 -0700 : $u = $SCRIPT_FILENAME; Because you did not define $SCRIPT_FILENAME anywhere. If you want to access the global variable, you've got to say so: global $SCRIPT_FILENAME; Or, so you don't have to specify all the variables you are

RE: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Boget, Chris
Or, so you don't have to specify all the variables you are using as globals (especially if you are using *alot* of them), you can use: $GLOBALS[SCRIPT_FILENAME]; What's the gain? 'global ' has 7 characters, whereas '$GLOBALS[]' has 10 characters. So, you don't type less. And with

RE: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Boget, Chris
One of the downside of PHP IMHO is, that you do not have to define variables. This leads to a lot of errors. At least there should be a option, which forces you to define variables, like maybe so: dim $some_var; I definitely agree there. I've been bitten by this bug more times than

RE: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Boget, Chris
Cool ... Now that we're talking about PHP I'd like to ask a question You know the overloading function in C++ Is that possible in PHP ? No, I do not believe so. Basically , I'd like to define more than one function having the same name but different number of

RE: [PHP] How to get a double to show the .00 in a hole number

2001-08-31 Thread Boget, Chris
I am trying to get a double data type to display the .00 in a hole dollar amount (i.e. 432.00 not 432 or $432.00 not $432). Can anyone tell me how to do this? printf(); or sprintf(); is your friend Chris

RE: [PHP] Directing A Parked Domain To A Sub Directory

2001-08-30 Thread Boget, Chris
How can I use PHP to detect if the visitor wanted MainDomain.com (and display MainDomain/index.php) or WidgetWorld.com (and then display MainDomain/Widgets/index.php). I *believe* what you are looking for is $HTTP_HOST. Chris

RE: [PHP] ucwords Except 'The' 'And' etc?

2001-08-13 Thread Boget, Chris
Is there a prewritten function for capitalizing the first letter of each word in a string except for the common words you wouldn't want to capitalize in a title? Like Come Learn the Facts From an Industry Leader None that I've seen. But it wouldn't be hard to write a function that takes a

RE: [PHP] array through url?

2001-07-27 Thread Boget, Chris
Is it possible to send an array of numbers into a php file through a url? Like if I have a file that adds numbers together, could I send it www.domain.com/add.php?num=2,3,4,5 $num would be an array. Thanks, Pat

RE: [PHP] substr question...

2001-07-26 Thread Boget, Chris
I am trying to receive file names but can't quite figure out the proper substr to do it: jeff.dat jeffrey.dat chris.dat tom.dat I want to receive the name to the left of the .dat $fileName = eregi_replace( \.dat, , $fullFileName ); Chris

[PHP] Getting mail() to work in PHP for Windows

2001-07-25 Thread Boget, Chris
I couldn't find anything in the docs about this... What do you need to have installed to be able to use the mail() function (and have mail get sent out) in PHP for Windows? If you could point me to the proper place in the documentation so I can read up on it, I'd be ever so grateful! Chris

RE: [PHP] Why doesn't this simple query work?

2001-07-25 Thread Boget, Chris
Driving me mad. Works if I put a string in quote marks instead of the variable $location. $result = mysql_query(SELECT shootID FROM shoots WHERE (location=$location)); This should work shouldn't it? If it's a problem with the variable being embedded in the query what's the easiest way to

RE: [PHP] is this right

2001-07-24 Thread Boget, Chris
this doesn't work,how should it be done? insert into test (uid, companyUid) values(1, select uid from companysTable where company = Micrsoft); If you are using MySQL, it doesn't support sub selects... Chris

[PHP] Best way to...

2001-07-24 Thread Boget, Chris
get the difference in months between two dates using a unix time stamp? I know I can do something like this: $startMonth = date( m, $startTimestamp ); $startYear = date( Y, $startTimestamp ); $endMonth = date( m, $endTimestamp ); $endYear = date( Y, $endTimestamp ); $numMonths = $endMonth -

RE: [PHP] Best way to...

2001-07-24 Thread Boget, Chris
$numMonths += ( 12 + ( $endMonth - $startMonth )); This last line should have read: $numMonths += ( 12 + ( $endYear - $startYear )); Too much cutting and pasting... :p Chris

RE: [PHP] Get filename in php command line

2001-07-17 Thread Boget, Chris
Seems that $PHP_SELF is not defined when it's run from the command line. Try: __FILE__ Chris

RE: [PHP] Get filename in php command line

2001-07-17 Thread Boget, Chris
I had that before. OK, seems that my problem is not that simple. The thing is , I have something like this in my file test.php: require('my_api.inc'); echo This is test.php3; Now, in my_api.inc, I want to know that I run test.php3, when I do bash$ php test.php3 and the filename is

RE: [PHP] PHP- something tha i don't understand

2001-07-17 Thread Boget, Chris
8:$result = mysql_db_query(users, $query); 9:$r=mysql_fetch_array($result); 10: $count=$r[count]; And the error message is Warning: Supplied argument is not a valid MySQL result resource in c:\inetpub\wwwroot\PhpAndMysqlTest\test2\reg1.php3 on line 9 You need to validate that the

RE: [PHP] return

2001-07-16 Thread Boget, Chris
Here's my code: ? function expDate($date) { $month = substr($date, 0, 2); $len = strlen($date); $year = substr($date, $len-2, $len); return $month; return $year; } expDate(11/2002); print $month $year; ? I know this isn't the correct usage of

RE: [PHP] Export to Excel

2001-07-13 Thread Boget, Chris
Here's something I found on the PHP Code Exchange: Generate Excel files from PHP by Christian Novak on 2000-11-25 11:47:24 (v for 4.0) is 1974 bytes. Small function library to generate Excel files/stream directly from PHP. http://px.sklar.com/code.html?code_id=488 I haven't tried it

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Boget, Chris
if (!$C_Last_Name$y) { The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2 depending on how many Children are signing up for something. So I need $y to represent the number. You want this: if (!{$C_Last_Name}{$y}) { The {} surrounding the

RE: [PHP] referring url

2001-07-11 Thread Boget, Chris
Is there a way in PHP to get the referring url when a link is click to get to that page? $HTTP_REFERER getenv('HTTP_REFERER') Note that this isn't supported on all browsers and can be turned off or faked/munged. Chris

RE: [PHP] HTML/PHP's static state problem.

2001-07-09 Thread Boget, Chris
Basically I mean this: I load the page, it has two comboboxes (select with option). The first one contains names of countries, the second names of cities within those countries. When I select Belgium in the first one, I only want to see all Belgian cities. Now with JavaScript this

RE: [PHP] HTML/PHP's static state problem.

2001-07-09 Thread Boget, Chris
I've done this very thing for a leasing company. I used PHP and MySQL to create a series of arrays in Javascript. When the user clicked on a value in the first combobox I used onClick to call a function which loaded information into the second box. A definite possibility. The

RE: [PHP] Passwords?

2001-05-23 Thread Boget, Chris
I have some field error checking going on ... and when a user (say) doesn't fill in a field correctly, my error page comes up telling them. They then must click on their browsers back button and make the changes. Now -- I have a password field, and when they click back, they are forced

RE: [PHP] session and back button

2001-05-22 Thread Boget, Chris
I'm using sessions and if the user hits the back button an expiration page appears! how can i disable the back button ? i tried window.history.forward(1) but it fails ! Even more interesting is that when a user presses the back button all the way back to the page that initially started the

[PHP] File upload form

2001-05-22 Thread Boget, Chris
Below is the (very) simple form that I'm using to allow users to upload files to my site: --- html head titleUpload Attachment/title /head body br center h3Upload File/h3 You are uploading from an unsecure server.br FORM ENCTYPE=multipart/form-data

RE: [PHP] File upload form

2001-05-22 Thread Boget, Chris
Have you asked what browsers they are using? This happens primarily on IE but it also happens using NS Also, what are you using to serve this page? ? PHP 4.0.4 and Apache. Chris

RE: [PHP] Quotes in GET variables

2001-05-21 Thread Boget, Chris
Anyway, it's not a big thing if you're _really_ stringent about how you check every single variable which is used in a database query, system/passthru/exec, or eval command, and your checking methods are flawless, but otherwise it's just best to go to the trouble of hacking around the input

RE: [PHP] Is there any sleep function?

2001-05-18 Thread Boget, Chris
Is there any sleep function in PHP like in Perl? For example, you will define the time in seconds and system will wait for that time to continue running the script? You read the documentation at all?!? http://www.php.net/manual/en/function.sleep.php Chris

RE: [PHP] download successfull... but in binary... why?

2001-05-09 Thread Boget, Chris
header(Content-type: application/download); I think you'd need to change this to: header(Content-type: text/plain); but I could be wrong... and where can I find reference on these header stuff? Not sure. I find bits and pieces in this list... Chris

RE: [PHP] Days between two dates

2001-05-07 Thread Boget, Chris
Hi, How can I calculate days between two dates ? This should work: $firstDate = mktime( 0, 0, 0, 1, 12, 2001 ); $secondDate = date( U ); $daysInBetween = ( $secondDate - $firstDate ) / 86400; Chris

RE: [PHP] Days between two dates

2001-05-07 Thread Boget, Chris
Sorry, it doesn't work !! Why do you say that? I just tested it and it worked. It returned: 115.31296296296 115 being the number of days .31296296296 is the fraction of the day that is the difference of hours between the two times. mktime() and date( U ) return a unix timestamp which is

[PHP] File upload form

2001-05-01 Thread Boget, Chris
Below is the (very) simple form that I'm using to allow users to upload files to my site: --- html head titleUpload Attachment/title /head body br center h3Upload File/h3 You are uploading from an unsecure server.br FORM ENCTYPE=multipart/form-data

RE: [PHP] File upload form

2001-05-01 Thread Boget, Chris
The problem that I'm experiencing using the above form is that when some users (and the problem is consistent for those users) submit the above form, *none* of the POST variables are getting passed to the receiving page. None of the hidden variables, not the input type = file variable,

RE: [PHP] PHP Graph class/library anywhere?

2001-05-01 Thread Boget, Chris
is there a PHP class/library available anywhere, that supports dynamic creation of different graphs? I need 2D bar graph and pie graph support. i found the VH Graph (http://www.vhconsultants.com/graph/graph.htm), but they want $100 for their 2.x version. i'd prefer a free one (i'm sure

RE: [PHP] File upload form

2001-05-01 Thread Boget, Chris
Again, any help would be greatly appreciated! could be a browser specific issue. have you checked into the possibility that people having problems are all using the same browser? I don't know what all of them are using, but most are using IE. I don't know how feasable it would be to get

[PHP] File upload

2001-05-01 Thread Boget, Chris
From the manual: Handling file uploads Uploading multiple files Common Pitfalls Not validating which file you operate on may mean that users can access sensitive information in other directories. What is meant by the above? How would you validate that you weren't operating on the

RE: [PHP] --enable-trans-sid and forms

2001-04-27 Thread Boget, Chris
Its my understanding that PHP appends the SID on the end of the URL regardless of weather its a form or not. If thats not happening for you, check your php.ini and make sure you have session.use_trans_sid enabled. It is enabled. And it's being appended to most URLs (though, not

RE: [PHP] --enable-trans-sid and forms

2001-04-27 Thread Boget, Chris
Here is what I see in my FORM with --enable-trans-sid: FORM METHOD=POST ACTION=./test_formRun.php INPUT TYPE=HIDDEN NAME=PHPSESSID VALUE=cbf75d263416e77d773b1772f6e1be89 PHP is adding the HIDDEN field with the session id. For some reason, it also appends it to the SRC attribute of the

RE: [PHP] --enable-trans-sid and forms

2001-04-27 Thread Boget, Chris
have you checked your PHP.INI file? it sais there what links to rewrite. This is what is in my .ini. url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry ; added 3/2/01 Am I missing something here that I should have? I don't see anything in the docs about the above

RE: [PHP] How to find the object name in a class?

2001-04-24 Thread Boget, Chris
*sigh* I'm thinking so too ;( Doh! However, I have at least a usable hack around. In the constructor of your class, add: function Class ($object_name) { global $pge; $pge = $object_name; } Then when you use create a new object of that type you must use: $objectname = new

RE: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Boget, Chris
My problem is that not displaying anything in case of an error is a completely unacceptable solution. I *MUST* return a valid XML message in a predefined format. If not, I am violating the standard we are if (@foo_bar (42, 4711) == ERROR_CODE) { PrintXMLErrorMessage (); I do not

[PHP] Error Handling

2001-04-24 Thread Boget, Chris
Is there a good write up out there or can anyone offer some insight to the rest of us as to how error handling should be properly implemented? Yes, PEAR has some error handling routines, but it doesn't have any kind of information as to how it should be properly implemented. I've just finished

RE: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Boget, Chris
standard we are if (@foo_bar (42, 4711) == ERROR_CODE) { PrintXMLErrorMessage (); I do not believe the above will work. When using the @ symbol in front of an expression, it makes it so that the error code that is returned is 0. While writing my error handler class, in the

RE: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Boget, Chris
if (@foo_bar (42, 4711) == ERROR_CODE) { PrintXMLErrorMessage (); Well, we both are right. The snippet I suggested (top of this mail) *will* work, because the @ operator doesn't mess with the return value of the function. That is correct. However, the == ERROR_CODE

RE: [PHP] db to xls

2001-04-24 Thread Boget, Chris
I want to query an oracle database and push the output to an MS Excel spreadsheet . Currently I am dumping it to a csv text file and reading into Excel. Is there a better way to do this?? Is there a php function for this ?? What I am doing is using PHP to generate an HTML table in

RE: [PHP] link variables space problem in netscape

2001-04-24 Thread Boget, Chris
Two words: URL Encode. Actually, one word: urlencode(); heheheh Chris

RE: [PHP] Lines

2001-04-24 Thread Boget, Chris
If you use the file() function to open up the file, it will put each line of the file into an array. At that point you can say: But how can i put into a var $total the total lines that i have into the file? After you've used the file() function as suggestion above, the total number

[PHP] Associative arrays in strings

2001-04-23 Thread Boget, Chris
We have an array: $myArray = array( joe=bob, this=that ); I know that technically, you shouldn't do the following to print it out: echo Here is a $string, $myArray[joe] with $alot of PHP $variables; If you have the highest error level on, PHP will display an error though if you don't, it

RE: [PHP] --enable-trans-sid

2001-04-23 Thread Boget, Chris
I wasn't able to find this in the docs, so could someone tell me exactly how --enable-trans-sid is supposed to work behind the scenes? while it won't for this url: a href=/interactive/direct_apply/resident.php target=_tophere/a I've also tried... a

RE: [PHP] How to find the object name in a class?

2001-04-23 Thread Boget, Chris
So is there ANY way to get the name of the object in PHP code without knowing the name of the object ahead of time? I went through this exact thing not too long ago with an error class I wrote. Unfortunately, there is no way to know. What you can do, however, is do a check to see if that

RE: [PHP] This should be simple...

2001-04-20 Thread Boget, Chris
INPUT TYPE ="text" blab blab VALUE = "Here's the text "in quotes"" Well, obviously there's a problem with that. The form field will show "Here's the text " and then thinks it ends. Is there any way to get around this, other than stripping out her quotes? Thanks,

[PHP] --enable-trans-sid

2001-04-20 Thread Boget, Chris
I wasn't able to find this in the docs, so could someone tell me exactly how --enable-trans-sid is supposed to work behind the scenes? Why would this option work and transmit the SID for this url: a href="/interactive/secure_frame.php?sourcePage=? echo urlencode(

RE: [PHP] --enable-trans-sid

2001-04-20 Thread Boget, Chris
I wasn't able to find this in the docs, so could someone tell me exactly how --enable-trans-sid is supposed to work behind the scenes? Why would this option work and transmit the SID for this url: while it won't for this url: It makes no sense to me... Any help would be greatly

RE: [PHP] Why is this happening

2001-04-18 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

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_error_handler("Error::handleError"); mys

  1   2   3   >