[PHP] PHP 4.3.0, __CLASS__ and __FUNCTION__

2003-01-09 Thread Michael Virnstein
Hi there, can someone please explain what __CLASS__ and __FUNCTION__ are and what they do? They are listed in the PHP 4.3.0 changelog and can be found here: http://www.php.net/manual/en/reserved.php but i can't find any explanation. Michael -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: SQL question, getting error and not sure why

2002-05-31 Thread Michael Virnstein
(select max(nuacteur)+1 AA from acteursenc), > (select 'Michael Sweeney' BB from dual) > then in the second do: > > select max(nuacteur)+1 AA from acteursenc > then in the first > > commit > and in the second: > > se

[PHP] Re: SQL question, getting error and not sure why

2002-05-31 Thread Michael Virnstein
select max(nuacteur)+1 AA from acteursenc), (select 'Michael Sweeney' BB from dual) then in the second do: > select max(nuacteur)+1 AA from acteursenc then in the first > commit and in the second: > select max(nuacteur)+1 AA from acteursenc yo'll see, that

Re: [PHP] Re: SQL question, getting error and not sure why

2002-05-30 Thread Michael Virnstein
yes, in that way the query i suggested would look like: insert into acteursenc (nomacteur) values ('Michael Sweeney') and nuacteur would be provided by the before insert trigger automatically. that's like mysqls autoincrement. Michael "Rouvas Stathis" <[EMAIL PROTECTED]> schrieb im Newsb

[PHP] Re: SQL question, getting error and not sure why

2002-05-30 Thread Michael Virnstein
with second sql i meant: (select 'Michael Sweeney' BB from acteursenc) if you want one row and you need a dummy table, use "dual". Michael "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... &g

[PHP] Re: SQL question, getting error and not sure why

2002-05-30 Thread Michael Virnstein
the problem is, that the second sql produces more than one row. To be exactly the amount of select count(*) from acteursenc rows, with 'Michael Sweeney' as value in BB. Perhaps you have a unique key on nomacteur?! I could help further, if i know what you want to do with your query. if nuacteur is

Re: [PHP] Ora_Fetch_Into function problem

2002-05-27 Thread Michael Virnstein
if you are a newbie to oracle, don't forget to use bind variables in your queries, if this is possible in your Oracle Version. bindvars are placeholders for values in an oracle query, to which you bind your value on runtime. the advantage in using bind variables is, that oracle doesn't have to com

[PHP] Re: Ora_Fetch_Into function problem

2002-05-26 Thread Michael Virnstein
have you tried compiling php with oci again, by installing the Oracle8i Client libraries? Should work as far as i have read. The oci interface is much better than the ora interface. And I am not familiar with the ora functions, only used to oci. Michael "Michael P. Carel" <[EMAIL PROTECTED]> sch

[PHP] Re: how to display a file's last updated time using php?

2002-05-26 Thread Michael Virnstein
look here: http://www.php.net/manual/en/ref.filesystem.php and especially here: http://www.php.net/manual/en/function.filemtime.php Michael "Rui Huang" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED]... > Hi, friends, > > I want to display the last updated time of a file using

[PHP] Re: arrays

2002-05-26 Thread Michael Virnstein
> Can arrays be passed to functions just like a simple variable? yes, no difference. You can pass every variable to a function, you can pass constants or your values directly. You have to use a variable if a function requires passing by reference or if you want to pass by refernce, because only va

Re: [PHP] inspirational

2002-05-26 Thread Michael Virnstein
but the scriptname itself will be included there. Try this, if you don't want the scriptname to be included.: $url = preg_replace('/^(http:\/\/)[^\/]+((\/[^\/])*\/)([^\/]+)$/', '\\1$SERVER_NAME\\2', $SCRIPT_URI); Haven't tested them, but should work. Michae

Re: [PHP] inspirational

