Re: [PHP] problems with round ..

2001-06-27 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Chad Day") wrote: > $BLAH = round($BLAH, 2); > > Spits out a wrong parameter error. I've tried quotes around the variable, > the parameter, and any combinations, but it still pukes on me. Why can't I > specify a precision? According to the

Re: [PHP] Problem with returning value from function

2001-06-27 Thread CC Zona
> > You're returning a value to nowhere. Change"proce($line)" to > > "$returnedvalue=proce($line)". > Or if you want to keep your code as is just define proc() as: > > function proce(&$line) { } Or use "global $line;" or add $line to the $GLOBALS array, so that the function's local chang

Re: [PHP] Strange error on mysql_fetch_array

2001-06-27 Thread CC Zona
In article <046401c0fee3$a6c789e0$6401a8c0@Lynchux100>, [EMAIL PROTECTED] ("Richard Lynch") wrote: > > $result_id = @mysql_query("DESC $table_name $field_name"); > > I don't think "DESC $table_name $field_name" is valid SQL, is it?... > > DESC is DESCENDING in an ORDER BY clause... > > Pe

Re: [PHP] How to get PHP to do a POST??

2001-06-27 Thread CC Zona
In article <046101c0fee3$a5d4ec80$6401a8c0@Lynchux100>, [EMAIL PROTECTED] ("Richard Lynch") wrote: > > tried it on my own server and found that php assigns the values 'name_x' > and > > Those are really name.x and name.y in HTTP, but since "." is not allowed in > a PHP variable name, you get "_

Re: [PHP] extract data from html

2001-06-28 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Adrian D'Costa") wrote: > 1.Open the html file in read only mode > 2.Start reading the html file till I encounter a tag (I don't know > how to do this) > 3.Grab that data after the tag (and then what?) See

Re: [PHP] Postcard/Tell a friend app

2001-06-29 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Michael O'Neal) wrote: > So, on to the next question. Has anyone seen an app that can send digital > cards, where a user can choose their picture, and add whatever text and font > they want, then send to as many people as they want? Some conve

Re: [PHP] extract data from html

2001-06-29 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Adrian D'Costa") wrote: > > > 1. Open the html file in read only mode > > > 2. Start reading the html file till I encounter a tag (I don't know > > > how to do this) > > > 3. Grab that data after the tag (and then what?) > > > > See

[PHP] Numerical refs to assoc array suddenly "undefined offset"??

2001-06-29 Thread CC Zona
This is weird. Did I only imagine that PHP allows numerical referencing of associative array elements? 'Cuz suddenly the parser is calling all the numerical references "undefined". ex. $my_arr['foo']='first'; $my_arr['bar']='second'; $my_arr['more']='third'; echo "" . $my_arr

Re: [PHP] newbie has include path error

2001-06-30 Thread CC Zona
In article <001a01c100cd$3146be20$033a22c7@daniel>, [EMAIL PROTECTED] ("Daniel Goldin") wrote: > Warning: Failed opening '/etc/httpd/php/prepend.php' for > inclusion (include_path=") in unknown in line 0. > > I've tried putting in this include path in my php.ini file to no effect.

[PHP] Re: Question about strlen I think

2001-07-15 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dennis Kaandorp) wrote: > Is there a way to replace the spaces between the paths? > This is what I mean: > /uploads//by/ /dennis/ > must become > /uploads/<4sp>/by/<3sp>dennis/ See . You can use the "e" or "f"

[PHP] Re: I want to learn this!

2001-07-15 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Minardi Boy) wrote: > I've downloaded the manual at > php.net but this wasn't very satisfying as I really don't like reading lots > of complicated stuff on the screen of my laptop. Then print it. No kidding. I'm all for conserving paper, but

[PHP] Re: Question about strlen I think

2001-07-15 Thread CC Zona
th']); function replace_func($arr) { ... } > argh.. it was to complicated for me :( > Can you help me with this? > $ftpdata['path'] = preg_replace($ftpdata['path']); > Thnx > > "Cc Zona" <[EMAIL PROTECTED]> wrote in message > [EM

