[PHP] Re: __FILE__ and __LINE__ of calling scripts?

2005-09-27 Thread cc
all u need is debug_backtrace() On 9/27/05, Thomas <[EMAIL PROTECTED]> wrote: > > Hi, > > I want to find out if it is possible to get the file name and the line > number of a calling script (__FILE__, __LINE_) from a calling class > automatically. > > Let me explain: > > I have a db class which ge

[PHP] Re: Passing non GET/POST request methods to php script do not work on RH based linux

2005-09-30 Thread cc
could be problem of apache configuration ? is there directives like 'limit' in your apache config file? On 9/30/05, Yedidia Klein <[EMAIL PROTECTED]> wrote: > no one answered me so i'm answering myself > php.ini has a directive called allow_webdav_methods that is by default off. > > changing t

[PHP] Re: Server Time Out

2005-10-04 Thread cc
did u set up a firewall? maybe you want change the rule to let packets from port 119 go through. or try add a new news account. Good luck! On 10/5/05, Dan Baker <[EMAIL PROTECTED]> wrote: > "Kevin Cloutier" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > > > I'm new to t

[PHP] Re: displaying image from blog

2005-10-04 Thread cc
you cant just mix html tags and image data and expect them to be on the same page to get both html and images displayed. if you want image, use a tag, whose SRC attribute maybe a php file, and this php file will output _only_ image data, i.e. echo $obj->photo; nothing more, except if you want t

[PHP] Re: Freetype and JPEG disabled

2005-10-09 Thread cc
did you configured php with these option? --with-freetype-dir=/path/to/freetype --with-jpeg-dir=/path/to/jpeg On 10/9/05, Feris Thia C. <[EMAIL PROTECTED]> wrote: > Hi All, > > I've tried to compile and install PHP with gd and freetype library enabled, > and all PNG and GIF library are loaded

[PHP] Re: Userlogin system seems to override the if statement....

2005-10-12 Thread cc
did u give proper username and password to login with? On 10/12/05, twistednetadmin <[EMAIL PROTECTED]> wrote: > I'm new to this. So I used a tutorial to write this. But it shows "Login > ok. > Welcome" at once when the page loads. Here is the tutorial: > http://www.ss32.x10hosting.com/ss32/files/

[PHP] Re: include file to global scope

2005-10-12 Thread cc
yes, its possible, consider this: /** * @param $file_to_include path to php file you want to get its content * @return included contents */ function get_output($file_to_include){ ob_start(); include $file_to_include; return ob_get_clean(); } of course, you may extend this function to bet

[PHP] Re: Run a php script as a separate thread/process

2005-10-12 Thread cc
Tommy, r u serious? this ain't what you called 'thread or process', just something like an user agent, like any web browser. On 10/12/05, Tommy Jensehaugen <[EMAIL PROTECTED]> wrote: > Thank you very much. This is what I ended up with if anyone needs it: > > function runSeparateThread($strHost, $

[PHP] Re: Store a variable name in a database field.

2005-10-12 Thread cc
Most likely you are using some template system that require using of {{whatever}} as template varibles. if you want to change {{whatever}} to something else, maybe you should configure your template processing as well, just let it not to find {{whatever}} but the pattern you prefered, and also re

[PHP] Re: ampersand in dom with utf-8

2005-10-12 Thread cc
both `è' and `î' are not entities in charset utf-8, use `è' and `î' instead. On 10/13/05, jonathan <[EMAIL PROTECTED]> wrote: > I'm now getting this error: > > XML Parsing Error: undefined entity > > with the following entity at the first ampersand: > farm lettuces with reed avocado,

[PHP] Re: Removing Items from an Array

2005-10-12 Thread cc
> working. I've been staring at multi-dim arrays all day and am getting > tired, so I'll carry on tomorrow. > > Thanks again, > > Alan > > > -Original Message- > > From: Jochem Maas [mailto:[EMAIL PROTECTED] > > Sent: 12 October 2005 19:18 > >

[PHP] Re: ampersand in dom with utf-8

2005-10-13 Thread cc
and cilantro'); $dom = DomDocument::loadXML("$html"); On 10/13/05, Marcus Bointon <[EMAIL PROTECTED]> wrote: > On 13 Oct 2005, at 07:24, cc wrote: > > > both `è' and `î' are not entities in charset utf-8, use > > `&egrave;' and `&icirc;&#