2002-05-26 Thread Michael Virnstein
typo: $url = preg_replace('/^(http:\/\/)[^\/]+(\/.*)$/', '\\1$SERVER_NAME\\2', $SCRIPT_URI); Michael "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > try: > > $url = preg_rep

Re: [PHP] inspirational

2002-05-26 Thread Michael Virnstein
try: $url = preg_replace('/^(http:\/\/)[^\/]+(\/.*)$, '\\1$SERVER_NAME\\2', $SCRIPT_URI); Michael "Jtjohnston" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I want to detect the url my .php lies in. > > This is over kill and BS: > > $myurlvar = "http:

[PHP] Re: unexpected T_IF

2002-05-25 Thread Michael Virnstein
you can look here: http://www.php.net/manual/en/tokens.php to see what T_IF means. 31: $FulflNme = $DOCUMENT_ROOT . $flNme you forgot the ; at the end of the line. Michael "Zac Hillier" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 002a01c203cf$4f1d7780$667ba8c0@ws">news:002a01c203cf$4f1d7780$

Re: [PHP] Re: Program execution stops at exec()

2002-05-24 Thread Michael Virnstein
Must have overwritten this, but very good to know that. Thanx. Michael "Analysis & Solutions" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Fri, May 24, 2002 at 06:30:50PM +0200, Michael Virnstein wrote: > > >

[PHP] Re: Program execution stops at exec()

2002-05-24 Thread Michael Virnstein
note: i think the exec in your php waits for the shell to return, but before the shell can answer, php terminates the script, because of the max_exection. Michael "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PR

[PHP] Re: Program execution stops at exec()

2002-05-24 Thread Michael Virnstein
check your max_execution_time settings in php.ini Michael "Tom Mikulecky" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello > > In one script I use exec() to execute a shell script which takes 2-3 > hours to run. I disabled user abort and set time li

Re: [PHP] passing arrays

2002-05-24 Thread Michael Virnstein
$myarray = unserialize(urldecode($_GET['myarray'])); or am i wrong? Regards Michael "Miguel Cruz" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thu, 23 May 2002, wm wrote: > > is there a way to pass arrays in forms or in the url? > > > > if i have $

[PHP] Re: PHP Mail problem

2002-05-24 Thread Michael Virnstein
refer to the manual of your email server and check for quota settings. You obviously reached the quota limit there and now you're not allowed to send any data, until the quota is reset. This may be on a daily or monthly basis or perhaps you have to do it manually. Regards Michael "Manisha" <[EMA

Re: [PHP] error in compling with oracle support

2002-05-23 Thread Michael Virnstein
Found a better resource than me :) http://www.php.net/manual/en/ref.oci8.php Seems you have to install the Oracle8 Client Libraries to be able to call OCI8 interface Regards Michael "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:

Re: [PHP] error in compling with oracle support

2002-05-23 Thread Michael Virnstein
i think that Oracle 7.3.4.0.0 does not support the oci extension or vize versa, Oracle 8i does, that's what i know for sure. so try it without the oci-extension. If it works, use this funtions in your scripts: http://www.php.net/manual/en/ref.oracle.php Regards Michael "Michael P. Carel" <[EMAIL

[PHP] Re: Passing Variables