[PHP] Re: string search

2001-07-16 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (J Smith) wrote: > > I need a search function (if statement) that performs a search on a string > > and if the string contains something like "aol.com", performs another > > function. Can anyone help me? Thanks. > > > > Joseph > > > > Try rese

[PHP] Re: Strange wierd problem

2001-07-16 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Tom Malone) wrote: > I am using sessions to track visitors to my site, and one of the things I'd > like to do is add a time-stamp to each entry in my MySQL database. The > problem is that, for some reason, the time-stamp part only seems to work

[PHP] Re: Regular expressions

2001-07-18 Thread CC Zona
In article <000b01c10f4a$d569c5c0$0300a8c0@sparlak>, [EMAIL PROTECTED] (Philip Murray) wrote: > In Perl you can do this: > > $foo =~ tr/012/mpf/; > > Which is the same as: > > $foo = str_replace("0", "m", $foo); > $foo = str_replace("1", "p", $foo); > $foo = str_replace("2", "

[PHP] Re: Simple validation problem

2001-07-18 Thread CC Zona
In article <00ef01c10fa5$fd20f2e0$e064fea9@py>, [EMAIL PROTECTED] (Py) wrote: > I am trying to make shure the amount is positive if($amount >0) {...} > and is a float if(is_float($amount)) {...} -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL P

Re: [PHP] Re: split on whitespace, preserving whitespace... (a rephrase of the question)

2001-07-20 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Garth Dahlstrom) wrote: > > $sometext2split = "hello world witha lot ofwhitespaces!"; > > $myarray = preg_split ("/\s+/",$sometext2split); > > > > you should get > > $myarray := ['hello', 'world', 'with', 'a', 'lot', 'of', 'whitespa

[PHP] Re: regex for cleaning up username

2001-07-22 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dave) wrote: > Cannot seem to get a regex to check a string for the following > > space tab ' " ! @ # $ % ^ & * ( ) + = : ; / \ > > if(preg_match('[\'" ,!@#$%\^&*()+=:;/\\]',$mystring)) You need pattern delimiters with preg_* expression

Re: [PHP] regex for cleaning up username

2001-07-22 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dave) wrote: > Am partially successfull after taking a further look into things. the > following > (while ugnly) correctly catches everything except the \ character for some > reason. ideas? > > if(preg_match("/['".'" ,!@#$%\^&*()+=\/\\:;?|]

[PHP] Re: ereg_replace

2001-07-25 Thread CC Zona
In article <079201c1151f$ec6472e0$650a@cicse>, [EMAIL PROTECTED] (Clayton Dukes) wrote: > Can someone tell me why this doesn't work? > > $home street = ereg replace (" " , "+" , $home street); > > The input is "123 happy trail" > I need the output to be "123+happy+trail" Using an ereg her

Re: [PHP] Newbie Help (CLASS WAR!)

2001-07-27 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Brian White) wrote: > There are times when I would really like to be able to do: > > class A > { > function DoStuff() > { > . > } > } > > class B extends A > { > function DoStuff() > { > . >

Re: [PHP] Regex question

2001-07-31 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Boaz Yahav) wrote: > In case anyone is interested, eregi("HTTP/1.[01].302",$output) seems to > work :) "." == "any character" (including, but not necessarily, a period). If you want to match a period, escape it or put it in square braces: e

Re: [PHP] Re: include_once vs require_once

2001-07-31 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mike Cullerton) wrote: > so the difference is _when_ they happen. > > ok, another question then. > > if my script includes the line > require_once($file); > > and $file contains the line > include_once($other_file); > > what happens then?

Re: [PHP] Example high-profile PHP sites

2001-08-01 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Ralph Guzman) wrote: > Incase you still need it. Here is a big one I forgot to mention: > > http://www.dialpad.com/ > > Not sure how much of their site is PHP, but their user registration and > member backend is PHP driven. Entertainment site