[PHP] Re: include file to global scope

2005-10-13 Thread cc
the answer cc wrote: > yes, its possible, consider this: > > /** > * @param $file_to_include path to php file you want to get its content > * @return included contents > */ > function get_output($file_to_include){ > ob_start(); > include $file_to_include; >

Re: [PHP] First PHP

2002-11-29 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Khalid El-Kary) wrote: > http://www.php.net/manual/en/history.php#history.php First public announcement of PHP by Rasmus: <http://groups.google.com/groups?selm=3r7pgp%24aa1%40ionews.io.org> -- CC -- PHP General Mai

Re: [PHP] fullname

2002-07-30 Thread CC Zona
uot; ", $session); But that requires the proper foreknowledge. Simple concatenation, like above, is the safer bet. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] extending class then calling its original function

2002-08-01 Thread CC Zona
> > for example in Delphi I say: > > > > procedure TMyExtendedClass.Proc1; > > begin > > // do new stuff here > > inherited; // calls the TMyClass.Proc1; > > end; > > Yes. $answer.="http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php"

Re: [PHP] include hassle

2002-08-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Lallous) wrote: > how can i programmatically set the include path? http://php.net/ini-set -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Include php code as variable

2002-08-03 Thread CC Zona
you're saying "include") into a variable: file(), fread(). eval() can execute the value of a variable as PHP code. http://php.net/include http://php.net/file http://php.net/fread http://php.net/eval -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: flaking out on foreach

2002-08-27 Thread CC Zona
echo "$foo"; > } > ?> > > Rendering only "6". That's it. Just "6". What am I missing here? What do you see in the HTML source view? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] register_global variables on Mac OS X

2002-10-08 Thread CC Zona
options. Or do as others have recommended and download a prewritten one from php.net and place it in the designated location (renamed to "php.ini" if necessary). Or see the configuration page <http://php.net/configuration> for descriptions of other alternatives (ini_set(), .htaccess).

[PHP] Re: Regular Expressions Help

2002-06-05 Thread CC Zona
it delimits a range; to use it as a literal, make it the last character in the character class. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: preg_replace

2002-06-16 Thread CC Zona
ession 'constant("$2")' with anything, so lose the extra periods. Parentheses aren't needed around the equals signs, so you might as well drop those too. Ex: preg_replace('/=([A-Z0-9_]+)=/e', 'constant("$1")', $foo); -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: translate perl unpack to php equivalent

2002-06-16 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Danny Kruitbosch) wrote: > How would I translate this perl unpack statement to the php equiv. > > my ($salt, $xor) = unpack('a2 a*', $something) http://php.net/unpack -- CC -- PHP General Mailing List (http://www

[PHP] Re: Is this a BUG?

2002-06-23 Thread CC Zona
OST_VARS['user']; } adduser(); If this is the problem you're having, you can find more information at: http://php.net/variables.scope http://php.net/global -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to put these 2 IF statements into 1, with regex?

2002-06-30 Thread CC Zona
reliable results. Otherwise, you're going to eventually end up with unintended matches like "siteUserList9cggroup=site177&". Regarding the rest of your question: the "?" character is what you seek. if (preg_match("/siteUserList\.cgi\?group=site177&?/&quo

[PHP] Re: PHP with CSS

2002-06-30 Thread CC Zona
ng "standards mode"? (If any of this sounds unfamiliar, you can follow-up with a newsgroup or list where CSS is on-topic, such as <news:comp.infosystems.www.authoring.stylesheets>.) Good luck! -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: preg_match or not?

