Re: [PHP] For ... <= max($myArray) vs For ... <= $max

2002-11-08 Thread Marek Kilimajer
As max($myArray) may potentionaly change, it is evalueted everytime (you may do $myArray[]=$big_number in your loop). So if you know it is not going to change, use the first way. Daevid Vincent wrote: Is PHP smart enough to optimize loops? That is, are these two 'for...loops' equivalent or is

[PHP] string to array

2002-11-08 Thread Marek Kilimajer
Hi all, has anyone an elegant (and faster) way of converting 'string' to array('s','t','r','i','n','g'), other then for($i=0; $i -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] string to array

2002-11-08 Thread Marek Kilimajer
This is working great, thank you. Timothy's expression output one empty element at the start and the end, but otherwise worked ( and I don't know why :-( Erwin wrote: $string = explode( '', 'string' ); Timothy Hitchens wrote: That won't work.. empty delimiter errors always.. You

Re: [PHP] Unable to execute c++ .exe file from php

2002-11-08 Thread Marek Kilimajer
escape your backslashes: $cmd = "c:\\abc\\hello.exe"; Ladan Pickering wrote: I am unable to execute my c++ program from within PHP when it runs as a cgi in Apache. I am able to run: $cmd="dir c:\abc" system ($cmd, $errCode); and see the content of the directory, but I don't seem to be able

Re: [PHP] For ... <= max($myArray) vs For ... <= $max

2002-11-08 Thread Marek Kilimajer
If you reed the code carefully, it first assigns $x=1 and $max=count($myArray), then it compares $x with $max .: B i g D o g :. wrote: Then only problem with doing it like for($x = 1, $max = count($myArray); $x <= $max; $x++ ) is that the $max = count( $myArray ) is always verified in each lo

Re: [PHP] RegExp for Forum-List-Code

2002-11-09 Thread Marek Kilimajer
untested: preq_replace('/\[\*\]([^(\[\*\])(<\/ul>)]*)/i','$1',$text); Jens Lehmann wrote: Hi out there, I encountered a lot of problems while trying to convert a list in Forum-Code (like UBB-Code). [list] [*] item 1 [*] item 2 [*] item 3 [/list] should be converted to item 1 item 2 item

Re: [PHP] preg_split problem

2002-11-09 Thread Marek Kilimajer
list throws away the other two array elements, you need list($one,$two,$three,$rest) = preg_split("/\s+/", $text, 4); samug wrote: Could someone tell me why isn't this working? $text = "And what did I tell you?"; list($one,$two,$three,$rest) = preg_split("/\s+/", $text); print($rest); The re

Re: [PHP] Re: preg_split problem

2002-11-09 Thread Marek Kilimajer
if you use list($one,$two,$three,$rest) = preg_split("/\s+/", $text, *4*); you get the remaining elements in $rest as a single string samug wrote: Thanks. But what if you don't know how many elements there will be ahead? "Samug" <[EMAIL PROTECTED]> kirjoitti viestissä [EMAIL PROTECTED]">news:[E

Re: [PHP] Genrate a graph

2002-11-12 Thread Marek Kilimajer
No, there is not, but there are classes for that, look for jgraph Chris Grigor wrote: Howdi All Anyone know if there is a function in php that can take values and generate a graph ??? Thanks in advance C -- Chris Grigor --

Re: [PHP] Genrate a graph

2002-11-12 Thread Marek Kilimajer
Yes, you are right, I was too lazy to look it up :-) Jason Wong wrote: On Tuesday 12 November 2002 19:04, Marek Kilimajer wrote: No, there is not, but there are classes for that, look for jgraph I believe you mean "jpgraph" ! -- PHP General Mailing List (http://www.ph

Re: [PHP] what wrong in this code ?

2002-11-13 Thread Marek Kilimajer
Alawi albaity wrote: why the varible value(123) is not printed? you need "global $test;" here session_start(); session_register('test'); $test = 123; } function Logout(){ session_destroy(); } if (is_login()){ and not here Global $test; session_start(); echo $test; logout(); }else{ ma

Re: [PHP] locale

2002-11-13 Thread Marek Kilimajer
localedef should tell you Bc. Radek Krejča wrote: Hi, I have problem with locale on PHP, how a may instal it, I use OpenBSD. Thanks Radek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Auth with Apache

2002-11-13 Thread Marek Kilimajer
Did you use $_SERVER['PHP_AUTH_USER'] or just $PHP_AUTH_USER Alexander Bemme wrote: Hi, i got a little problem (i hope so) I have installed Apache 1.3.26 and PHP 4.2.3 as module. I used the example from www.php.net to do a PHP authentication, but it didn't work, the pop appears but i can't lo

Re: [PHP] form with two actions

2002-11-13 Thread Marek Kilimajer
in php, do $perl=fopen('http://localhost/your_perl_script.pl?data='.$your_data,'r'); fclose($perl); optionaly, you can read from the file handler to get some feedback from the perl script Scott wrote: I just realized I should have been more specific with my question. What I want to do is use p

Re: [PHP] Help needed with attachments

2002-11-13 Thread Marek Kilimajer
Simple answer: No Pushpinder Sngh Garcha wrote: Hi I am using MIME to send mail (http://www.phpclasses.org/mimemessage) I need to be able to send attachments that are present on the local machine. Is there a way to send attachements without uploading then to the server ?? Thanks -pS --

Re: [PHP] multiple forms on the same page

2002-11-13 Thread Marek Kilimajer
No, simply name them differently ( hi, I have multiple forms on a page that refers to itself on the action. The only difference is that one has one extra field. The two have every other name in common. Will this be difficult to handle? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] PHP Installation on Redhat 8 - General Questions

2002-11-13 Thread Marek Kilimajer
I don't think you needed to recompile apache, but only php. Did you actually do make && make install in PHP directory? Lee P. Reilly wrote: Hi there, I wonder if someone could answer a few questions for me? First of all, excuse my ignorance as I'm somewhat of a Linux newbie. I have installed PH

Re: [PHP] Configuration question

2002-11-13 Thread Marek Kilimajer
You have register_globals off, use $_GET['PHOTO'] in your script Hugo Gallo wrote: I just installed PHPDEV423 to my WIN2000 box. The PHP is functioning (includes are working fine), but I can not read variables from a URL. Ex. link Once the link is clicked. The secondPage.php is not reading the P

Re: [PHP] File Upload: Help Needed

2002-11-13 Thread Marek Kilimajer
The directory must exists prior to copy, and must be writeable by the server process. Also note this is a filesystem path. Pushpinder Sngh Garcha wrote: Hi I am trying to upload a file using php. This is the code that I am using for the php script called "upload.php" if(!empty($userfile)) {

Re: [PHP] Register_globals = off version of Manuel Lemos's form class?

2002-11-13 Thread Marek Kilimajer
Even if the method is post, you can have get variables, if the form has action="script.php?get_var=value" Jason Wong wrote: On Wednesday 13 November 2002 23:57, Leif K-Brooks wrote: I am planning to use Manuel Lemos's form class for a web site I am working on. However, I need to have registe

Re: [PHP] javascript and php again

2002-11-13 Thread Marek Kilimajer
php doesn't understand javascript, php executes on the server and javascript on the client side. Edward Peloke wrote: I have some javascript that by itself, runs fine in a php file but, when I enclose it in php... if (!variable) { ?> ---insert java here } ?> Then is does not work...is ther

Re: [PHP] small php engine

2002-11-14 Thread Marek Kilimajer
I found this: http://hints.se.linuxfromscratch.org/hints/apache+php4+sql.hint.txt Not sure how small it gets Maximilian Eberl wrote: Hi list, has anyone ever experimented to "melt down" the php engine to a few hundred KBs ? By leaving out not needed libraries/functions ? What i am searching fo

Re: [PHP] How to cache PHP on Apache

2002-11-14 Thread Marek Kilimajer
Do you use sessions? If so, try using session_cache_limiter() function. Otherwise connect directly to apache with telnet and see the headers yourself. Luanna Silva wrote: Hello! I´m having major problems while trying to cache php scripts on Apache. Could you help me, please? I really dont k

Re: [PHP] multiple file upload

2002-11-14 Thread Marek Kilimajer
Don't get mistaken. Sure it is possible: this will give you $_FILES['file']['name'][0],$_FILES['file']['name'][1],$_FILES['file']['name'][2], the same for [type],[tmp_name] and [size] Funk-XL wrote: Hi All, Is it posible to do multiple file upload without selecting each file manual in mul

Re: [PHP] multiple file upload

2002-11-14 Thread Marek Kilimajer
Sorry, now I read your question thoroughly, no this is not possible Funk-XL wrote: Hi All, Is it posible to do multiple file upload without selecting each file manual in multiple form fields? Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

Re: [PHP] query question

2002-11-14 Thread Marek Kilimajer
Untested, but should work Steve Buehler wrote: function getstart_end(){ $result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min"); while(($row=mysql_fetch_object($result))){ if(!$i){ echo $row->min . " - "; $i=$row->min; }else{ $t

Re: [PHP] query question

2002-11-14 Thread Marek Kilimajer
One mistake Marek Kilimajer wrote: Untested, but should work Steve Buehler wrote: function getstart_end(){ $result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min"); while(($row=mysql_fetch_object($result))){ if(!$i){ echo

Re: [PHP] query question

2002-11-14 Thread Marek Kilimajer
This is checked: function getstart_end(){ $result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min"); while(($row=mysql_fetch_object($result))){ if(!$i){ echo $row->min . " - "; $i=$row->min; } else {

Re: [PHP] something like array_walk?

2002-11-15 Thread Marek Kilimajer
What about foreach($color as $c) { $color_soundex[]=soundex($c); } A. J. McLean wrote: I want to take an array and get the soundex() for each element in that array and return the results into another array. Is there an clean way to do this? $color = array("blue", "green", "orange", "purple

Re: [PHP] It only prints lines that beggin with a number? I'm ona deadline!

2002-11-15 Thread Marek Kilimajer
Godzilla wrote: Hi everyone, I have a pretty strange problem that may be simple, but I have never heard of it. //I have a database in the following format: 2 2 2 Cd's Cd's DVD's DVD's DVD's DVD's DVD's // Someone recently helped me out in writing a short script that woul

Re: [PHP] does PHP4.0 supports https:// post?

2002-11-15 Thread Marek Kilimajer
PHP doesn't really care if it is https or http, this is being taken care by the webserver. If it is not working for you, you might have some browser issue. Peter wrote: Hi, What's the latest version of PHP that can handle HTTPS:// post? Thanks, -Peter -- PHP General Mailing List (http

Re: [PHP] Redirect Problem

2002-11-15 Thread Marek Kilimajer
the header, to be http compliant, should be Location: http://$HTTP_HOST$PHP_SELF?submit_cat=1&submit_subcat=1&cat_id=$cat_id also try echoing it instead to see if there is no error. Another thing is that exploder has a stupid habit of thinking of anything starting with & to be a html entity even

Re: [PHP] parse comma delimited file

2002-11-15 Thread Marek Kilimajer
yes, there is this fgetcsv function Greg wrote: Hi-\ Is there an easy way in PHP to parse a comma delimited text file that could be uploaded in a form? Thanks! -Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding last entry in MySQL database

2002-11-15 Thread Marek Kilimajer
better would be to keep it in a session variable, so people don't spoof it. M.A.Bond wrote: Tim, This is a dangerous way of doing things, if you get a couple of people registering at the same time the system has the possibility of getting the wrong entry, you best bet is to have the upload scri

Re: [PHP] PHP Database

2002-11-15 Thread Marek Kilimajer
You need to understand the relations between the entities in order to design the database, there are 3 types: 1 to 1: - one team has one couch, no team has more couches and no couch has more teams. - usually in one table (team_name, couch_name), but might be also in two interconnected w

Re: [PHP] small php engine

2002-11-15 Thread Marek Kilimajer
So take php sources and remove php functions you won't use ;-) Maximilian Eberl wrote: no, it's the normal LAMP stuff. I already have the webserver, just need to get the PHP engine melted down. Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

Re: [PHP] Validating postal codes

2002-11-15 Thread Marek Kilimajer
Either you may remove spaces: $form["authpstcode"]=str_replace(' ','',$form["authpstcode"]) and then compare or change your expresion to '(^\s*[a-z]\s*[0-9]\s*[a-z]\s*[0-9]\s*[a-z]\s*[0-9]\s*$)' The first is better as you may put it into database column that is just char(6) DonPro wrote: Hi,

Re: [PHP] #color problems

2002-11-15 Thread Marek Kilimajer
Do you mean it doesn't output the right html (which it should if you pasted it right, look at the html source) or the browser doesn't display it (bgcolor in is **deprecated, what doctype are you using?) Adam wrote: Below is a snip of my script. Can't get it to use $test as a color variable!! C

Re: Fw: [PHP] #color problems

2002-11-15 Thread Marek Kilimajer
I you did put echo $test; right before echo ''; COPY&PASTE your code (don't write it from memory!) and show us Adam wrote: OK, color code is not present in HTML output. Very strange! "echo $test;" produces hte correct output though. Adam. - Original Message - From: "Marco Tabini" <[EMA

Re: [PHP] can I retrieve jsp varibable with get or post???

2002-11-15 Thread Marek Kilimajer
php => javascript 1st way: var var_name= 2nd way: javascript => php 1st way: location='http://server/script.php?var_name="; + js_var_name; 2nd way: form_name.input_name.value = js_var_name; hope you get the point :-) Jeff Bluemel wrote: Can I utilize java script variables

Re: [PHP] Query string???

2002-11-18 Thread Marek Kilimajer
instead of if(empty($item)) { ... I would recomend if(is_numeric($item)) { ... Justin French wrote: So, the link might look like: item 1 Then page.php might look like this: include("{$item}.php"); ?> BUT this would be smarter: // uncomment this next line if you have register_globals OFF /

Re: [PHP] php, forms, mysql

2002-11-18 Thread Marek Kilimajer
You don't need to use forms (which you got wrong), but simple links with target="lowerframe" and href="lowerframe.php?tableID=$tableID", then you get in your lowerframe.php $_GET['tableID'] Adrian Partenie wrote: Hello, I could use some help. I have two framed pages, upperframe.html and lowe

Re: [PHP] Help with variables in email

2002-11-18 Thread Marek Kilimajer
You are using single quotes, either do $message = ' '. $some_var . ' .'; or $message = " . $some_var ."; // using double quotes Clint Tredway wrote: I am trying to send an email with form vars inside it but I cannot seem to get the vars to be parsed. Here is my code: /* messag

Re: [PHP] Cannot Print Web-based Report in Netscape

2002-11-18 Thread Marek Kilimajer
You may try sending some expire headers, but probably won't help you Hakkan Lui wrote: Dear all, I used PHP to generate a report on a browser, using forms. When I print the report using Netscape->Print, a page with the following page appeared instead of the report.

Re: [PHP] howto pass javascript variable to php

2002-11-18 Thread Marek Kilimajer
You can still use onclick event to pass value kept in a javascript variable: function action(url) { location.href='http://www.domain.net/' + url + '&var=' + javascript_var; return false; } Jeff Bluemel wrote: it's easy enough to pass php variable to javascript, but doing this the other

Re: [PHP] Problem with Class - incomplete object error

2002-11-18 Thread Marek Kilimajer
As noted in the error, you must declare the class definition _before_ session_start(): require_once('includes/cart.php'); session_start(); methods are not stored within session Paul wrote: Hi All: I have a simple page that checks for existence of object in a session. If the object is not stor

Re: [PHP] Query to select every other record

2002-11-18 Thread Marek Kilimajer
You need this: while($row=mysql_fetch_array($res)) { echo first column; if($row=mysql_fetch_array($res)) { echo second column; } } Darren McPhee wrote: Does anybody know of a SELECT QUERY that will select every other record of a table ? I want to do this so that I can display m

Re: [PHP] What is wrong with this expression?

2002-11-18 Thread Marek Kilimajer
Nothing I can see. What is not working? JohnMeyer wrote: if (is_uploaded_file($_FILES["imagefile"]["tmp_name"]) && ($_FILES["imagefile"]["type"] != "image/jpeg" && $_FILES["imagefile"]["type"] != "image/gif" && $_FILES["imagefile"]["type"] != "image/jpg" && $_FILES["imagefile"]["type"] != "i

Re: [PHP] post files array and registered globals off

2002-11-18 Thread Marek Kilimajer
you need to do it another way, e.g.: for($i=0; $i < MAX_FILES; $i++) { if(!$_FILES['photo']['tmp_name']) break; ... now work with the file. } electroteque wrote: hi i need to do a foreach on post files array ie _REQUEST['photo'] or _POST['photo'] doesnt work only _FILES['photo'] wor

Re: [PHP] Problems with Caching

2002-11-18 Thread Marek Kilimajer
check the value of output_handler or try calling flush() before the code. Did you not change anything in apache? Adam Humphrey wrote: When I upgraded to 4.2.3 from 4.2.2 I no longer am able to see HTML before PHP code that takes a while to process. I made sure that I've set "output_buffering =o

Re: [PHP] How to use string as variable name?

2002-11-18 Thread Marek Kilimajer
Convert $day="2002-11-22" to just $day="d20021122" and $$day will be really $d20021122 -<[ Rene Brehmer ]>- wrote: Hi gang I'm suffering under the lack of an SQL, which would've made this loads easier, so instead I'm forced at using a bunch of arrays to keep track of the info instead... But h

Re: [PHP] speed comparison

2002-11-19 Thread Marek Kilimajer
I like to see html highlighting, so I prefer first method, but for some small snippets I also use echo Ernest E Vogelsinger wrote: As Maxim pointed out a couple of days ago, this is just a matter of nanosecs, it shouldn't be really noticeable from performance. The fastest was to display non-PHP

Re: [PHP] Loooooooooonnnnnnnnnnggggggggg

2002-11-19 Thread Marek Kilimajer
die() but seriosly, if you don't tell us what the script does, we can't tell you if it can be made faster Hacook wrote: Hi all, I made a script that works on a very long charachter chain and its process is lnggg about 5 minutes ! Do you have any tips to make it faster ? Thanks, Hacook

Re: [PHP] post files array and registered globals off

2002-11-19 Thread Marek Kilimajer
Sorry, now I noticed I forgot to add [$i]: if(!$_FILES['photo']['tmp_name'][$i]) break; Marek Kilimajer wrote: you need to do it another way, e.g.: for($i=0; $i < MAX_FILES; $i++) { if(!$_FILES['photo']['tmp_name']) break; ... now work with th

Re: Fw: [PHP] Loooooooooonnnnnnnnnnggggggggg

2002-11-19 Thread Marek Kilimajer
Your function seems to return string before first occurence of '*'. This should be faster: function conte($string) { return substr($string,0,strrpos($string,'*')); } Tristan Carron wrote: - Original Message - From: "Justin French" <[EMAIL PROTECTED]> To: "Tristan Carron" <[EMAIL PROT

Re: [PHP] Problem whith query in query

2002-11-20 Thread Marek Kilimajer
you can use temporary tables: CREATE TEMPORARY TABLE tmp_name SELECT SELECT MAX(ii.identifiseringid) AS max_ii FROM identifisering as ii GROUP BY dprosjekt then: SELECT * FROM identifisering as i, tmp WHERE i.identifiseringid='123' AND i=identifiseringid=tmp.max_id; Lars Espelid wrote: Hello

Re: Fw: [PHP] Loooooooooonnnnnnnnnnggggggggg

2002-11-20 Thread Marek Kilimajer
Yes, I got it wrong, use strpos instead of strrpos Tristan Carron wrote: yes it does returns the string before the first * Your script returns string before the last * How to inverse that ? - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> Newsgroups

Re: [PHP] flush() issue

2002-11-20 Thread Marek Kilimajer
I don't see an y newlines, try adding some. Is it working with other browsers? Jock Pereira wrote: Having an issue getting flush to work. Browser version is IE 6 sp1. I am not using mod_gzip on Apache. In the following code sample you can see that I am looping through a mysql result array and u

Re: [PHP] Pause for user input?

2002-11-20 Thread Marek Kilimajer
Cannot be done this way, you need to use 2 pages Larry Brown wrote: Does anyone know of a method to pause during the processing of a script to prompt a user for information and then incorporate the user's response for the remainder of the script? Larry S. Brown Dimension Networks, Inc. (727) 72

Re: [PHP] Listing a table /Limit

2002-11-20 Thread Marek Kilimajer
I don't think this can be done without ordering the selection first. Then you can do it: 1. you need to find out the value your middle row has in the order column, 2. count rows with smaller value in the order column than your middle row, this is its offset 3. now you can (using the offset) selec

Re: [PHP] scrolling data from db

2002-11-20 Thread Marek Kilimajer
There is position css2 property, you might be able to use it Edward Peloke wrote: I have a large amount of data to present to the user. Currently, I am just putting it in a table and displaying it on the page, if it is more than a page of course the page just scrolls. Is there a way o, without

Re: [PHP] Still having ereg migranes

2002-11-20 Thread Marek Kilimajer
first way: if(ereg('([^0-9]|^)'.$your_number.'([^0-9]|$)',$_REQUEST['numbers']) ) second way: $numbers=explode(',',$_REQUEST['numbers']); if(in_array($your_number,$numbers)) Mako Shark wrote: Sorry to repost this, but I haven't found a solution and it's still nagging me. Maybe some of you can co

Re: [PHP] Still having ereg migranes

2002-11-21 Thread Marek Kilimajer
I think you should really ask at a unix list Mako Shark wrote: Heheh. Maybe I wasn't clear, or maybe I'm missing something. Well, one way without regex would be to explode() numbers on a comma and use in_array() to see if you're value exists. That should look for your number, preceded by eit

Re: [PHP] Listing a table /Limit

2002-11-21 Thread Marek Kilimajer
Simply do it like with math fields: SELECT count(*) WHERE order_column < '$mid_row_value' Marco Bleeker wrote: At 15:38 20-11-02 +0100, you wrote: I don't think this can be done without ordering the selection first. Then you can do it: 1. you need to find out the value your middle row has in

Re: [PHP] Preg_replace question

2002-11-21 Thread Marek Kilimajer
Try xml parsing functions, start with an empty string and build it up in your handlers. In start element handler check if the tag is allowed, if yes, append it to the string together with allowed attributes, and add it to a count (so users won't be able to mess up your design), else append it u

Re: [PHP] mysql_num_rows

2002-11-21 Thread Marek Kilimajer
add echo mysql_error(); after line 39, it should tell you why the query failed in the future. Now I can tell you you have a typo: "slecet" => "select" empty wrote: Hi guys; I have a problem (or mistake(s)); for this code 39| $result=mysql_query("slecet * from site_members where User_Name='

Re: [PHP] Automatic file upload...

2002-11-21 Thread Marek Kilimajer
No, there is no way. This is a security restriction - if it would be possible, any web page could steal files from you. Tom Woody wrote: I am trying to put together a script so that I can upload files to a php script, with just a URL and can't seem to get my brain around it. For example, The br

Re: [PHP] Newbie: PHP/MySQL (SELECT)

2002-11-22 Thread Marek Kilimajer
if one of $titulotxt or $cdstxt is not set, your query will look something like this: SELECT * FROM divx WHERE && cds like '$cdstxt' ORDER BY titulo As you see, there is unnecessery &&. I build my search queries using this form: $query_cond=''; foreach($_GET as $col => $val) { switch($col)

Re: [PHP] Order of arrays

2002-11-22 Thread Marek Kilimajer
Use usort Mako Shark wrote: I don't think a simple sort() will do this. Is there a way I can sort these following array values so that all will be in numerical order, and then alphabetical after that? I need Dirfiles/97 Dirfiles/98 Dirfiles/99 Dirfiles/100 Dirfiles/101 Dirfiles/102 Dirfiles/ABG

Re: [PHP] phpUpLoad

2002-11-22 Thread Marek Kilimajer
in your shell or ftp type chmod 777 files Vicky wrote: I tried making the dir. 777 too, but it didn't work. How do I change the ownership of the dir? -Vicky - Original Message - From: "Adam Williams" <[EMAIL PROTECTED]> To: "Vicky" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Frid

Re: [PHP] mail() problem...

2002-11-22 Thread Marek Kilimajer
This header is added by mail server, so you must change the apache user. Duncan wrote: Hi, i wrote a helpdesk script, which can send the user emails, if requested. The helpdesk sends emails as "[EMAIL PROTECTED]", but some servers don't accept "nobody" as the sender! do you know how i can cha

Re: [PHP] Session Problem

2002-11-22 Thread Marek Kilimajer
Seems like the remote server has register_globals off. You must use $_GET, $_POST, $_SESSION ... Cesar Aracena wrote: Hi all, I'm having this strange issue with a remote server. I'm trying to create a session control for administrative use which works fine in my PC but once I upload these scri

Re: [PHP] MySQL - Creating The Database

2002-06-04 Thread Marek Kilimajer
You cannot create a database from within PHP, you need to connect to mysql server ( my guess is the same applies to MS Access), and with root priviledges call something like mysql_query("CREATE TABLE nuke_stories ( sid int(11) NOT NULL auto_increment, catid int(11) NOT NULL default '0',

Re: [PHP] help me please! :)

2002-06-10 Thread Marek Kilimajer
Try: for ($i=1; $i<=$n;i++){ ... $tmp="liv_$i"; echo "{$$tmp}"; ... } Veronica Ghezzi wrote: >Hi, > i must get the information saved in a several select list named > liv_1 > liv_2 >

Re: [PHP] Quick question

2002-06-14 Thread Marek Kilimajer
Quick answer: the same for radio boxes. Dan McCullough wrote: >I have a form, and if someone doesnt fill in a field it returns and asks them to >filling in the >missing field. I have made it so that the person doesnt lose everything, currently >they will lose >radio button information or c

Re: [PHP] session and temporary tables 2

2002-06-18 Thread Marek Kilimajer
Use mysql_pconnect($hostname, $username, $password); Wilbert Enserink wrote: >Jason, > >this is a piece of code i include in every file. >I thinbk this is the piece of code which kills my connection. >do you have any tips for me how to maintain the connectoin open? > > thx Wilbert >--

Re: [PHP] Another Pop-Up problem..

2002-06-27 Thread Marek Kilimajer
My guess is that there is no new window opened, because you call window.open with window name that allready exists, so instead of: function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } try: var threadWindow; function MM_openBrWindow(theURL,winNam

Re: [PHP] diffrance : require(); a file from localhost and from adomain.

2002-06-27 Thread Marek Kilimajer
If they are the same the difference will be in $HTTP_HOST and (if different) $SERVER_ADDR, but you want be able to find that out in a gif file. Rasmus Lerdorf wrote: >That is the technical difference. Both will make HTTP requests and issue a >GET request to fetch the image file. One opens a c

Re: [PHP] include_module()

2002-06-27 Thread Marek Kilimajer
Hi, instead of include_module() use int *dl* ( string library) Loads the PHP extension defined in /library/. Other questions: array *get_defined_functions* ( void) This function returns an multidimensional array containing a list of all defined functions, both built-in (internal) and user-d

Re: [PHP] Incrementing a table cell

2002-06-28 Thread Marek Kilimajer
you can use: UPDATE column SET column + 1 WHERE condition JJ Harrison wrote: >what is the best way to increment a mySQL table cell? > >is there a increment function or do I need to increment it in php? > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Adding GD libraries after compile

2002-06-28 Thread Marek Kilimajer
Yes, you are ruled out, unless you can convice your administrator to include it. Extensions are pure machine code, so if anybody could load his/her own extension, he/she could easily gain http server priviledges. Justin French wrote: >I've just done a little reading on dl(), and it would appea

Re: [PHP] Globals bug??

2002-07-01 Thread Marek Kilimajer
Are you using any opcode cache? Are you sure it is another process or might it be another thread. Marek [EMAIL PROTECTED] wrote: >We are seeing a rare bug that seems to imply that there is a bug in PHP's >global variables across httpd processes. To make a long story short, it >appears tha

Re: [PHP] Moving a file with 'rename'?

2002-07-04 Thread Marek Kilimajer
rename can "move" the file only on the same partition, it is realy just _rename_, not full _move_ Marek Tim Stoop wrote: >Hi people, > >I want to move a file from one location to another. I expect I can only do >this with 'rename', because there's no 'move'-command (at least nog in the >

Re: [PHP] mySQL and phpMyAdmin

2002-07-04 Thread Marek Kilimajer
You need to install php-mysql* too. Jadiel Flores wrote: >Hi, I installed php and mysql today and I'm trying to use phpMyAdmin but >I'm receiving the error message: >cannot load MySQL extension, >please check PHP Configuration. > >I checked the php.ini and couldn't find anything related, my conf

Re: [PHP] eregi problems

2002-07-04 Thread Marek Kilimajer
If the regexp matches, it is a valid email, so you need ! in front of it. dan radom wrote: >I've got a form that's posted to a php page where I'm attempting to validate a field >contains a valid email address. The eregi below seems to be totally ignored... > > if (eregi("^[a-z0-9\._-]+@[a

Re: [PHP] Moving a file with 'rename'?

2002-07-04 Thread Marek Kilimajer
None that I know of. You need to use copy & unlink Tim Stoop wrote: >Marek Kilimajer wrote: > > > >>rename can "move" the file only on the same partition, it is realy just >>_rename_, not full _move_ >> >> > >So there is no full-

Re: [PHP] Button can't see form!

2002-07-04 Thread Marek Kilimajer
I dont think forms can be nested. In fact I'm pretty sure. Mark Colvin wrote: >I use the following line in some of my php scripts to navigate between >pages: > > value='New' onClick="this.form.action='newproduct.php?mode=new'; >this.form.submit()"> > >The problem I have is with a page I build dy

Re: [PHP] Re: Editing Word Documents

2002-07-09 Thread Marek Kilimajer
The only way I see this can be done is simly let every user mount a share under the same letter, all you need to do then is file, then locking files is up to samba or windows server. Marek Richard Lynch wrote: >>I have an intranet, which provides access to, amongst others, Word >>Document

Re: [PHP] Re: Editing Word Documents

2002-07-09 Thread Marek Kilimajer
rom the > idea. Has anyone used Samba shares on the internet or know if its > secure/insecure? > > Thanks > > Chris > > Marek Kilimajer wrote: > >> The only way I see this can be done is simly let every user mount a >> share under the same letter, >> all

Re: [PHP] Re: Executing Script through image

2002-07-09 Thread Marek Kilimajer
instead of $fn=fopen($filename,"rb"); while(!feof($fn)) { echo fread($fn, 4096); } use readfile($filename); BB wrote: >$filename = "your/file.gif"; >header("Content-Type: image/gif"); >header("Content-length:".filesize($filename)); >$fn=fopen($filename,"rb"); >while(!feof($fn)) { > echo frea

Re: [PHP] Wait/Timeout

2002-07-09 Thread Marek Kilimajer
You could call another script in language of your choise using $output =exec('command'); Marek Michael wrote: >Hi! > >I've been using PHP to write shell scripts and was wondering how to >implement the following: > > - I have a menuing system > - If a user does not give an input within a ce

Re: [PHP] passing objects in url

2002-07-09 Thread Marek Kilimajer
This won't work, you must register it within a session, just remember to declare the class befor session_start() Alexander Ross wrote: >If $this is an object, can I have the following link? > >Process > >Will the URL become too long? Will teh info get passed correctly? thanks > >Alexander Ross

Re: [PHP]Erik Hegreberg

2002-07-10 Thread Marek Kilimajer
Well, he likely never be able to unsubscribe himself, as he needs to reply to the unsubscribe notice, but his account is now full. R'twick Niceorgaw wrote: >I just setup a rule in OE to forward his own mail to himself and delete it >form my machine >- Original Message - >From: "Jeff Lew

Re: [PHP] Re: cookie ?

2002-07-10 Thread Marek Kilimajer
Johan Holst Nielsen wrote: >> (yes it's me again) >> i've got an other problem. >> i've got an login system, and it has to put an cookie, but it seems >> he doesn't do it. >> is it an php.ini problem ?? > > > Dont think it a php.ini file. > > First of all. Remember to set the cookie before any

Re: [PHP] Re: Editing Word Documents

2002-07-10 Thread Marek Kilimajer
Now I reminded myself of WebDAV (http://www.webdav.org/), it is a filesystem over http. There is an apache module available (http://www.webdav.org/mod_dav/). It should be easier to set up then VPN. Chris Hewitt wrote: > Thanks > > Marek Kilimajer wrote: > >> If you can u

Re: [PHP] Generate a file

2002-07-10 Thread Marek Kilimajer
Use BiffWriter, I don't know where it lives, you must find it yourself. Phillip S. Baker wrote: > Okay here is what I want to do. > > Select the field of a database that I want. > Hit submit. > Execute a query of a database based on the said form. > Gather all the data and rows and plug them int

Re: [PHP] Re: Get Anchor out of Url

2002-07-16 Thread Marek Kilimajer
Wait, you mean IE sends the full uri (including the anchor #JumpHere) as a GET request? Anchor is interpreted on the client side, this means browser reads trought the document looking for anchor of that name. You cannot get it on server, maybe somehow with javascript. Marek Martin Thoma w

Re: [PHP] Accessing Ports

2002-07-18 Thread Marek Kilimajer
Only if you write your own module. Thomas \"omega\" Henning wrote: >Hello, > >Can i access my paralel or USB port with PHP server side? > >Thomas "omega" Henning > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Code errors

2002-07-18 Thread Marek Kilimajer
My guess is that there is no ',' in $Line, so split returns an array with one variable, so list() warns you parameter No. 1, 2 ,3 4 and 5 are not asigned any value. Chris Crane wrote: >247: list($H_Date, $H_Open, $H_High, $H_Low, $H_Close, $H_Volume) = >split(",", $Line); > >"Scott Fletcher"

Re: [PHP] PHP if exit Q

2003-08-27 Thread Marek Kilimajer
You should fix your logic, or put additional if in. Or you can use while and break, but this is somewhat sick: while( condition ) { // code here if( codition ) { } else { break; } // more code here break; // break at the end so while() becomes if() }

<    4   5   6   7   8   9   10   11   12   13   >