Re: [PHP] Get when it should be Post

2001-08-01 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christian) wrote: Are you quoting the attribute in the real markup (method="POST"), or is like you show below? (It might help to throw the whole page at an html validator either way,'cuz even if that line is syntactically valid, there may be

[PHP] Re: mysql_numrows

2001-08-06 Thread CC Zona
In article , [EMAIL PROTECTED] (Ajdin Brandic) wrote: > I'm trying to get number of rows from a query. All works fine until > the result is 0. Then query executes fine, returns 0 rows but mysql_numrows > failes. > > $query="select * from myt

Re: [PHP] regexps

2001-08-08 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Scott) wrote: > here are two regexps that might do what you want > > "\w" matches alphanum (1-9a-zA-z) (0-9a-zA-Z_) actually. Don't forget that zero and underscore! > IMO, the best way to check for non-alphanum chars is > to check for "\W" (

Re: [PHP] Problems with split

2001-08-13 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dan Lowe) wrote: > > $invdate = "14.8.2001"; > > echo "$invdate\n"; > > list($day, $month, $year) = split(".", $invdate); > > echo "$year-$month-$day"; > > --- > > Somehow, the second echo outputs only "--" as it should be "2001-8-14". > > Any i

Re: [PHP] space in strings

2001-08-13 Thread CC Zona
In article <001301c12476$3420f300$82602c3f@2pqjp01>, [EMAIL PROTECTED] (Jack Dempsey) wrote: > > that removes trailing space - but is there one that removes ALL spaces > > from a string? Like: > > > > $string = "this is a string"; > > rmspc($string); > > // $string is now "thisisastring" > $st

[PHP] Re: "searching" arrays

2001-08-14 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Raphael Pirker) wrote: > Is there a possibility to search arrays in PHP? Yes, and you'll never guess what it's called! (Hint: see ). -- CC -- PHP General Mailing List (http://www.php.net

[PHP] Re: problem with a hacker

2001-08-16 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Craig Henderson) wrote: > Today a hacker managed to overwrite the text file I was using to > store all the messages, which really isn't that big a surprise considering > the permissions to the folder it is kept in are wide open thanks to my > ho

[PHP] Re: virtual() ignoring str_replace()

2001-08-19 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Charlie Romero) wrote: > it just prints the virtual include w/out replacing > the word "window" w/ the word "DOG" in my example. What am I doing wrong? > > $results = virtual("/cgi-bin/search.cgi?q=hello&m=world"); > print str_replace("window",

[PHP] Re: array in and out

2001-08-19 Thread CC Zona
In article <010101c1291b$378fa0a0$[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Chris Schneck) wrote: > function print_keywords() > { > echo ($mykewords); > } $mykeywords is a global var; it's undefined in the function's local scope. Either pass it into the function a

[PHP] Re: option tags and WHILE

2001-08-19 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Cgi Guy) wrote: > What's wrong with this code? I keep getting a parse > error at the form/select lines... > print ("$array[1]\n"); See if adding curly braces, {$array[1]}, doesn't work better for you. -- CC -- PHP General Mailing List (ht

[PHP] Checking FTP server response

2001-08-20 Thread CC Zona
To test for a valid http address, I open a socket, pass a HEAD or GET request, and look for a status code in the response headers. What should I send to an FTP server to do a similar test? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

[PHP] Re: mySql_fetch_array($result) question.

2001-08-21 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mehmet Kamil Erisen) wrote: > I have a form that has more than one drop down lists. I > like to use the mysql_fetch_array($result) to populate the > select options. > The problem is that after the first use, the > mysql_fetch_array($result) doe

[PHP] Re: Not allowing same value in array. Example requested

2001-08-21 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (James C. Montz) wrote: > Can someone show me how I could walk through each value (a random number) in > an array to make sure no 2 are the same? -- CC -- PHP General Mailing List (http:/

[PHP] Re: sockets question

2001-08-21 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Gregor Jaksa) wrote: > i have login.php where i do > $socket_handle = fsockopen($server, $port); > > now in add.php i would like to send msg to $socket_handle socket... include("login.php"); has more info. -- CC