2002-07-06 Thread CC Zona
ash, or included within a square-bracketed character class; you don't need to do both. The {1} is implied; you don't need it. if (preg_match("/^\d+(\.\d{2})?$/", $form_data[amount])) {echo "Validated!";} else {exit("That's not a dollar amount.");} -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Does not work

2002-07-14 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Saci) wrote: > I tried this simple code > > > > Page refered by > echo $HTTP_REFERER.''; > echo $_SERVER['HTTP_REFERER'].''; > ?> > > > > and I receive blank reply even if referenced from a link from other site. > > What am i doing wrong

[PHP] Re: Regular expression for correcting proper nouns

2002-07-17 Thread CC Zona
would give "A B C D E". Yes. Again, character classes will be your friend, as will preg_replace(). Just decide which of the whitespace characters you mean to include in that definition of "multiple spaces"... -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: preg_replace_callback

2002-07-17 Thread CC Zona
I recall correctly (which I may not), an example would look something like this: $output=preg_replace("/(\w+)/f","'***' . strtolower($1) . '***'",$input); -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: mod_rewrite problem

2002-07-18 Thread CC Zona
{HTTP HOST} ^www\.[^.]+\.mysite\.ie$ > RewriteRule ^(.+)%{HTTP HOST}$1 [C] > RewriteRule ^www\.([^.]+)\.mysite\.ie(.*) > http://www.mysite.biz/users/sites/$1 Change each of those instances of "^www\." to "^(www\.)?" -- CC

[PHP] Session cookies appearing where there is no session

2001-01-15 Thread CC Zona
ac865d4a9d8e6f; path=/ Expires Thu, 19 Nov 1981 08:52:00 GMT Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma no-cache -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

Re: [PHP] Session cookies appearing where there is no session

2001-01-15 Thread CC Zona
(responding to myself) In article <93uoh9$613$[EMAIL PROTECTED]>, [EMAIL PROTECTED] (CC Zona) wrote: > This must sound pretty far-fetched, but as far as I can tell, my site is > attempting to set a session cookie from any and all PHP pages, even when > the page has no ca

Re: [PHP] FW: Cookies, Dammit!

2001-01-17 Thread CC Zona
auto-append feature for that one page. Then the people who need to tinker with the HTML could do so freely without the possiblity of messing with the include; in fact, they'd never have to know about the include file's existance, it'd just happened "automagically" as

Re: [PHP] db backup script needed

2001-01-18 Thread CC Zona
In article <DC017B079D81D411998C009027B7112AA93458@EXC-TYO-01>, [EMAIL PROTECTED] (Maxim Maletsky) wrote: > anyway, is there any script like that (fast and dirty is ok) to run on > MySQL, PHP4.0.2 ? What about putting a mysqldump call into a crontab? -- CC -- PHP General Mailin

Re: [PHP] Ethics question...

2001-01-18 Thread CC Zona
quite the same factoid as you were seeking, but it does show that not everything with a shiny M$ logo on it is necessarily built with M$ products. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: [PHP] Help w/ regular expressions for banned words

2001-01-20 Thread CC Zona
tick with the for() and you know the index numbers will always be sequentially zero to whatever, then your test should be just $i<$num. Otherwise, you're skipping the final loop.) -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] " " charactor problem

2001-01-21 Thread CC Zona
That function is for turning a string into an array; if it's already an array, then just get rid of the split() and do your count() on $thelinefromfile. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Need key() equivalent for string variable