2002-05-23 Thread Michael Virnstein
and please, next time paste the error or tell us at least, if it is a php error or a mysql error and the line on which it occured and mark that line in your sample code, so someone can look at it , understand it and help you. Regards Michael "Michael Virnstein" <[EMAIL PROTECTED

[PHP] Re: Passing Variables

2002-05-23 Thread Michael Virnstein
$this usually is a self-reference inside a class. Use it with care! try to "echo $sql;", perhaps this tells you more. Regards Michael "James Opere" <[EMAIL PROTECTED]> schrieb im Newsbeitrag FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTTRAIN">news:FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTT

Re: [PHP] Learning PHP

2002-05-23 Thread Michael Virnstein
you have to know what the function prototypes mean, and it is very easy to understand: int function(string varname, mixed varname2[[, array varname3], int varname4]); means the function returns a variable of type integer, which is the same as int. Just two names for the same thing. if int is spe

[PHP] Re: functions and scoping

2002-05-22 Thread Michael Virnstein
Why not simply define a set of variables for root dir and the other directories, and use full paths in your includes? $root = "/wwwroot/mydomain/public/"; $homepageroot = "/"; $mydir = "subdir/"; now you can do: include $rootpath.$mydir."inc.php"; and ">Link or ">Link Regards Michael "Dav

[PHP] Re: substr....what does this mean? (newbie)

2002-05-22 Thread Michael Virnstein
Hi, first take a look at this page: http://www.php.net/manual/en/function.substr.php > if (substr($text, -1) == ".") substr($text, -1) will return the last character in string $text. if it is a "." the if statement will evaluate to true and it'll do the following > {$test = substr($text, 0, -1

[PHP] Re: JavaScript vs. Header redirect

2002-05-22 Thread Michael Virnstein
note: you should use $array["test"] if test is a string and $array[test] if test is a constant. do not use $array[test] if you mean the string "test". $array[test] will also work, if "test" is a string. Php then tries to look for a constant with name "test", won't find one and evaluate "test" as s

[PHP] Re: Executebale code from a databse

2002-05-22 Thread Michael Virnstein
eval ('?>'.$var.' then comes the content of the php script which also can contain html and then we reopen and you say $var = ""; you'll result in ... eval("?> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi. > I'm changing my website to one based on My-SQL which will

[PHP] Re: variables

2002-05-22 Thread Michael Virnstein
you can use $_POST['name1'] if you're using post vars $_GET['name1'] if you're using get vars Regards Michael "Roman Duriancik" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > When are set in php.ini (php version 4.2.1 on linux) register_globals = Off

[PHP] Re: $answers[answer$n]

2002-05-18 Thread Michael Virnstein
answers$n. php tries to concate the constant answers with the variable $n, but you forgot the concatenation operator ".". i assume that answers should be a string and is not a constant, therefore $answer["answers".$n] is right. if answers is a constant use $answer[answers.$n]; but a better way of

Re: [PHP] document root variable or function

2002-05-17 Thread Michael Virnstein
$_SERVER["DOCUMENT_ROOT"] "Jason Wong" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Friday 17 May 2002 20:56, [EMAIL PROTECTED] wrote: > > Is there a variable in PHP which will show the directory of the document > > root? I have done a few searches

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Michael Virnstein
-q? this is for disabling the html headers, right? "James E. Hicks III" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > #!/path.to/php -q > > I'd like to suggest the -q option for PHP shell scripts, which I rely on every > day. > > James > -- PHP Gene

[PHP] Re: file error

2002-05-17 Thread Michael Virnstein
s, you can overwrite their php.ini with your own. Simply place a file called php.ini in the document_root of your domain and this php.ini will get loaded instead of the php.ini of your hosting company. Nice and undocumented feature, which i found here in this list a few weeks ago. Regards Michael

[PHP] Re: file error

2002-05-17 Thread Michael Virnstein
i do not know if file() can be used with files on remote servers. fopen() can, if this feature is enabled in php.ini. Regards Michael "Roman Duriancik" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have this code : > $text = file("http://www.hokej.s

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Michael Virnstein
> the only thing that can smash th whole thing imo, is if you try to use the > cgi version via web if you have php also installed as apache module. if anyone has infos here, it'll be really nice. Regards Michael "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im N

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Michael Virnstein
afaik yes. The module version should be called if apache has been requested with one of the reqistered php file types. the cgi version can be used as shell interpreter. the only thing that can smash th whole thing imo, is if you try to use the cgi version via web if you have php also installed as

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Michael Virnstein
> Set your cron job up as "lynx -dump http://www.myserver.com/myscript.php > > /dev/null" (or pipe it to a logfile if you fancy) - obviously, you'll need > lynx installed for this to work :-) but this is only needed only if you compile php into apache or am i wrong? if i have the cgi version inst

[PHP] Re: search engine indexing and redirects

2002-05-17 Thread Michael Virnstein
> i would have thought that server-side redirects are no problem for crawlers. That's what i would have thought too. mod_rewrite is an alternativ for virtual domains. if you request www.mydomain.com it doesn't matter to the server if you have virtual domains or mod_rewrite. both got redirected to

[PHP] Re: Need help with Arrays

2002-05-15 Thread Michael Virnstein
1. your while loop should have {} brackets i can't see where it starts and where it ends. so does PHP. leaving brackets away tells PHP that only the next line is part of the while loop. i don't know if your file has only the three lines ($cust_name, $cust_area, $cust_code) or if mo

[PHP] Re: question about objects and references

2002-05-13 Thread Michael Virnstein
here's an example of what i said: a += 1; } function byRef(&$obj) { echo $obj->a += 1; } /// $a = &new obj(); $a->byVal(); echo ""; echo $a->a; echo ""; $a->byRef(); echo ""; echo $a->a;

[PHP] Re: question about objects and references

2002-05-13 Thread Michael Virnstein
"Sascha Mantscheff" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 02051311162204.02523@pico">news:02051311162204.02523@pico... > When I pass an object as a parameter to a function as "$this", this is an > object reference (according to the docs). it depends on the function. if you call it by valu

[PHP] Re: XML-parser

2002-05-13 Thread Michael Virnstein
http://sourceforge.net/projects/phpxpath/ <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > I´m working on a little web shop solution for a school project, therefore > I´m looking for > a PHP XML-Parser or some source code I can get from somewhere.

[PHP] Re: Problem with sessions.

2002-05-13 Thread Michael Virnstein
php4 sessions or self made? own session_set_save_handler? Let us see the login code! Ok...that's how i would do it: After successful login i'd register a variable or set the registered variable to a specific value. Now i check on every page: If (!IsSet($_SESSION["myLoginVar"] ) || $_SESSION["myL

[PHP] Re: Hey PHP PPL - Great Question !!!

2002-04-29 Thread Michael Virnstein
if you need access to your session among different servers, it's the best way to store session data inside a database, so every server can access it easily. The file container is accessible only for local users on the server, at least when you set up normal server configuration and not some nasty

[PHP] Re: Date and Time

2002-04-29 Thread Michael Virnstein
seems like you echo an 1 before print $time is called. Look through your code, there must be something printed or echod. Perhaps it's simple some html (?>1 schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > > Anyone know any reason that the date function would return 2

Re: [PHP] Callin PHP gurus...figure this out

2002-04-26 Thread Michael Virnstein
nice one! didn't notice this function yet! Regards Michael "John Holmes" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 000101c1ed33$e2f13c60$b402a8c0@mango">news:000101c1ed33$e2f13c60$b402a8c0@mango... > Use wordwrap() to wrap the text to 75 characters and str_replace() to > replace " with ' > > ww

[PHP] Re: Callin PHP gurus...figure this out

2002-04-26 Thread Michael Virnstein
line) { if (strlen($line) > $maxchars) { $newtext .= substr($line, 0, $maxchars)."\n"; $newtext .= substr($line, $maxchars)."\n"; } else { $newtext .= $line."\n"; } } Regards Michael "Michael Virnstein" <[EMAIL PROTECTED]> schri

[PHP] Re: Callin PHP gurus...figure this out

2002-04-26 Thread Michael Virnstein
forgot the " to ' conversion: // this should do the job quite fine. $var = str_replace ("\"", "'", $var); Regards Michael "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]

[PHP] Re: Callin PHP gurus...figure this out

2002-04-26 Thread Michael Virnstein
if you want to write into the database, i wouldn't convert newline to . do this when you read from the database using nl2br($var) ot convert every newline in $var to . default after 75 characters if no was found before. if you don't care about word-splitting, you could do the following: //INSER

[PHP] Re: include() and require() problem

2002-04-19 Thread Michael Virnstein
be sure that the path to the include file is relative to the script that was requested by the user. that's important if you include include-files into included files. you then have to make sure that the path to your include-file in the include-file is relative to the file that included the file, i

[PHP] Re: Executing a time intensive script

2002-04-19 Thread Michael Virnstein
you 'd need process forking, which is has to be compiled into php and which should/could not be used within a webserver environement. i don't know your scripts will work, if you call process_function after including auth_user.php. if it works, i'd do it this way: Regards Michael "Zach Curtis"

[PHP] Re: How to create, name and start PHP sessions

2002-04-18 Thread Michael Virnstein
on_name("hasLoggedIn"); > $name = session_name(); > session_start(); > $HTTP_SESSION_VARS["username"] = $username; > $HTTP_SESSION_VARS["ip"] = $REMOTE_ADDR; // To prevent session stealing > } > > I am completely confused! > >

[PHP] Re: Open Download-Box

2002-04-18 Thread Michael Virnstein
this is a problem of IE, not of PHP. it seems that IE is ignoring headers in some cases. Regards Michael "Martin Thoma" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello! I have a PDF-File, which the user should download (it should not > open in the

[PHP] Re: Error Handling Class - Any Recommendations?

2002-04-18 Thread Michael Virnstein
Use PEAR_Error. It's really powerful and has yll you need. there's no logging method in PEAR_Error afaik, but you can easily do this with PEAR's Log class, same for mailing. use PEAR's mail class to send mails. I like PEAR very much. It has lots of good things to offer and is easily extendable for

[PHP] Re: How to create, name and start PHP sessions

2002-04-18 Thread Michael Virnstein
orm > elements > > Once submitted you will be at a "thank-you" page and files uploaded, but > then the session is gone (session_name is back to PHPSESSID again) > > What do I do to keep it? I cannot use cookies and putting it in the URL? > > Phil > &

[PHP] Re: How to create, name and start PHP sessions

2002-04-18 Thread Michael Virnstein
session_name will retur the previos name of the session, so in your case $stuff will contain "PHPSESSID" and i think you have to call session_start(); before you do $HTTP_SESSION_VARS["username"] = $username; so perhaps this will work: session_name("hasLoggedIn"); $stuff = session_name(); sessio

Re: [PHP] email attachments

2002-04-17 Thread Michael Virnstein
use PEAR::Mail(); it has all you need. "James E. Hicks III" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You need a Content-Disposition in yer $mime variable. I'll leave it up to you to > figure out where, because I've forgotten where it goes exactly.

Re: [PHP] eregi() problems...

2002-04-16 Thread Michael Virnstein
the rest seems ok to me, if you search for files with e.g hello_.jpg as name "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > eregi('_[0-9]{4}.jpg$', $file_name) > > should be > >

Re: [PHP] eregi() problems...

2002-04-16 Thread Michael Virnstein
eregi('_[0-9]{4}.jpg$', $file_name) should be eregi('_[0-9]{4}\.jpg$', $file_name) . is a spcial character(means every character) and has to be backslashed if you want it's normal meaning "Jas" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I must be

[PHP] Re: Writing Cross DB application

2002-04-15 Thread Michael Virnstein
PEAR::DB(); "Arcadius A." <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello ! > I'm planning to write a database application for MySQL, and then port it to > PostrgeSQL. > Is there any library or class that could help me to write/maintain just one

[PHP] Re: Session problem

2002-04-15 Thread Michael Virnstein
> Warning: Cannot send session cache limiter - headers already sent > (output started at /path/to/my/little/session.inc:9) in > /path/to/my/little/session.inc on line 10 this means that there is output before session_start() was called. look at your include files, and make sure that there is no

[PHP] Re: evaluate my mailing list attempt?

2002-04-15 Thread Michael Virnstein
looks fine but i would change this: > $to=$list2[1];//set "to" to email address > $subject="Newsletter"; > $msg="Hello $list2[0], bla bla bla"; //include name in message > mail("$to,$subject,$msg"); //individual mail during to > $subject="Newsletter"; > $msg="Hello $list2[0], bla bla bla"; //in

[PHP] Re: phpMyAdmin protection

2002-04-15 Thread Michael Virnstein
you can use the built in auth system. see phpmyadmin manual "Mantas Kriauciunas" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hey PHP General List, > > Can anybody point me to tutorial or real good explanation site how > to keep Http://localhost/ph

[PHP] Re: register_shutdown_function

2002-04-15 Thread Michael Virnstein
afaik there is no way to call a class method with register_shutdown_function. simply use a function which calls your constructor function _shutdown() { xmysql::~xmysql(); } register_shutodown_function("_shutdown"); "Hayden Kirk" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 000501c1e40b$694ca

[PHP] Re: Understanding If conditional statements

2002-04-15 Thread Michael Virnstein
if ($sql_result = 0) if you want to compare $sql_result with 0 you have to do it: if ($sql_result == 0) = is an assignment operator, == is a comparision operator "Lmlweb" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm trying to get my code to print

[PHP] Re: Empty delimiter error - ??

2002-04-15 Thread Michael Virnstein
this means in your case, that $email is an empty string "Rich Pinder" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm totally unfamiliar with php, and making some slight modificiations > to Chris Heilmann's nice v 1.1 Newsleterscript. > > What exactly

[PHP] Re: functions

2002-04-12 Thread Michael Virnstein
like you call every function in php. "Alia Mikati" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hi > i would like now how can we call a function within another function in > php? > thx a lot > > -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: string...

2002-04-12 Thread Michael Virnstein
's meening. and there's nothing like preg_matchi to check case-insensitive. this has to be done using modifiers after the ending /. in the example above it's i for case-insensitive. "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]&quo

[PHP] Re: string...

2002-04-12 Thread Michael Virnstein
("^/*_[0-9]{4}\.jpg$", $file_name)) { > $file_lost .= " NAME=\"$file_names\">$file_names"; > } > } > $file_lost .= " VALUE=\"select\">"; > closedir($dir); > > > "Michael Virnstein" <[EMAIL PROTECTE

[PHP] Re: variable scoping...

2002-04-12 Thread Michael Virnstein
why do you have more than one class with the same name? would be easier using different names for different classes. or define a base class template and extend it in the files as desired, but give them unique names. how do you know later, which class does what in which way, when they have the same

[PHP] Re: Sending HTML from PHP with 'mail' as a cron job

2002-04-12 Thread Michael Virnstein
i'd suggest using PEAR's mail class. It'll fit for all your needs and is easy to use. <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > $headers = "Content-type: text/html\n"; > $fromEmail = urlencode( $dbQuery->adminEmail ); > $subject = "Your new eStore i

[PHP] Re: Getting values of duplicate keys in array

2002-04-11 Thread Michael Virnstein
FROM $praxTable p, $medTable m WHERE p.id = m.prax GROUP BY p.id, p.$town, p.$zip, p.$phone, p.$description"; "Michael Vir

[PHP] Re: howto call php script from cgi script

2002-04-11 Thread Michael Virnstein
doesn't it have to be: # md5.php #!/usr/bin/php (path to your php) and have you test your cgi using "su - webuser" before? perhaps some file permission problems, when called from the web. "Sanjay" <[EMAIL PROTECTED]> schrieb im

Re: [PHP] String?

2002-04-11 Thread Michael Virnstein
and i'd suggest using eregi instead, because then also .Jpg or .JPG will be found. "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > see what's wrong here: > ereg('(^[0-1231]$).jpg$',$fi

Re: [PHP] Getting values of duplicate keys in array

2002-04-11 Thread Michael Virnstein
hmm...he has a table for premises and one for doctors, hasn't he? > FROM $medTable m, > $praxTable p "Justin French" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Just a quick note, you wouldn't base it upon $description would you? > It reall

[PHP] Re: Getting values of duplicate keys in array

2002-04-11 Thread Michael Virnstein
// print names of docs here using $docrow array } //print address of praxis here using $row array } } "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > typo in the querystring,

[PHP] Re: Limits and PHP

2002-04-11 Thread Michael Virnstein
ok, if you're using mysql you can use the LIMIT function in your statement: SELECT * FROM table LIMIT 0, 30 would show 30 rows starting from row 1. you can set a variable telling your php script how many entries per page you will show: $showlines = 10; and telling your script where to start the

[PHP] Re: Getting values of duplicate keys in array

2002-04-11 Thread Michael Virnstein
ble m, $praxTable p WHERE m.$prax = p.$id GROUP BY m.prax, m.$preName, m.$sureName, m.$title, p.$town, p.$zip, p.$phone, p.$description ORDER BY m.$prax, m.$preName"; "Michael Virnstein" <[EM

[PHP] Re: Getting values of duplicate keys in array

2002-04-11 Thread Michael Virnstein
ok, here we go. you normaly say this i suppose: while ($row = mysql_fetch_array($result) { //your html inserts here } if you'd use oracle, i'd suggest using a cursor, but you're using MySql, so you probably have to do it a bit different: (Not tested, could contain some errors!!!) // you'll

[PHP] Re: Temporary off...

2002-04-11 Thread Michael Virnstein
jup, that's what i am using. much better! no email spam and i can keep track of threads more easily. and i can "David Robley" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In article , > [EMAIL PROTECTED]

Re: [PHP] String?

2002-04-11 Thread Michael Virnstein
see what's wrong here: ereg('(^[0-1231]$).jpg$',$file_name) [] meens a group of characters, so in your case 0,1,2 and 3 are valid characters. you haven't defined any modifer like ?,*,+ or{}, so one of this characters has to be found exactly one time. you're using ^ outside the [] so it meens the

[PHP] Re: passing array to another php file

2002-04-11 Thread Michael Virnstein
first serialize and then base64encode your array. send this encoded string to the next page and base64decode it there first and then unserialize it. ... and sample2.php: "Hirono Tanaka" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, does anyone k

[PHP] Re: unsetting an instance from within its class

2002-04-11 Thread Michael Virnstein
you can use unset($this), but it'll only work if there are no other variables referencing to this object. unset only unsets the reference to value, not the value itself. PHP will unset the value totally, if there are no references to it anymore. so using $this = null; , is perhaps the better solut

[PHP] Re: Is While needed in MySQL Result with a Limit of 1

2002-04-10 Thread Michael Virnstein
It seems that you don't understand why mysql_fetch_array is most often used inside a loop. The loop is not required! if you don't put mysql_fetch_array inside a loop, you can only get the first row and that's it, because calling mysql_fetch_array will return the next row in your result. if you exp

[PHP] Re: mailing list using mail()

2002-04-10 Thread Michael Virnstein
> Should I just use one message and append the BCC: line of the one message? this could probably be the best way. "Petre Agenbag" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > the combination of PHP and mysql and the ease of use of the mail() > f

[PHP] Re: Scoping functions in PHP

2002-04-10 Thread Michael Virnstein
No, there's nothing like private or public functions/methods. There's no way preventing someone using your private functions/methods. "Eric Starr" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 000e01c1e041$d931cc20$[EMAIL PROTECTED]">news:000e01c1e041$d931cc20$[EMAIL PROTECTED]... I am a Java progra

Re: [PHP] XML HELP

2002-04-10 Thread Michael Virnstein
Why don't you use this class...it's really good! http://sourceforge.net/projects/phpxpath/ "Analysis & Solutions" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hey Christopher: > > On Mon, Apr 08, 2002 at 09:14:08PM -0400, Christopher J. Crane wrote: >

[PHP] Re: Directory check

2002-04-08 Thread Michael Virnstein
file_exists will perform a check if the file, no matter if it's a directory, a regular file or a symlink. if you want to know if it is a directory use is_dir($file) or refer to the php manual"Hiroshi Ayukawa" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

[PHP] Re: php and html image tag...

2002-04-08 Thread Michael Virnstein
Please post more code. Can't help any further in the moment. "Jas" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok here is my problem, I have a piece of code that queries the database > pulls the results of a table into an array, on another file the res

Re: [PHP] Adding "a" in "try.jpg"! Problems!

2002-04-08 Thread Michael Virnstein
typo..this one's right :) while ($myrow = mysql_fetch_array($result)) { $img = explode('.',$myrow[ilmage]); $img[count($img) - 2] .= "a"; echo ""; } "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]&q

Re: [PHP] Adding "a" in "try.jpg"! Problems!

2002-04-08 Thread Michael Virnstein
but if $myrow["ilmage"] = "hallo.hmm.gif"; your code won't work. so better: while ($myrow = mysql_fetch_array($result)) { $img = explode('.',$myrow[ilmage]); $img[count($img) - 1] .= "a"; echo ""; } "Richard Baskett" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EM

Re: [PHP] Adding "a" in "try.jpg"! Problems!

2002-04-08 Thread Michael Virnstein
$myrow[ilmage] = eregi_replace("(\.[^\.]+)$", "a\\1", $myrow[ilmage]); and if ilmage isn't a constant use $myrow["ilmage"]. "Thomas Edison Jr." <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Thanks for your relies. There are a couple of > proble

[PHP] Re: sessions and passing variables

2002-04-08 Thread Michael Virnstein
sure. if all users should have access to this instance of your object, then you could store the serialized object in a file, everyone has access to and unserialize it if needed.But don't forget to include your object-surcecode before unserializing the object, or you'll lose your methods. If users

[PHP] Re: Newbie Question

2002-04-08 Thread Michael Virnstein
try this: Solid "); print("".$data[0].""); print(""); print("."$data[2].""); print("".$data[3].""); print("".$data[4].""); print("".$data[5].""); print(""); } } ?> "Hubert Daul" <[EMAIL PROTECTED]> schrieb im Newsbeitra

[PHP] Re: Copying Directory

2002-04-08 Thread Michael Virnstein
there was a typo...this one should work # # # boolean copy_dirs ( string src_dir, string target_dir ) # # # copy a directory with subdirectories to a target directory

[PHP] Re: Copying Directory

2002-04-08 Thread Michael Virnstein
# # # boolean copy_dirs ( string src_dir, string target_dir ) # # # copy shopdirectories into a new shop # # Function Parameters

[PHP] Re: Headers not working

2002-04-06 Thread Michael Virnstein
this might be because you use the cgi version of php. to be able to send e.g. 404 header, you have to run php as webserver module which currently only works with apache and linux afaik. otherwise these headers get send by the webserver and you cannot affect them. if you use php with apache as mod

[PHP] Re: What's wrong with the Array? I"m baffled!

2002-04-05 Thread Michael Virnstein
> $number = $sumItUp[$name]; > $number++; > $sumItUp[$name] = $number; this could be done easier: $sumItUp[$name]++; :) "Scott Fletcher" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! > > I'm a little baffled on why the array is not working t

Re: [PHP] Any ideas on combining arrays????

2002-04-05 Thread Michael Virnstein
perhaps: $FFR = array("TU4R" => array("data" => array(array("count" => "TU4R is 0"), array("count" => "TU4R is 1"), array("count" => "TU4R is 2"))), "PH01" => array("data" => array(array("count

[PHP] Re: Javascript and PHP??

2002-04-05 Thread Michael Virnstein
sure you can use javascript in your php. php is serverside and produces the page. the webserver sends then this produced page to the client. so javascript is the same as html for php. it's just some lines of text. "Joe Keilholz" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:

  1   2   >