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 app

[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: " target="_top">here while it won't for this url: here It makes no sense to me... Any help would

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

2001-04-20 Thread Boget, Chris
> > > > 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, > http://php.net/htmlentities Or, even better, just use addslashes(); $query = "INS

[PHP] Which is better coding style...

2001-04-19 Thread Boget, Chris
Which is better? function blah() { switch( $bob ) { case 1: return "this"; case 2: return "that"; default: return "other"; } } function blah() { $retval = ""; switch( $bob ) { case 1: $retval = "this"; break; case 2: $retval

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 "error

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

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

[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

[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] 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] 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

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

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-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

[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] 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] PEAR_Error

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

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

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

[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

[PHP] Error Handling class

2001-04-12 Thread Boget, Chris
I've looked around but haven't really found one... Does anyone know where I can find a class (or a set of functions) that handles errors gracefully? I'm about to write something to do this but would rather not reinvent the wheel. thnx, Chris

RE: [PHP] Date/Time Arithmetic

2001-04-11 Thread Boget, Chris
>Is it possible to do some arithmetic with time/date values in PHP? > for example, to calculate: >today + 1050 days. >today - 7 days. >etc. > I mean, does PHP have functions to perform these operations? $oneDay = 86400; // number of seconds in a day

RE: [PHP] Sorry - Way OT but I need help

2001-04-09 Thread Boget, Chris
> I know this has nowt to do with PHP so I'll keep it as short > as possible. > My problem is, I'd like to get 404 error redirecting to work > in IE under Apache. I've set the ErrorDocument in apache.conf > and in .htaccess. It works in Netscape et al but not in IE. > IE seems to be issuing it'

RE: [PHP] list files in a diretory

2001-04-09 Thread Boget, Chris
> How can I list the files in a diretory? > Something like, get the files name in an array... http://www.php.net/manual/en/class.dir.php Chris

[PHP] MIT for free

2001-04-04 Thread Boget, Chris
I humbly and sincerely apologize for this off topic post. But I just came across a page that I thought that many of you would find very interesting: http://web.mit.edu/newsoffice/nr/2001/ocw.html http://web.mit.edu/newsoffice/nr/2001/ocw-facts.html MIT is going to start offering their coursewar

RE: [PHP] Include Files

2001-04-04 Thread Boget, Chris
> I'm trying to use html "include" syntax in a php page.If I > use .shtml the php gets ignored .If I use php the the php gets ignored.Is there a way > of doing this without using the php include function? Set up the .shtml extension so that it is parsed as PHP. Chris

RE: [PHP] Sneaky solution

2001-04-04 Thread Boget, Chris
> This may not matter for your application -- are you writing a > financial app or a personal portfolio? -- but if you really need > to authenticate the source of data that comes from some other > IP address (as is the case with a web browser) then you're into > PGP keys and signed certificate

RE: [PHP] Sneaky solution

2001-04-04 Thread Boget, Chris
> If you want to check where your submit is comming from, then > you need to check the REFERER url. do so by useing the globa > $HTTP_REFERER variable. Except that, as I point out in the message that the person you responded to replied to, $HTTP_REFERER by no means is guaranteed to have a va

[PHP] Form Request Validation - what do you do?

2001-04-03 Thread Boget, Chris
The following situation is possible (and has happened; lord knows I've done it on more than one occasion). Names have been changed to protect the innocent. Your average form. Fill in my age and hit "Submit" The form data gets sent to "processform.php". Every thing is all well and good.

[PHP] PHP & cURL Tutorial

2001-04-03 Thread Boget, Chris
Is there something along these lines somewhere out there? If so, could someone point me in the right direction? Chris

RE: [PHP] Quick one...

2001-04-03 Thread Boget, Chris
> How do I alphabetize the out put of my data base? > The field would be LastName "SELECT * FROM MyTable ORDER BY LastName" Then loop through the result set. Chris

RE: [PHP] Change in date() in php4.0.4...

2001-04-03 Thread Boget, Chris
> I haven't checked date( ) in the manual, but could work? Sometimes, I am *such* a retard... My humble apologies for my previous post. Chris

[PHP] Bug in date() in version 4.0.4?

2001-04-03 Thread Boget, Chris
echo date( "r h:ia" ); returns: Tue, 3 Apr 2001 13:45:46 +0500 12:875903540pm What's up with the minutes? Does anyone else get this problem? It seems the minutes are only screwed up with the "r" format specifier is used... Chris

[PHP] Change in date() in php4.0.4...

2001-04-03 Thread Boget, Chris
In the previous version we had (4.0.3), the following worked: echo date( "m/d/Y h:ia" ); to display the date on the first line and the hours:minutes am/pm on the second line. Now, looking at the date function, it looks like the "r" character has been added as a formatting specifier. Is there

RE: [PHP] Hmmmm....this is definately not expected....

2001-04-02 Thread Boget, Chris
> While trying to print A-Z... > This spews A-Z, then AA-YZ, then stops, most likely from a timeout. >for ($x = 'A'; $x <= 'Z'; $x++) > { > echo "$x\n"; > } > ?> This very issue was raised earlier today. Check out the thread: "Why does it work this way". Chris

RE: [PHP] nl2br

2001-04-02 Thread Boget, Chris
> In PHP there is an instruction : nl2br . > Does anybody know if there is something similar in Perl??? I think this syntax is correct... it's been a while... $string =~ /\\n/\/g or something along those lines... :p Chris

[PHP] Why does it work this way?

2001-04-02 Thread Boget, Chris
for( $i = "a"; $i <= "z"; $i++ ) { } Not entirely too sure why, but the above works. And it's really cool that it does. :) However, it doesn't work as one would expect (aside from the fact that it works at all :p). Just looking at it, I would think that it would iterate from "a" to "z" and st

RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-30 Thread Boget, Chris
> Wouldn't doing it like this however be ok: > if ($result = mysql_query($query)) { I could be wrong, but I do not believe so. The above would evaluate as _true_ 100% of the time because irregardless of success of the query, $result is getting a value. It's just like doing: $i = "joe"; if(

RE: [PHP] Pattern Replacing

2001-03-29 Thread Boget, Chris
> That's where I get $query from. It's been returned from a multiple > select via a web form. I want to format this selected data into a query > string so I can plug it into a SQL statement. > Thanks for the input and if any one has any thoughts on the subject > appreciate the assistance. If t

RE: [PHP] Case?

2001-03-29 Thread Boget, Chris
> I have tried the online documentation and it either errors > out on me or cannot find anything when I search on case. > Can someone tell me if PHP supports case statements (or > do I just need to do a series of ifs?) and if so where I can > find them detailed in the online docs? You want:

RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Boget, Chris
> Doesn't the command return 1 or 0 in success or failure? Not 1 or 0. It returns 0 or some other value. Almost the same, but not quite. > You may not have a result > Probably wrong but something like > if (mysql_query($query)) { > } else { > } > or you could die out mysql_query($query) or d

[PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Boget, Chris
> i was just wondering what you guys do to check if a wquery > suceeded or not? > I know about mysql_num_rows() and mysql_affected_rows(), just > wondered what > you guys do? I do this: $result = mysql( $dbname, $query ); if(( $result ) && ( mysql_errno() == 0 )) { // query was successful

RE: [PHP] HTML to Text

2001-03-28 Thread Boget, Chris
> Isn't that what strip_tags() does? > http://www.php.net/manual/en/function.strip-tags.php I looked all over the documentation and I did not see this function. Now I feel all stupid. Especially when most of my posts to the mailing list refer people to the docs... :p Thanks. Chris

[PHP] HTML to Text

2001-03-28 Thread Boget, Chris
I've looked various places (the PX, Hotscripts, etc) for a function that will take a HTML file, strip out all of the HTML and return just plain text. Does anyone know if such an animal exists? Does any one have a copy of a function that does this? Thanks for any help you can provide! Chris

RE: [PHP] PHPBuilder website

2001-03-23 Thread Boget, Chris
> > What's up with the PHPBuilder website? It's been down all day. > > :( Does anyone know? > I can get to it OK. Well, I can now... :p Chris

[PHP] PHPBuilder website

2001-03-23 Thread Boget, Chris
What's up with the PHPBuilder website? It's been down all day. :( Does anyone know? Chris

RE: [PHP] Move data from one MySql table to another?

2001-03-23 Thread Boget, Chris
> Remove the "values" in your sql and see Bingo! Damn, this is *so* cool. This is going to save me much work in the future. :) Thanks everyone, who was involved in this thead, for the insight! I read the docs a billion times... I'm not sure how I missed this. :p Chris

RE: [PHP] Move data from one MySql table to another?

2001-03-23 Thread Boget, Chris
> MySQL only supports INSERT ... SELECT ... and REPLACE ... SELECT ... > Independent sub-selects will probably be available in Version > 4.0. You can now use the function IN() in other contexts, however. I tried the query in the original post and I could not get it to work. This is what I got:

RE: [PHP] security

2001-03-23 Thread Boget, Chris
> check HTTP_REFERER. If it's not your server. toss it. It's > not the most secure way but check the page, there are other > variables you can use to accomplish the same thing. Even better (and it'll *always* work as far as I know), check $HTTP_HOST. Chris

RE: [PHP] Move data from one MySql table to another?

2001-03-23 Thread Boget, Chris
> To populate new_table from old_table you can give it this SQL: > INSERT INTO new_table (name, address) VALUES SELECT name, address FROM > old_table; Umm, I didn't think you could do subselects in MySQL? Or am I missing something? Chris

RE: [PHP] "w" problem

2001-03-23 Thread Boget, Chris
> Does someone know what's the "w" is for. This is the error message: > Warning: > fopen("../_webstats/include/caches/last_visitors.cache.html","w") Read the docs on fopen(); > Does it has to do with "write" rights?? Yes. Read the docs on fopen(); The documentation is your friend. :) Chris

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

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] 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] 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] 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-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] 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] 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

[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] 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;

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] 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] 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
> > 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] 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
> > 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] 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] 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] 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] 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] 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] 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

[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] 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:

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" >

[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] 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

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] 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
> 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] 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] 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] 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] 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
> > 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] 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
> 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] 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
> 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] 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

[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] 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. >

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 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
> 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

[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] 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] 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

[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

<    1   2   3   >