[PHP] Re: Newsgroup?

2001-08-22 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christopher Raymond) wrote: > Is this PHP listserve available as a newsgroup? I'm getting tired of > managing this much mail everyday. I'd like it a bit simpler. news.php.net -- CC -- PHP General Mailing List (http://www.php.net/) To unsubs

[PHP] Re: Displaying all variables currently set?

2001-08-25 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Ken) wrote: > Is there a way to get PHP to list the names and/or contents of all variables? http://php.net/manual/en/function.get-defined-vars.php -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTEC

[PHP] Re: how to sort search results by relevance?

2001-08-27 Thread CC Zona
In article <3B8A1D6A.4295.2947D@localhost>, [EMAIL PROTECTED] (Yura) wrote: > How to sort search results of php-mysql site by relevance? See the mysql manual's chapter on FULLTEXT indexes. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

[PHP] Re: About the $allowed problem

2001-08-27 Thread CC Zona
In article <030d01c12f2f$49ca7d20$0b01a8c0@ANDreY>, [EMAIL PROTECTED] (Andrey Hristov) wrote: > session_start(); > if (!session_is_registered("allowed")){ > $allowed=3306; > session_register("allowed"); > } > var_dump($allowed); > ?> > > called with : > http://192.168.1.11/test2.php?al

[PHP] Re: MySQL query length

2001-08-27 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Niklas lampén) wrote: > Can it cause any problems if mySQL query is very long? I have to compare > many words to many fields in my DB and I've done it like > "Field LIKE '%searchword%' || Field LIKE '%searchword%' || Field LIKE > '%searchwor

Re: [PHP] The future of PHP or my 2 cents

2001-08-30 Thread CC Zona
In article <010001c1311e$d86ebb40$[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Matthew A. Schneider) wrote: > > Rather than whining about the future of PHP, why don't you be proactive > > and take on the goal of raising the $100,000 for the project? > Although Fred's comments appear rhetorical, the s

[PHP] Re: If i use preg_match() how can i preg_match next?

2001-08-30 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (_lallous) wrote: > If i have this string: "1 2 3 4 5 6 7 no more!" > and this regular expression: "([0-9]+)" > > now how can i run preg_match to get result by result until no results are > returned? -- CC --

[PHP] Re: 2nd Pass of array empty

2001-08-30 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Ben Edwards) wrote: > I have some code which loops through a n array using a for loop. This > works fine but if I try to loop through the array again in the same script > the array seems to be empty (i,e, the loop douse not do any interations).

Re: [PHP] help !

2001-08-31 Thread CC Zona
In article <67DF9B67CEFAD4119E4200D0B720FA3F70FCBC@BOOTROS>, [EMAIL PROTECTED] (Jon Haworth) wrote: > You need to add your PHP code to your HTML. I'm sure Dreamweaver allows you > to edit the HTML directly, but I don't know how I'm afraid. Yep, just use DW's "HTML Source" view (or open in Home

[PHP] Re: problem with ereg() and ereg_replace()

2001-09-01 Thread CC Zona
In article <01b201c13354$0ca601c0$0105050a@pony>, [EMAIL PROTECTED] (Stonix) wrote: > ereg_replace( "{key}", "word", $a_string); > > The web server will return following warnning msg: > > Warning: Invalid content of \{\} in /var/www/html/scrip.php on line # In regex, the curly braces are spec

Re: [PHP] newbie : how to access functions in seperate files???

2001-09-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aaron Moore) wrote: > Its obviously not finding it... my question is why the includes don't > work??? Make sure you have error_reporting set to E_ALL and display_errors turned on, then try running the script again. -- CC -- PHP General Mai

[PHP] Re: http get vars missing?? track vars enabled - HELP