2001-01-22 Thread CC Zona
each($options_array as $option) { echo '$option\n"; } echo "\n"; } Thanks! -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Need key() equivalent for string variable

2001-01-22 Thread CC Zona
ho $foo //"bar" echo [something] //"foo" I ended up doing a clumsy workaround by altering $foo-- $foo="bar" $foo=array("foo"=>$foo) echo $foo[key($foo)]; //"bar" echo key($foo); //"foo" --but then I'm having to tell PHP the very info

Re: [PHP] check null value

2001-01-23 Thread CC Zona
whatever it is, is it correct to do this? > > if (empty($fieldname)){ > $fieldname ="na"; > } You might also want to throw in a check for !isset($fieldname), either before the check for empty() or concurrent with it. -- CC -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] error with REPLACE or UPDATE

2001-01-24 Thread CC Zona
, AUTHOR = \"$author\", PUBLISHER = \"$publisher\", DELIVERY > = \"$delivery\", QTY = qty\", PRICE = \"$price\", TOTAL_PRICE = > \"$total_price\", DATE = \"$date\", RECORD\"$record\" WHERE RECORD = > \"$record\"&quo

[PHP] --with-mysql, yet mysql_errno() is "undefined"?

2001-01-24 Thread CC Zona
x27; '--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--enable-trans-sid' '--with-xml=/usr' '--enable-debugger' '--enable-ftp' '--with-ttf' '--with-jpeg-dir=/usr' '--enable-bcmath' '--ena

Re: [PHP] Genuine Opportunity

2001-01-25 Thread CC Zona
must be a more effective solution. Does Ezmlm support some form of spam-filtering, perhaps? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] file handle error? or something else?

2001-02-24 Thread CC Zona
brake' stuff? 'brake' is used as a constant, but you don't show what it's defined as. I assume what you're going for is an 'or die()' function call...? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: [PHP] extract() help

2001-02-24 Thread CC Zona
w['headline'], just as the columns would have those names if you ran the query at the command line. (BTW, I find that doing a var_dump() or print_r() on variables--such as $row, in this case--to be very helpful when data isn't coming out in the way I expected it to...) -- CC

Re: [PHP] Unwanted Characters

2001-02-24 Thread CC Zona
needs to be filtered and reprinted as: > > "The car ran over my dog" And you might also want to look at strtr() <http://php.net/manual/en/function.strtr.php>. You could, I suppose, use it to substitute some character that you know would never legitimately appear in $so

Re: [PHP] Join causing Error?

2001-02-25 Thread CC Zona
BY >qorder",$db); > > Works perfectly? Sounds like the 'while' loop is failing because mysql_query isn't returning to $result what you think it is. Add some error-checking, starting with at least an "or die(mysql_error())" on the query. Al

Re: [PHP] so what program?

2001-02-25 Thread CC Zona
ou get a dual-boot Mac--giving you all the advantages of Mac PLUS all the advantages of Linux in one box. Not bad, eh? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

Re: [PHP] How to wrap output of formatted text

2001-02-27 Thread CC Zona
t that don't > wrap in the browser, how can I force them to wrap at the edge of the browser? You already discovered the wordwrap() solution. The html solution looks like this: if ($row[0] != "") { echo "$row[0]"; Cheers! -- CC -- PHP General Mailing

Re: [PHP] Caller's __LINE__

2001-02-28 Thread CC Zona
("hello!!!"); > > is there is anyway to show the caller's line number? in this case 'x' ? Pass __LINE__ to the function as one of its arguments: function debuginfo($msg, __LINE__) { echo"the message is $msg, at line" . __LINE__ . " "; } -

Re: [PHP] checking for a defined function

2001-02-28 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Eric Peters) wrote: > how can I do something like > > if(!defined(cybercash_encr())) dl("cybercash.so"); > > anyone know of a good way to see if a function/module has been included in > php? function

Re: [PHP] Pluralize a word for searching a database

2001-02-28 Thread CC Zona
lized words; > > } Maybe by posting a lookup to an online dictionary, and parsing out the returned definition for the plural wordform...? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] multiple query in 1 select ?

2001-02-28 Thread CC Zona
clause can have multiple conditions such as "WHERE state='FL' or state='GA'", which means if a record matches either of the two possible conditions, then that record will be displayed. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail

Re: [PHP] Need Function generating integers

2001-03-01 Thread CC Zona
ary of a table in a mysql database Mind if I ask why you don't want to use let mysql do that by assigning "auto_increment" to the field? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: [PHP] The neverending Session

2001-03-01 Thread CC Zona
;t know anything about a (client-side) browser window being closed. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] HREFs that can't be

2001-03-01 Thread CC Zona
; oddball question: > > How can I (is it even possible) pass those variables > to each page w/o using GETs and w/o using Cookies. POST. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] HREFs that can't be

2001-03-01 Thread CC Zona
#x27;s even a way to configure your php.ini file so that PHP includes the hidden SID for you. I forget which setting it is--maybe "trans-id" or something like that...? Poke around in the the "configuration" chapter of the manual; it's in there. -- CC -- PHP

Re: [PHP] HREFs that can't be

2001-03-02 Thread CC Zona
e the "configuration" chapter of the manual; it's in there. > > > That won't work. Clicking on a link does not trigger sending of fields > (hidden or not). > > > There are only three places you can pass data without using forms, and > using buttons, or i

Re: [PHP] Simple question!!!

2001-03-02 Thread CC Zona
is some configuration parameter to the PHP server to send the rest > of HTML code after exit the script or workaround? Is it an option to just move the code below the tag? Another option would be to echo the closing tags from within the conditional, prior to calling the die(). I believe output

[PHP] Extract() with 2D array

2001-03-03 Thread CC Zona
, but don't specify whether or not the array can have more than one dimension. Since I'm having trouble making this work, I have a feeling the answer is no, but wanted to double-check in case it's actually my code that's at fault. TIA! -- CC -- PHP General Mailin

Re: [PHP] Inserting DATE in mySQL!!

2001-03-05 Thread CC Zona
urpose','$res > '); > $result = mysql_query($sql) or Die ("An unexpected > error occured. Please go back and book again."); > ?> Your value for the variable "sql" isn't enclosed in quotes. BTW, tracking down problems with a sql query gets easier when you give yourself a more informative die() message, such as: or die ("MySQL says: " . mysql_errorno() . " " . mysql_error() . "\nPHP says: $errormsg"); -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] help functions

2001-03-05 Thread CC Zona
this built-in help file, wouldn't the same information be readily available in the online manual? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Inserting DATE in mySQL!!

2001-03-05 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Hardy Merrill) wrote: > > or die ("MySQL says: " . mysql_errorno() . " " . mysql_error() . "\nPHP > ^ > > Just a technicality, but I think I remember thi

Re: [PHP] Quick Regex Question

2001-03-05 Thread CC Zona
Like: > > blah,blah,blah "Does it have *any instance where a string of letters is separated only by a comma?" preg_match("/[a-z]+,[a-z]+/i",$text) "Does it consist *entirely of strings of letters separated only by comma?" preg_match("/^[a-z]+,[a-z]+$/i&quo

Re: [PHP] Still an Almost working Regex

2001-03-06 Thread CC Zona
normally matches any single character from the list (but see below). If the list begins with `^', it matches any single character (but see below) not from the rest of the list." "To include a literal `]' in the list, make it the first character (following a possible `^').&q

Re: [PHP] removing and item out of a string

2001-03-06 Thread CC Zona
quot;1,234.56"); Possibly because the function is called ereg_replace() ... But since you're not doing any special pattern matching, you might as well use a simple str_replace(',','','1,234.56') instead. -- CC -- PHP General Mailing List (http://www.php

Re: [PHP] HELP with Multi Dimensional Array Problem

2001-03-08 Thread CC Zona
echo $email; echo $url; ? Otherwise, if you want to stick with the original method, I believe you would use something like: $name="['field']['text']['email']"; //index names quoted, brackets added echo $HTTP_GET_VARS$name; //brackets dropped -- CC -- PHP

