Re: [PHP] sososoosos!!!!

2003-02-13 Thread Leif K-Brooks
Do you know how many internet etiquette rules you're breaking by typing in all caps like that? Well you're breaking one. Don't type in all caps. --Strong Bad Anyway, download the .zip from http://www.php.net/downloads.php and read the installation instructions included with it. Luis A wrote:

[PHP] What's the scoop on PHP 5?

2003-02-13 Thread Leif K-Brooks
Anyone know what the status of PHP 5 is? I can't find reference of it on php.net, and the only place I can find an alpha of it is at the PHP Museum. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the

Re: [PHP] Add a record and recover it's ID in one operation

2003-02-13 Thread Leif K-Brooks
www.php.net/mysql-insert-id Daniel Page wrote: Hi, Imagine a table with an auto-increment id number field and a text field for the username. User B (with user name 'johnny') could write to the database a millisecond after user A, with the same username. When user A looks for the last record wri

Re: [PHP] How does PHP transforms an integer on a string? like "3"onto "three"

2003-02-14 Thread Leif K-Brooks
It transforms 78 into "78". Francisco wrote: Does PHP transforms an integer on a string? Like: "78" onto "seventy eight" How does it do it? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the l

Re: [PHP] Disabled INPUT-Tags?!

2003-02-15 Thread Leif K-Brooks
This is an HTML question, not a PHP question, but try adding a hidden field next to the disabled one. menphrad wrote: Hi! I created a form that handles dates, e.g. a DATE_START and a DATE_END. The "DATE_START" is filled out automagically by a PHP-function and the field should be *disabled*: $j

Re: [PHP] need apostrophe solution

2003-02-15 Thread Leif K-Brooks
Magic_quotes has already done (or not done) its job by the time your script runs. Doug Parker wrote: OK - thanks. I saw that the magic_quotes_gpc is turned off by default, so I did a ini_set(magic_quotes_gpc, 1) to turn it on temporarily. I ran a get_magic_quotes_gpc() and saw that the ini_s

Re: [PHP] PHP not running/parsin MySQL query

2003-02-15 Thread Leif K-Brooks
You need to do something with the result set. www.php.net/mysql-fetch-array Guru Geek wrote: Hello, I've been having extensive email conversations with people over at MySQL.com's email list. From what I'm able to prove using myphpadmin, my problem is not with the query, but with how PHP handle

Re: [PHP] need apostrophe solution

2003-02-15 Thread Leif K-Brooks
Correct, or you can use a .htaccess file if you're on apache. Doug Parker wrote: So you're saying that I have to turn on magic_quotes_gpc in php.ini in order for it to work? the ini_set won't work? Leif K-Brooks wrote: Magic_quotes has already done (or not done) its job b

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Leif K-Brooks
I believe I've spotted your problem: for ($i=0; i <$count;$i++) { You left the $ out. It's looking for a constant named i, which doesn't exist. Janyne Kizer wrote: I'm not sure. It sits and spins. If I go to view -> source that doesn't yield any additional information. We are trying

Re: [PHP] MD5 Passwords (How it works?)

2003-02-17 Thread Leif K-Brooks
No, it's not reversable. When a user loses their password, you must generate a new one. To stop malicious users from requesting a new password for a user they dislike with a program (and stopping the user from logging in, since their password keeps changing), a link with a random code is sent

Re: [PHP] simple ereg question