2001-09-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (News.Fbcc.Com) wrote: > http://www.wayneswoodworks.net/test/samples.php3?&key=1 > > When I get into samples.php3 I do: > > $record = $HTTP_GET_VARS["key"]; > > echo "record=$record"; > > And the record variable is blank/missing. I have other

Re: [PHP] newbie : how to access functions in seperate files???

2001-09-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aaron Moore) wrote: > resides in line 6 of test.php where i try to call a function which is in > function.php > > the test.php file : > ___ > require("functions.php"); > function.php file : Umm, so is th

[PHP] Re: Problem with PHP_SELF

2001-09-03 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (David Otton) wrote: > I get a error - "Warning: Undefined variable: PATH_INFO in > [scriptname] on line 13" > > Is there any situation where such variables would be available to > phpinfo(), but not the rest of the script? Yes, where $PATH_INF

Re: [PHP] Newbie ?: why this error?

2001-09-04 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Vicki) wrote: > $db = mysql_connect ("hostname", "user", "password"); > > if (!$db) > { > echo "Error: Could not connect to database. Please try again later."; > exit; > } BTW, you can reduce that block down to a single line: $db = mysql_con

[PHP] Re: command line parser

2001-09-05 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Robert Lindgren) wrote: > Does anyone know if there's a php command line parser, > that lets you run php-scripts from the command prompt instead of running > them over http. (much like perl) http://php.net/manual/en/install.commandline.php --

Re: [PHP] mysql timestamp field

2001-09-06 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jason Stechschulte) wrote: > > I need an update on my table. but I have a timestamp field called > > t_stamp. When I update a field other than t_stamp field, t_stamp field > > also updates to now(). I need it not to update and saves its value. >

[PHP] Re: this newsgroup via newsgroup program?

2001-09-06 Thread CC Zona
In article <3B981E0F.25754.4210CA@localhost>, [EMAIL PROTECTED] (Chris Hayes) wrote: > from http://www.php.net/support.php i get the > impression that i can subscribe to this group via > news.php.net. Indeed i can collect a zillion > newsgroups via that server Then you're not looking at the

[PHP] Re: Table Search

2001-09-06 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Devon) wrote: > $result = mysql_query ("SELECT * FROM enet > WHERE TechContact LIKE '$TechContact%'"); You haven't fetched any rows, so the next line isn't coming from the query result. Use one of the mysql_fetch_*()

[PHP] Re: a general perl like pares of the query string...

2001-09-08 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aaron Moore) wrote: > Ok if you have a query string from like file.php?bob=manager&phil=employ > > how do i split the bob=manager and phil=employ dynamically? > > because i may have 2 or 3 elements and i just want to sepearte them all and > ac

[PHP] Re: Unique Array

2001-09-10 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Deirdre Mc Cann) wrote: > for ($i = 0; $i<100; $i++){ > $a[$i] = rand(0,9); > $test=$a[$i]; > } > > $ra = array_unique($test); > > I keep getting an error saying $test is the incorrect type. Can someone > please explain why

[PHP] Re: regexp (?:

2001-09-11 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Andrew Perevodchik) wrote: > ereg ("aaa(?:bbb|ccc)aaa", $string); > > It causes an error. However "?:" command is > documented in a manual of my version of PHP4. AFAIK, that is only documented in the preg_* chapter, and only applies to the pr

[PHP] Re: PERL TO PHP

2001-09-12 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Programmer) wrote: > Can anybody help me convert this perl code to PHP > > This line in particular > while( /hidden name=(.*?)>/gs ) while(preg_match_all("/hidden name=(.*?)>/s",$teststring,$matches) Note that /g is covered by the function it

[PHP] Re: $HTTP_POST_VARS

2001-09-12 Thread CC Zona
In article , [EMAIL PROTECTED] (Jochen Kaechelin) wrote: > Is this a secure way to check if some > data comes from a form-field of the > previous page, No. But as long as the user submits all of the necessary data, and the data passes your validation ch

[PHP] Re: Security

2001-09-12 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mat Marlow) wrote: > Does anyone know of a good place I can go to find information about > PHP/MySQL/Apache security issues and vulnerabilities? I know a couple of > security sites but are there any specific ones for this purpose? IIRC, php.net