Re: [PHP] Error codes from 'mysql_error()'

2001-03-08 Thread CC Zona
y can't I? Where are the calls placed? mysql_error() or mysql_errno() can only be used after a valid mysql connection has been established, so for instance this will not return an error message from mysql: mysql_connect(stuff) or die(mysql_error()); -- CC -- PHP General Mailing List (http

Re: [PHP] Multiple Inserts

2001-03-09 Thread CC Zona
ent,$connection) or die ("Problem " . mysql_error() ); //moved 'or die' here, using more detailed info -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] search a text file

2001-03-12 Thread CC Zona
t; > Is it possible to extract these lines of information based on the text > surrounding them? Sure. preg_match() would be one way. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To conta

Re: [PHP] search a text file

2001-03-12 Thread CC Zona
match_text); In which case, $status would evaluate to true if a (case-insensitive) match was found, and $match_text[1] would contain " little lamb, its ". -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] In my attempt to read from a text file...

2001-03-12 Thread CC Zona
o I'm trying to > > preg_match("Peter",names.txt,$myname) > > then do the same for Fred, and grab all the stuff in between. > > Is this the right way to do this? Nope. (But see the example in my response to your previous post on the same topic.) -- CC -- PHP

Re: [PHP] search a text file

2001-03-12 Thread CC Zona
iable as the second argument to preg_match(). -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Getting location bar and stripping file-ending of a string..

2001-03-13 Thread CC Zona
ion 2: strpos() & str_replace() Option 3: ereg_replace() or preg_replace() -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Finding existence of a value in a table

2001-03-13 Thread CC Zona
;limit 1' is helpful. > SELECT FieldValueIn, COUNT(*) FROM TableOfInterest WHERE > FieldValueIn=ValueOfInterest GROUP BY FieldValueIn; > > I can't seem to figure out how to test the return results to see if > there is no rows with that value. http://www.php.net/mysql-n

Re: [PHP] that whole system() thing again

2001-03-15 Thread CC Zona
ng two of the more obvious targets for this. Call phpinfo() to check whether a global or local setting is preventing those functions from running. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Stripping Single Quotes

2001-03-15 Thread CC Zona
lso contain legit single-quotes (such as as an apoostrophe), you can simply use str_replace(). Otherwise, either str_replace() with strpos() -- to search/replace only on 2nd char and 2nd-to-last character -- or good ol' preg_replace() by itself. -- CC -- PHP General Mailing List (http://ww

Re: [PHP] just wondering ....

2001-03-18 Thread CC Zona
o test whether mail() returned true? if (mail(values)){ do this } else { error } (Keeping in mind that when mail() returns true, it's not saying whether the mail really reached the destination server, only that it the function executed successfully.) -- CC -- PHP General Mailing List (

Re: [PHP] Couple Questions

2001-03-20 Thread CC Zona
one could write their own HTTP_REFERER simply by using fsockopen(). Thanks to PHP's ease of use, using fsockopen does not require one to have the skills of a "dedicated cracker". (Relying on HTTP_REFERER for any security-related check is generally considered a Bad Idea.) -- CC

Re: [PHP] Couple Questions

2001-03-20 Thread CC Zona
In article <9984hb$c4e$[EMAIL PROTECTED]>, [EMAIL PROTECTED] (CC Zona) wrote: > And while I haven't actually tried this, I assume that anyone could write > their own HTTP_REFERER simply by using fsockopen(). Thanks to PHP's ease > of use, using fsockopen does no

Re: [PHP] mail() question

2001-03-20 Thread CC Zona
" is a slash followed by the letter n. "\n" is a newline on *nix system (Unix, Linux, etc.). "\r\n" is a Wintel linebreak. It's also the standard for linebreaks within emails. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMA

Re: [PHP] enum and set possible values

2001-03-20 Thread CC Zona
unction > that will return an array of strings containing those possible values. > > Does such a function exist? > > I suppose if not it would be possible to write one from the output of a "show > columns from X" query... You do the latter. -- CC -- PHP General Mai

[PHP] Catch timeouts

2001-03-20 Thread CC Zona
me to the right function, or suggest an alternative method for catching those timeouts, I would be grateful. TIA! -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrato

Re: [PHP] Catch timeouts

2001-03-20 Thread CC Zona
In article <998dqa$akd$[EMAIL PROTECTED]>, [EMAIL PROTECTED] (CC Zona) wrote: > I could have sworn I once saw a function that would check whether the > script was being cancelled because a timeout had occured, thereby allowing > you to make a more graceful exit from the scr

Re: [PHP] PCRE vs. POSIX

2001-04-15 Thread CC Zona
tended in php4? PCRE. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] MySQL Query Question