2003-02-20 Thread Leif K-Brooks
Change to:No, the double quotes are needed so that $i will be parsed. The problem is the single quotes around $_POST["gamt_$i"]. if (ereg('[0-9]+',$_POST["gamt_$i"]) Greg Donald wrote: On Thu, 20 Feb 2003, Robert E. Harvey, M.D. wrote: I'd like to verify input data transferred from a form

Re: [PHP] end of the loop.

2003-02-20 Thread Leif K-Brooks
If the list is an array, try implode()ing it. Didier McGillis wrote: I have a question. I need to setup something so it goes through a dynamic list, the length of the list changes, gets the contents of the list and seperate each element with a ^ (carot), except for the last one. So it looks

Re: [PHP] string manipulation

2003-02-20 Thread Leif K-Brooks
Try this (untested): print preg_replace('|<[^<]*$|','$1',$text); Gregory Heinrichs wrote: little help please, looking for correct functions to use to search for the last occurrence of a character in a string and truncate everything in front of it including the searched for character.< --

Re: [PHP] Is it possible to "Include" a php source file ?

2003-02-23 Thread Leif K-Brooks
A quick manual search would have told you. www.php.net/include Rohin Gosling wrote: First up, I sent this same message a few hours ago, but I do not see it in the news group, and neither does it appear in my sent messages folder. Therefore I am presuming that it never made it to the news group.

Re: [PHP] Re: Variables not being received from form

2003-02-23 Thread Leif K-Brooks
Please, please, PLEASE don't correct code that isn't wrong with code that is! Read http://www.php.net/manual/en/language.types.array.php. To answer the original question, the $HTTP_POST_VARS variable is out of scope in your function. Either use $_POST superglobal array if you're using 4.1.0 o

Re: [PHP] and

2003-02-23 Thread Leif K-Brooks
This has nothing to do with PHP, but a button is used to submit a form. You'll have to create a form with its action set to the page to direct to. Sunfire wrote: hi.. i have a button on a web page that is supposted to go to another web page when either clicked with a mouse or when someone press

Re: [PHP] What is wrong with this?

2003-02-24 Thread Leif K-Brooks
www.php.net/htmlentities Michael Cook wrote: Chris Hayes <[EMAIL PROTECTED]> writes: Put some quotes around the tag value for just in case the $aviao has a space in it: $drop_down_list .= "$aviao"; what about if $aviao contains a double quote? what's the proper way to handle

Re: [PHP] and

2003-02-24 Thread Leif K-Brooks
Why not just use a form with nothing but a button? Sunfire wrote: i do have something about the fact that this web site is "user friendly" or not.. and so does the other person that i work with. we tried to tell him that a link would look just fine there and everybody could use it even with ve

Re: [PHP] line number

2003-02-25 Thread Leif K-Brooks
Use the __LINE__ "magic constant". Chandler, Jacob R wrote: What function can I use to find out the current line number? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Ma

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Leif K-Brooks
Should be: ${name$i} Jeff Pauls wrote: I get an error with this. PHP doesn't like "$name$i". for ($i = 1; $i <= 3; $i++) { $arr_name[$i] = $name$i; // I want $name1,$name2,$name3 etc } I've looked at Variable variables but I don't think that is what I need. What about if I wanted

[PHP] Re: [PHP-DB] SESSIONS

2003-02-26 Thread Leif K-Brooks
Not $_POST[SUBMIT]. It should be $_POST['SUBMIT']. mike karthauser wrote: on 26/2/03 12:58 pm, MaN at [EMAIL PROTECTED] wrote: And also use $_POST[SUBMIT] or set register_globals On Just use $_POST[SUBMIT] register_globals was turned off for security reasons. You are compromising the s

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Leif K-Brooks
and example where a short > tag is causing some trouble. I'd like to see that. That is, unless > it's not a PHP behavior problem, but a scripting or logic issue due to > poor development. > > -- > Jason k Larson > > > Leif K-Brooks wrote: > >

[PHP] Dynamic XUL?

2003-02-27 Thread Leif K-Brooks
I'm considering making a dynamic application for Mozilla/Netscape using PHP and XUL. Has anyone here done this? Anything I should be aware of? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] output buffering

2003-02-27 Thread Leif K-Brooks
You can't display an image like that in HTML. You need to make a second PHP script that displays just the image, and call it with a tag. Kevin Waterson wrote: >I am having some problems with ob_* > >My goals is basically this > >Stuff goes here > >More stuff here > >The code below works until th

Re: [PHP] Help with getting php going!

2003-02-27 Thread Leif K-Brooks
Please don't send MS Word content in your email.  It crashed Mozilla before I was able to reply. Karl James wrote: Hey guys I finally got my phpinfo file to show on apache server But when I try to do a hello world or browser check I g

Re: [PHP] Passing url?variables

2003-02-27 Thread Leif K-Brooks
http://www.php.net/manual/en/security.registerglobals.php Mike wrote: Hi, I'm running Apache 2.0 and PHP 4.2.2 on a RedHat 8.0 Machine. I'm unable to pass variables through a URL like index.php?test=something. Can anyone help here? I've looked through both my httpd.conf and php.ini files and did

Re: [PHP] testing for < 0

2003-02-28 Thread Leif K-Brooks
Try $timeb <> ''. Steve Buehler wrote: I have a form that has input for minutes. My problem is that I am trying to test to see if the field is blank or not and if they enter a "0" (zero), my test always show it as blank. I have tried !$timemb and !is_numeric($timemb). Thank You Steve -- Th

Re: [PHP] I can't find a file in the new php...

2003-02-28 Thread Leif K-Brooks
Exactly what did you download? Is it possible you downloaded a source distribution? Meteo wrote: This was not a problem with the previous version of php, but when I downloaded the new version, and when I tried to install is on my web server that I have on my computer, I can't seem to find the p

Re: [PHP] IS there a way.

2003-02-28 Thread Leif K-Brooks
Try using exec() or backticks. Philip J. Newman wrote: Is there a way to PING a URL and check if it returns a valid code like 200 ... ?? -- Philip J. Newman. Head Developer [EMAIL PROTECTED] +64 (9) 576 9491 +64 021-048-3999 -- Friends are like stars You can't allways see them, but they

Re: [PHP] PHP scripts and the GPL/other licenses

2003-03-01 Thread Leif K-Brooks
They're doing nothing wrong as long as they distribute the source under the GPL. Jeff Lewis wrote: I am wondering if anyone out there has some really good references in regards to scripts distributed as open source using the GPL. In the last three years that I have worked on open source projects

Re: [PHP] PHP scripts and the GPL/other licenses

2003-03-01 Thread Leif K-Brooks
Yes. Just look at Linux, and its many distributions. Most have changed more than 10 lines, but I don't believe the GPL says how much must be changed. Jeff Lewis wrote: So with the GPL, someone can change say...10 lines and rename the scripts and distribute it as their own? -- The above messag

Re: [PHP] php and html differences

2003-03-02 Thread Leif K-Brooks
If I was you, I would tell him he's insane. Sunfire wrote: hi.. i guess this is a php related question (well sort of) the person i work with decided that he was going to edit a few of my php scripts that make a web page out of variables and just different conditions that happen in the script..

Re: [PHP] Switch Statement || Case with multiple values?

2003-03-02 Thread Leif K-Brooks
switch($value){ case 'foo': case 'bar': //It's either foo or bar break; } CF High wrote: Hey all. In Cold Fusion I was able to do the following: Do Stuff Note the comma delimited set of values for the case. Is there a way to do this in php?( i.e. if any of

Re: [PHP] Re: functions and

2003-03-03 Thread Leif K-Brooks
PHP is server-side, the PHP script has already executed by the time the client sees your output. Try having the logout link call a page that calls the function. Martin Johansson wrote: Ok to make it simplier, this is what I wanna do! echo "Logout"; function logout() { . } ?> How do I

Re: [PHP] Code Validator

2003-03-03 Thread Leif K-Brooks
Exactly what do you mean by code validator? If you can run it and it doesn't return any errors... it's valid PHP! :) If you mean one that validates HTML produced by PHP, try saving the output of the PHP script and validating that. Beauford.2002 wrote: Hi, Is there a code validater for HTML/

Re: [PHP] query strings(still broken)

2003-03-03 Thread Leif K-Brooks
Are you trying to look at the query string itself? If so, spaces are invalid in URLs, so they are urlencoded. Try using $_GET/$HTTP_GET_VARS, or urldecode() it if you must. Sunfire wrote: tried everything except session vars and the query string is still broken... no matter what i do for some

Re: [PHP] query strings(still broken)

2003-03-03 Thread Leif K-Brooks
Do you mind giving (some of) your code? Sunfire wrote: still broke - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 7:18 PM Subject: Re: [PHP]

Re: [PHP] Populate var with function output string?

2003-03-03 Thread Leif K-Brooks
Try adding each output string to a variable, then returning it, like: function return_string(count) { $return = ''; for ($x = 0; $x < $count; $x++) { $return.= " Row $x"; } return $return; } If you can't do that for some reason, try using output buffering. www.php.net/ob-sta

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Leif K-Brooks
Use mysql_fetch_array instead of mysql_fetch_row. CF High wrote: Hey all. Basic question here: How can I refer to a query result set as $result['field_name'] rather than $result[0]? So, I'm looking for -- just can't seem to get the right syntax. -- clueless -- -- The above message is

Re: [PHP] Update MD5 Field

2003-03-03 Thread Leif K-Brooks
Run the following SQL query: update TABLE set code = md5(concat(name,email)) Dani Matielo wrote: Hello, everybody my problem is the following: I just imported a csv file to a MySQL database that contains name and email fields. It has about 9k lines on it and I need a new field that orinally didn'

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Leif K-Brooks
27;re on a roll. Any performance issues re: using fetch_row vs. fetch_array? Thanks again, --Noah - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "CF High" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 7:04 PM

Re: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Leif K-Brooks
What makes you think it HAS a numerical index? Matt Honeycutt wrote: Is there an easy way to get the numerical index of a text key for an array? I don't see anything in the manual, but before I waste time writing code to find this info, I thought I would double check here. ---Matt -- The abo

Re: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Leif K-Brooks
but I don't want to hardcode it like that. The people that are taking over this code might change something and screw everything up. ---Matt -Original Message----- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 12:35 AM To: Matt Honeycutt Cc: [EMAIL PROTECTE

Re: [PHP] Using PHP to Generate a CSS Style Sheet

2003-03-03 Thread Leif K-Brooks
It doesn't have to be a .css file, just as HTML generated from PHP doesn't have to have a .html extension. Phillip S. Baker wrote: Greetings all, I would like to use PHP to make calls from a DB and generate a CSS file. Anyone have any ideas on doing this? Will php commands executre from a .css

Re: [PHP] Browser Sniffing

2003-03-04 Thread Leif K-Brooks
Checking browsers is pure evil, but if you must, use $_SERVER['HTTP_USER_AGENT'] on the server side. Ashley M. Kirchner wrote: I know, it can't be done in PHP. That's not exactly what I'm here for. I have a client who would like to redirect people to a polite 'upgrade your browser' page w

Re: [PHP] Maintain " and ' in html textfields

2003-03-04 Thread Leif K-Brooks
www.php.net/htmlentities Daniel Guerrier wrote: If I have text containing quotes, single or double in my database, and I try to set the text as a value for my html text field. The quote in the text will prematurely close the value="" or value='' html and cut of the remainder of the text. How ca

Re: [PHP] remove a line from a text list

2003-03-05 Thread Leif K-Brooks
"Note: implode() can, for historical reasons, accept its parameters in either order. For consistency with explode(), however, it may be less confusing to use the documented order of arguments." Chris Wesley wrote: The above line: I'm assuming you want to collapse $recordsarray into a sting, wi

Re: [PHP] PHP vs. CGI

2003-03-05 Thread Leif K-Brooks
CGI meaning perl? SpyProductions Support Team wrote: Does PHP use less system resources than CGI on a server? I have a bulletin board which is incredibly active, but there is a PHP sister to it. Thanks, -Mike -- The above message is encrypted with double rot13 encoding. Any unauthorized

Re: [PHP] Newbie Problem with an IF Statement

2003-03-05 Thread Leif K-Brooks
What the heck? The string "[status]='active'" doesn't check anything. It is converted to boolean by the if statment, which will be true, as it's not an empty string. I'm guessing you want to use if($status=='active'){ Hunter, Jess wrote: I have a short bit of code that contains an if/else th

Re: [PHP] Log In

2003-03-05 Thread Leif K-Brooks
No. Van Andel, Robbert wrote: Is there a handy function in PHP that I can use to retrieve the users Windows Log in? We are creating an application that will allow users to add comments to a mysql database, and we would like to be able to track who is putting the comments into the table, preferab

Re: [PHP] print "$array[$i][0]" pukes

2003-03-05 Thread Leif K-Brooks
print "$i :: {$manilist[$i][0]}\n"; David T-G wrote: OK. That works, though it isn't pretty. Is there any way I can avoid doing the dot dance? I'd rather something like print "$i :: ${manilist[$i]}[0]\n" ; (which I know to not work! :-) than to have to open and close; that's just not very cl

Re: [PHP] php list via email

2003-03-06 Thread Leif K-Brooks
Yes. http://www.php.net/mailing-lists.php electroteque wrote: hi there , is there any way to possibly get the list via email ? i can only access it via the newsgroup viewer in outlook and my firewall guy at work persists not to let me have access and you guys are very important to have in the co

Re: [PHP] syntax question

2003-03-06 Thread Leif K-Brooks
It's fairly simple. The code you posted could also be written: if(strpos($a,'-')){ $a = explode('-',$a,2); }else{ $a = array($a); } It's called the ternary conditional operator. Unfortunatley, it's buried in the PHP manual. http://us2.php.net/manual/en/language.expressions.php Jimmy wrote: I'

[PHP] Memory errors?

2003-03-06 Thread Leif K-Brooks
Lately, I've been getting the following error: Fatal error: Allowed memory size of 15728640 bytes exhausted (tried to allocate 86460 bytes) in Unknown on line 0 The thing is, I'm not doing anything that could possibly require much memory. Is there some kind of bug, or am I missing something? --

Re: [PHP] Memory errors?

2003-03-06 Thread Leif K-Brooks
Yes, I'm sure. Nik Makepeace wrote: Are you sure you don't have an infinite loop anywhere? This sort of thing can happen if you have an array or a string being built by a loop that never quits. Nik -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decr

php-general@lists.php.net

2003-03-07 Thread Leif K-Brooks
Not sure where you can read more, but let me try to explain it. The bitwise operators operate on a binary representation of a number. 4 is 100 in binary, 5 is 101. 5 | 4 results in 5, because the | operator sets bits set in either number. 5 & 4 results in 4, because the & operator only sets

php-general@lists.php.net

2003-03-07 Thread Leif K-Brooks
uggling Thanks ultimatefootballleague.com/index.php [EMAIL PROTECTED] -Original Message----- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2003 2:20 AM To: James Taylor Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Difference between & && Not sure where you can read more, b

[PHP] Re: [PHP-DB] explode string variable

2003-03-08 Thread Leif K-Brooks
Try the limit parameter of the explode function, www.php.net/explode. André Sannerholt wrote: Hi everyone! Does anybody know how to "stop" an "explosion" of a string: Let me explain: $variable_aray=explode('-', $variable); I want the variable to be devided in only two other ones! If for exampl

Re: [PHP] variable string names

2003-03-08 Thread Leif K-Brooks
for ($i=1; $i<=8 i++) { if (${'where'.$i} != '') { $whereArray = array_push($whereArray, ${'where'.$i}); } } julian haffegee wrote: Hi all, I have something thats been driving me mad for days I have: if ($where1 != '') { $whereArray = array_push($whereArray, $where1);

Re: [PHP] stripslashes()

2003-03-08 Thread Leif K-Brooks
Try this (untestted): if(get_magic_quotes_gpc()){ foreach($_REQUEST as $vname => $value){ $$vname = stripslashes($vname); } } John Taylor-Johnston wrote: I need to stripslashes() practically every $value as I pass data from one submit to another. L\'apprentissage d\'une langue ... I

Re: [PHP] Control over your Session

2003-03-10 Thread Leif K-Brooks
If you have register_globals on, you'll need to session_unregister it. Gerard Samuel wrote: Got a problem thats baffling me. I have a form that includes a file that starts a session. Creating sessions are no problem, but deleting the session variable is not working as its supposed to. Sudo code

Re: [PHP] Encrypting/Compiling PHP Scripts

2003-03-11 Thread Leif K-Brooks
http://zend.com/store/products/zend-encoder.php http://www.ioncube.com/ Davis Tan wrote: Hi, Would like to know whether is there any possibilities to encrypt or compile the PHP scripts so that it is not human-readable? Thanks! -- The above message is encrypted with double rot13 encoding. A

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
You're checking with javascript, correct? If so, try checking server-side too. Pag wrote: Been having some hacker problems on my site, and a simple one: I have a shoutbox, a simple form with name and text that adds lines to the database. I do checks for insults, too long words, tags,

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
That's can still easily be spoofed. The only safe way is to validate the form server-side. [EMAIL PROTECTED] wrote: Yes, theoretically...you could require it to be posted data. In order to do this you would have to make sure "registered_globals" is set to "off" in your php.ini and then for e

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
if(stristr($text,'badword') or stristr($text,'badword2') or strlen($text) > maxlength){ die('Invalid!'); } [EMAIL PROTECTED] wrote: So how could you validate it server-side? -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Wed

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
That's just not possible. [EMAIL PROTECTED] wrote: Swear filtering is easy, I want to know how to make sure the data is coming from MY formI'm just picky like that. :-) -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 8:55 AM To: [EMAIL P

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
Correct. [EMAIL PROTECTED] wrote: So we aren't actually validating "where" the data is coming from, we are just validating the data? -Original Message----- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 8:57 AM To: [EMAIL PROTECTED] Cc: [

Re: [PHP] RE: Calculates time elapsed between two date

2003-03-12 Thread Leif K-Brooks
strtotime() them, then subtract. YC Nyon wrote: Hi, I need to get the time/date (ie. 1 day 12 hours 11 min 4sec) between 2 time dates. Can't seem to find any of these functions in the PHP manual. Thanks Nyon --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://ww

Re: [PHP] Cannot execute... Cron jobs

2003-03-12 Thread Leif K-Brooks
You can do that, but it's much less secure. Scott Holmes wrote: I'd just like to interject here that I execute php code from cron and I do not have php compiled as a cgi. I use lynx. Here is a sample of what I'm doing to e-mail a weekly newsletter to a membership database: #!/bin/sh LYNX_TEM

Re: [PHP] Cannot execute... Cron jobs

2003-03-12 Thread Leif K-Brooks
2003, at 09:20 PM, Leif K-Brooks wrote: You can do that, but it's much less secure. Scott Holmes wrote: I'd just like to interject here that I execute php code from cron and I do not have php compiled as a cgi. I use lynx. Here is a sample of what I'm doing to e-mail a we

Re: [PHP] include dosn't after Provider-Change

2003-03-13 Thread Leif K-Brooks
You can't execute PHP from an HTML page. My guess is that your old provider had PHP parsing enabled for .html files, shich most don't. Oliver Witt wrote: Hallo, after a Provider-Change my counter-script dosn't work again. My entry is: in an html-document. Is there an Error inside? My server

Re: [PHP] PHP/HTML table layout?

2003-03-13 Thread Leif K-Brooks
This has absolutley nothing to do with PHP. I believe that it will stay if you set the width with CSS, but no promises. Bev wrote: Is there any simple way to stop the Cells of a Table from Moving, say for a simple table I want the first column to be always fixed at 100 pixels(col A) and the sec

[PHP] Is there any reason...

2003-03-13 Thread Leif K-Brooks
That replies on this list go to the person who originally posted the message by default? It seems to me that the reply-to header should be set to the list, or is it not possible with the mailing list system this list uses? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Is there any reason...

2003-03-13 Thread Leif K-Brooks
The way I see it, part of the point in a mailing list is for people with the same question to only have to ask once. Replies not going to the list by default defeats this purpose. CPT John W. Holmes wrote: There is already enough traffic on the list. Just use Reply-All if you want to include t

Re: [PHP] Redirect to a new page?

2003-03-13 Thread Leif K-Brooks
if(something){ header("Location: {$_SERVER['HTTP_HOST']}/thispage.php"); }else{ header("Location: {$_SERVER['HTTP_HOST']}/thatpage.php"); } Beauford.2002 wrote: Hi, I have searched around for hours on this and nothing seems to work. I want simply to do this if yes - goto thispage.php if no

Re: [PHP] String Replace

2003-03-14 Thread Leif K-Brooks
www.php.net/str-replace Awlad Hussain wrote: I have a string with underscore in the middle.. like "This_That" which function do i use to replace the _ with space? eg to "This That" the string is in a variable.. I know its really simple but just don't know which function to use. any suggestion?

Re: [PHP] accidently inserting into web database blank records.

2003-03-14 Thread Leif K-Brooks
The string is in double quotes, ont single quotes. The single quotes are simply characters in the double-quoted string. I believe the register_globals explanation is correct. Brent Baisley wrote: I'm pretty sure your problem is the single quotes around your variables. Single quotes and doubl

Re: [PHP] HTTP_REFERER reliability

2003-03-16 Thread Leif K-Brooks
Anyone can send any referer (sic) header to your script. It shouldn't be used for checking if someone is trying to hack the script, but it should be find in your case. rotsky wrote: I've experimented using $_SERVER['HTTP_REFERER'] which seems to work here. If the user enters valid login detail

Re: [PHP] using strcmp()

2003-03-16 Thread Leif K-Brooks
You're missing the ; on this line: $result=strcmp($firstword, $secondword) Anthony Ritter wrote: The following test script for the function strcmp() is from page 114 -115 of PHP (Hungry Minds). I'm getting a parse error on line 6. Using PHP 4.1.1 / MS Win 98 / Apache Server. Many thanks... T

Re: [PHP] strip white space

2003-07-02 Thread Leif K-Brooks
Steve Buehler wrote: Another question is this. The "&" in wsstrip(&$str). Does that mean that it takes the input to the function as Global and changes it Globally? I am assuming that because that is what the whole function seems to do for me. No, it means that it passes a reference to the va

Re: [PHP] print html code

2003-07-02 Thread Leif K-Brooks
Karina S wrote: Hello, I want to make a php site which can generate a html code and display it on the screen. (Display the code itself.) I use htmlspecialchars() function. It works fine, but now I have to add about 200 lines of static html code to print it out. If I put all of the code in a strin

Re: [PHP] print html code

2003-07-02 Thread Leif K-Brooks
Jim Lucas wrote: You could always use at the top of the screen. And violate every single HTML standard. AFAIK, was never a real tag. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- P

Re: [PHP] print html code

2003-07-02 Thread Leif K-Brooks
In browsers that refuse to follow standards, maybe. Breaking standards is a bad thing. Jim Lucas wrote: So what, it would do what was requested. :) -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of th

Re: [PHP] print html code

2003-07-02 Thread Leif K-Brooks
Jim Lucas wrote: well, tell me. What browser follows the standards 100% ?? Most likely none. That doesn't mean you should violate the standards for absolutley no reason, though! Future browsers will most likely drop . -- The above message is encrypted with double rot13 encoding. Any unau

Re: [PHP] Calculating if number is multiple of another number

2003-07-02 Thread Leif K-Brooks
jwulff wrote: How would I calculate if a $number is a multiple of $spacer? if(int($number / $spacer) == ($number / $spacer)){ echo "It's a multiple!"; }else{ echo "Nope!"; } -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosec

Re: [PHP] string modification

2003-07-03 Thread Leif K-Brooks
hi, i didn't find a function for this in the manual, but maybe there is one (or a workaround): does anyone have a solution for replacing multiple whitespaces with a single whitespace whitin a string? similar to trim(). maybe a regular expression? eg: $string = 'word1 word2 word3'; $modified

[PHP] Extension to MIME type?

2003-07-03 Thread Leif K-Brooks
Is there any way to get Apache's list of extension -> MIME type associations into an array? I want to readfile() a file which only some users can view for security, but the file types vary from file to file so I need to know the MIME type. -- The above message is encrypted with double rot13 en

Re: [PHP] cookie question

2003-07-03 Thread Leif K-Brooks
David R wrote: Hello, I have a cookie question. I have the following code is a file called tc.php I have no problem retrieving the value cookie value ( 123 ) on my local machine but when I post to the internet I can't get the cookie value. Any ideas why? Did you set the cookie for the productio

Re: [PHP] cookie question

2003-07-04 Thread Leif K-Brooks
David R wrote: I have never read anything about a production server domain. How do I set the cookie for it? Same way as for the cookie on your local server, but change the cookie's domain. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will

Re: [PHP] Forms and PHP_SELF

2003-07-05 Thread Leif K-Brooks
Dan Anderson wrote: Be careful when using PHP self. Not all servers support it. If you're planning on using this script over and over on multiple servers you may find creating a variable is helpful. $some_variable = "the_script_name.php"; Then, where you would use PHP_SELF just echo (o

Re: [PHP] Forms and PHP_SELF

2003-07-05 Thread Leif K-Brooks
Dan Anderson wrote: I assure you that server administrators can turn off the variables such as PHP SELF. It may not be common but it does happen. The only way to do that would be editing the PHP source. That's above the IQ of any sysadmin who would want to do that. -- The above message is encr

Re: [PHP] How configure PHP parser 4.3.x in IIS version 6.0?

2003-07-09 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote: I use the dll "php4isapi.dll" and it doesn't work, Could someone give me a hand? Most of us don't have crystal balls. What does it do when it doesn't work? How is it set up? Give us some information! -- The above message is encrypted with double rot13 encoding. Any

Re: [PHP] Unknown Syntax

2003-07-11 Thread Leif K-Brooks
Chris Morrow wrote: Does anybody recognize this: !== with 2 '=' Ive known != to mean not equal to but i'm just looking at someone elses script and they use this instead. Does anyone know if this works or any problems with it? Not identical. Negative ===. http://us2.php.net/manual/en/language.o

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread Leif K-Brooks
CPT John W. Holmes wrote: You can get the username, that's it. $_SESSION['LOGON_USER'] Don't you mean $_SERVER['LOGON_USER']? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General

Re: [PHP] Question

2003-07-11 Thread Leif K-Brooks
Alvaro Rosales R. wrote: Hi guys,I am new to PHP and I am writing my forst scripts, so maybe this quesetion is a kinda stupid, but it is driving me crazy, can you tell meHow can I set a line break in long line of my code?. More of a text editor question than a PHP question. In most text edit

Re: [PHP] Question

2003-07-11 Thread Leif K-Brooks
Alvaro Rosales R. wrote: Thank you but ,(I come from microsoft vb world, and line breaks of code could be divided with a character(&_), so the compiler could parse it and where it finded that character it knew that it was a line break), is there something similar in php? No. Just put a line b

Re: [PHP] How to use ph to set meta tags ?

2003-07-15 Thread Leif K-Brooks
I wish to create be able to put in the meta tags value from functions. How can be done ? Here is part of the code : ?> > -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. --

Re: [PHP] checkbox: was it shown or not?

2003-07-17 Thread Leif K-Brooks
Chris Hayes (SENSE) wrote: if i understand well, a checkbox in a form is only send on to the next page when it is checked: so the next page will only see a value in $_POST['checkboxname'] if it is set: else it is not set. Right? So the followup page cannot see the difference between a form wher

Re: [PHP] Too much of $GLOBALS[] a problem??

2003-07-17 Thread Leif K-Brooks
Ow Mun Heng wrote: This isn't really a Problem but.. is it bad programming practice?? Or I should just write another function that can return the values/string? I don't see why it would be, unless you don't like how it looks. -- The above message is encrypted with double rot13 encoding. Any unau

Re: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread Leif K-Brooks
Daryl Meese wrote: One important difference between most windows and linux setups is is case sensitivity. Windows sees $x and $X as the same variable but Linux does not. so it could be a case issue. The two OSes do that with /files/, but PHP doesn't rely on the OS to check variable names. PHP

<    1   2   3   4   5   6   >