[PHP] Re: Mail function....

2001-09-12 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Kyle Smith) wrote: > Can someone please just run me through the different sections of the mail > function please cause i understand you can change the from address etc aswell It's in the docs, examples and all.

[PHP] Re: Nesting / Associating Multiple Classes

2001-09-12 Thread CC Zona
In article <022301c13bcc$d489eaa0$3201a8c0@kadath>, [EMAIL PROTECTED] (Roy Wilson) wrote: > What is the best method to allow for nesting or > associating these two classes, so the second can refer to the first? http://php.net/manual/en/keyword.extends.php -- CC -- PHP General Mailing List (

Re: [PHP] if(isset($a)) vs if($a)

2001-09-15 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Andrew Perevodchik) wrote: > JD> isset checks to see if the $a variable has > JD> been set, ie, if it exists. if($a) checks for > JD> the truthood of $a, meaning, if it has a > JD> non-zero, non-null/empty-string value, then > JD> its true, else

[PHP] Re: Why doesn't this work?

2001-09-15 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Ray Van Dolson) wrote: > I'm trying to do: > > print split("=",$testString)[0]; Curly braces often seem to help in situations like these. Untried, but maybe this will do the trick for you: print {split("=",$testString)}[0]; -- CC -- PHP

Re: [PHP] if(isset($a)) vs if($a)

2001-09-16 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mark) wrote: > >if(isset($) and !empty($a) and !$a) > > this is the same as if(!empty($a)) > > >or > > > >if(isset($) and $a===FALSE) > > this is the same as if(empty($a)) (Aside from accidentally omitted the "a" in the var name...oops...)

Re: [PHP] if(isset($a)) vs if($a)

2001-09-16 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mark) wrote: > calling empty($a) does not give a warning. Sheesh. It doesn't at that. WTF? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

[PHP] Re: Call a script without a return

2001-09-19 Thread CC Zona
In article <005d01c140b6$67c19550$0105050a@pony>, [EMAIL PROTECTED] (Alex Shi) wrote: > Suppose we have a page and on it a button link to a backend > script. When click the button, at the server side the scritp will > be called. My question is, how can we program the script that > just let to do

[PHP] Re: DNS Checking and lookup

2001-09-22 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Chris Sacks) wrote: > Is there anyway I can use PHP to find out all the information in a DNS > Zonefile on a DNS server, in win2k, if you go to a dos prompt, and do the > following > > nslookup > server > ls -d See

[PHP] Re: display query results at random

2001-09-25 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Matthew Delmarter) wrote: > Let's say I "select * from table" (using mysql_fetch_object) and get 5 > results. I want to display the 5 results in different / random places > on the page. > > Place 1 - show details for record 3 > Place 2 - show d

[PHP] Re: sending multiple variables to external PERL script for results

2001-09-26 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dave Vanauken) wrote: > normally this would easily be solved passing the command as > $command="myscript.pl $name $phone $ccnum"; > $results=passthru($command); > and parsing out the argv's in the perl script > > however, this break

[PHP] Re: buffers...

2001-09-27 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Nic Skitt) wrote: > how do you flush the buffer in PHP? http://www.php.net/manual/en/ref.outcontrol.php -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

[PHP] Re: Warning: unexpected regex error (14)

2001-09-30 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Big5ive) wrote: > $list = split("|",$user, 3); > echo " align=left>$list[0]$list[1]$list[2]"; >?> > > > > > How can i fix this error? > Content of members.txt is > Big5ive|Admin|24.09.2001 > > The script should read the text

[PHP] Re: trying to get a list of functions used in a php script