2001-04-15 Thread CC Zona
assume that 'date' is a reserved word, so it may be confusing mysql. In which case, try using a different alias, like 'f_date". -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] fwrite not writing

2001-04-15 Thread CC Zona
le's modification date is even updated. But the file remains empty. I'm probably missing something ridiculously obvious, but would someone please be kind enough to point out what it is? Thank you!! -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [

Re: [PHP] MySQL Query Question

2001-04-15 Thread CC Zona
sts Questions about making PHP & MySQL play nice with each other...it's a judgement call. IMO, the PHP-DB list is the best (certainly the most thematically appropriate) place for PHP/MySQL integration issues, but YMMV. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] fwrite not writing

2001-04-16 Thread CC Zona
rest (which it does--except the content it fetches never makes it into the file it writes to. How that can be, I dunno, but that apparently is what it's doing...) > Add this above your if loop: > > $filesize = filesize($filepath); > echo $filesize; Already tried echoing that

Re: [PHP] dates

2001-04-16 Thread CC Zona
mysql_fetch_array($result); > print "$b[name]"; > } > } Which of the queries are you concerned with, 'cuz on that second query you're only fetching array $b once. Wrap a while() loop around it like you did with array $a if you want more rows.

[PHP] What does "url_rewriter.tags" do?

2001-04-16 Thread CC Zona
to be the only reference to it in the PHP.net docs. What does it do? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] What does "url_rewriter.tags" do?

2001-04-16 Thread CC Zona
PHPSESSID does also get added to forms as a hidden input. Anyway, at least now I have a general idea of its purpose. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] fwrite not writing

2001-04-16 Thread CC Zona
s it does. Right now, unfortunately, the file remains empty. I'm trying to fill it with a large block of dynamically generated HTML which will then be used as a static include file for current and subsequent requests. > "CC Zona" <[EMAIL PROTECTED]> wrote in message >

[PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread CC Zona
; //ok include("/path/to/directory/test.inc"); //NOTHING! echo "...End include"; //ok (Checking from the commandline, the file is definitely being set to empty. It's writing an empty string to the file instead of writing the specified content.) -- CC -- PHP Genera

Re: [PHP] include files with PHP 3.0.16

2001-04-16 Thread CC Zona
function.virtual.php -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread CC Zona
ty string on the next pass). No to those too. > - Original Message - > From: "CC Zona" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, April 16, 2001 5:34 PM > Subject: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, > Apache/1.3.14

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread CC Zona
in case something wasn't really optional. Of course the third argument actually belongs to fopen(). Though it shouldn't be needed there either. (And yup, I just double-checked and it doesn't work without the typo either. ) -- CC -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread CC Zona
n choosing its own content to write in place of mine. I've pored over phpinfo and php.ini trying to find a config setting that might be causing this weirdness, but so far nothing seems obvious. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECT

Re: [PHP] Is there such an array like $array[][]?

2001-04-17 Thread CC Zona
g or counting the elements of the first dimension, but PHP does provide other functions which allow for effective handling of more dimensions (ex. array_multisort()). -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

  1   2   3   4   5   >