2001-10-01 Thread CC Zona
In article <584FAB68EB77D511BEF500508BB9191217695D@ATLEXC01>, [EMAIL PROTECTED] (Howie Oakes) wrote: > I am working on a secure > implementation of PHP that will only allow certain functions to be used by > end users. (But I still want to have full functionality for other scripts, > so disable_

Re: [PHP] eregi

2001-10-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mike Cullerton) wrote: > eregi("^[a-z0-9_\-]+$",$string) > > notice that i had to escape the dash with a backslash Are you sure? 'Cuz AFAIK, escaping shouldn't be necessary on a hyphen which is the last char (or, IIRC, the first) of a charac

[PHP] Re: How can I suppress my variables from showing up in the address bar?

2001-10-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Salty Marine) wrote: > How can I suppress my variables from showing up in the address bar? I have > a form that's passing information to a script of mine, via the address bar. -- CC -- PHP General Mailing List (http://www.php.net/) To uns

[PHP] Re: Passing files from A to B

2001-10-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dirk Maetens) wrote: > Server A: > PHP 4.01pl2 > Safe Mode On > Not configured with ftp functions > > Server B: ftp access, no PHP (shame) > > On Server A I use output buffering to generate some simple HTML files. > So far so good. My problem

[PHP] Re: Passing files from A to B

2001-10-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dirk Maetens) wrote: > Server A: > PHP 4.01pl2 > Safe Mode On > Not configured with ftp functions > > Server B: ftp access, no PHP (shame) > > On Server A I use output buffering to generate some simple HTML files. > So far so good. My problem

Re: [PHP] Problem with a regex!

2001-01-27 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Zack Ham) wrote: > What I'm trying to do is run through it and replace {title} with an > appropriate value. I have tried running > ereg_replace("{$var}",$value,$string) and > ereg_replace("\{$var\}",$value,$string). Neither work. They eith

Re: [PHP] $DOCUMENT_ROOT

2001-01-29 Thread CC Zona
In article <039901c08a48$3d4b5740$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Toby Miller") wrote: > Whenever I include files in Apache I always do it like this: > > include($DOCUMENT ROOT."/folder/file.php"); > > However, now I am doing a site in IIS and I do not have $DOCUMENT ROOT at > my disp

Re: [PHP] expressions

2001-01-31 Thread CC Zona
[re-arranging quotes to bottom posting] In article <9556pp$sna$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Jeff Warrington") wrote: > > hi, im trying to fix this couple of hours but i couldnt find the > > mistake... can somebody look at it... > > > > first i want to check the $co_area for 3 digita

Re: [PHP] PHP news groups

2001-02-03 Thread CC Zona
In article <95i2ch$1u8$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("McShen") wrote: > I am just wondering if there are any PHP newsgroups like this one. There are several newsgroups on PHP, but the only one I'd recommend is the most active of them, . The others tend to have much less

Re: [PHP] reg-ex problem

2001-02-07 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Lee Stretton) wrote: > elseif( preg_match( "/^[a-zA-Z]+$/", $arg[$i], $matches ) ) > elseif( preg_match( "/(div\d|prem)/", $arg[$i], $matches ) ) > The first 3 work fine, but the last one "/(div\d|prem)/" doesnt work > proper

[PHP] preg_match() vs. preg_match_all()

2001-02-08 Thread CC Zona
What is the functional difference between preg_match() and preg_match_all()? I've puzzled over the manual descriptions for both, checked the list archives and faqts.com, and still can't figure out why they seem to return different results for the same pattern searches. TIA -- CC -- PHP Ge

Re: [PHP] Unexpected character in input: '\'

2001-02-09 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (CDitty) wrote: > Unexpected character in input: '\' (ASCII=92) state=1 > > Here is my code for the text file. > $file = "/path/to/my/server/$userid.win"; > $text = "\n"; > $fp = fopen($file, "w"); > fwrite($fp, $text); > fclose($fp); > > I am

Re: [PHP] Storing and getting variables between php functions?

2001-02-09 Thread CC Zona
In article <961qbm$hbj$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Kato Strandjord") wrote: > HI is it possible to do what i have shown with the 3 php files under? I want > that a variable stored in a another php file like this, and then i want to > get the stored variable from a 3rd php file. How

Re: [PHP] Problems with ! in mail();

2001-02-12 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Curtis, Lorenzo") wrote: > I don't think it's a bug in my code... I have gone through it > dozens of times and there are NO exclamation points... It may be in a variable or constant. Try doing a var_dump() or echo() on each. If you're sti

Re: [PHP] ereg problem

2001-02-14 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Janet Valade) wrote: > if (!ereg("^[0-9\-\+\.\ \)\(]{10,}$",$value)) { > > Can anyone tell me why this works for every character except the -. It > doesn't see the hyphen as a valid part of the phone number, even though it > recognizes the oth

Re: [PHP] ereg problem

2001-02-14 Thread CC Zona
[rearranging back to bottom-posting order, for clarity] In article <006d01c096b8$4b9cf3e0$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Charlie Llewellin") wrote: > - Original Message ----- > From: "CC Zona" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]

Re: [PHP] email.. (check this one out!)

2001-02-14 Thread CC Zona
In article <96euan$6g8$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("FredrikAT") wrote: > I want to set like a column width or something but without using HTML in > my email... There's a wordwrap() function--is that what you mean? -- CC -- PHP

Re: [PHP] error handling

2001-02-14 Thread CC Zona
In article <96faad$h9k$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Patrick Brown") wrote: > How can I disable the display of error to the browser window from within the > script? I want to do a redirect based on the error and cannot because header > info has already been sent. Use the "@" sign. Exa

Re: [PHP] gettimeofday() question

2001-02-14 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("James Moore") wrote: > I would suggest using somthing like > > srand((double)microtime()*100); > $unique_id = md5(rand(0,32000)); > > which is very effective for creating unique id's. Or use uniqid() -- CC -- PHP General Mailing List

Re: [PHP] concatenating strings and \n's for mail...

2001-02-14 Thread CC Zona
[restored to bottom-posting, for clarity] > > > I was trying to build up a multi-line body to use with the mail > > > command, using code similar to: > > > $mailbody = $mailbody . '\n' . $HTTP_POST_VARS["somefield"]; > > I think you can do it like this: > > > > $mailbody="$varname\n$

Re: [PHP] SELECT BLAH WHERE BLAH LIKE BLAH not working

2001-02-14 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Peter Houchin") wrote: > > > > > echo " BGCOLOR=\"#CC\" ALIGN=\"CENTER\">\n\n bgcolor=\"#006699\"> sans-serif\" size=\"3\" color=\"#FF\">Company "; > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > '%$quer

Re: [PHP] more on trimming

2001-02-17 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("..s.c.o.t.t..") wrote: > PS: if anyone out there is more familiar with PHP/regexps than i am, > could you please send me an email explaining how to get global > pattern matching (ala perl's s///g command) in PHP?? > i cannot seem to find any sw

Re: [PHP] Writing Regular Expressions...

2001-02-18 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dhaval Desai) wrote: > Can somebody enlighten me with regular expressions... > like [^\-*] something like that. To me it appears as a > code language.. > > Can Anybody tell me what do the various characteers > do? > is there any good article on

Re: [PHP] REgular expression....difficult is it?

2001-02-18 Thread CC Zona
[rearranged back to bottom-posting order, for clarity] In article <012901c09a35$7b64c640$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Ifrim Sorin") wrote: > > I am not able to understand this REgular expression. > > > > /Wil?/ > The ? meta-character is used for matching zero or one occurence of the

Re: [PHP] String problem

2001-02-19 Thread CC Zona
In article <96s2sj$46a$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Mike") wrote: > I get this error Parse error: parse error, expecting `']'' in > /on this. > > $Q= "Update $HTTP_POST_VARS[$keys[1]] Set $updateString Where $keys[0] > =$HTTP_POST_VARS[$keys[0]]"; Try: $Q= "Update $HTTP_

<    1   2   3   4   5   >