Re: [PHP] ini_set()

2002-05-13 Thread Gerard Samuel
I didn't know about the run-time issue, I guess I didnt see that. Thanks for the heads up... Jason Wong wrote: >On Tuesday 14 May 2002 13:32, Gerard Samuel wrote: > > >>Im running php 4.1.2 on a test box, and Im doing some recoding on an >>application Im writing. &

Re: [PHP] ini_set()

2002-05-13 Thread Gerard Samuel
I think I remember that thread. Ill track it down tomorrow. Thanks Jason Wong wrote: >On Tuesday 14 May 2002 13:43, Jason Wong wrote: > > > >>>Is there something else I can do so I can have the old scripts work >>>while php is has register_globals off. >>> >>> >>As you're running your o

[PHP] switch and register_globals.

2002-05-14 Thread Gerard Samuel
Just looking for opinions/comments of how others are working with switch() while register_globals is off With register_globals off, switch() has a little handicap. ie switch($foo) { break; } $foo, is now illegal/not set. So far, I've been using this before switch statements.

Re: [PHP] Genus who came up with "Self Destruct Code" & "Copy Pro tection"

2002-05-14 Thread Gerard Samuel
I like this idea... Collins, Robert wrote: >IMHO The best way as a contractor to protect yourself against dishonest >companies or people is a contract. However, there maybe a simple method to >programmatically help. > >Put something like this in the top of each of the pages that have common >fun

[PHP] class and error handling

2002-05-15 Thread Gerard Samuel
2 things that are foriegn to me. Im trying to construct a class to handle errors. I started out trying to make it recognise errors in the first place and then expand, but Im having difficulty. class.php errorhandler); } function errorhandler($type, $str, $file, $line) { sw

Re: [PHP] class and error handling

2002-05-15 Thread Gerard Samuel
03:16" and "01-Mar-2002 11:52" > >these might help you > >Martin > > >-Original Message- >From: Gerard Samuel [mailto:[EMAIL PROTECTED]] >Sent: Thursday, May 16, 2002 3:52 PM >To: PHP >Subject: [PHP] class and error handling > > >

[PHP] remote fetching??

2002-05-16 Thread Gerard Samuel
I was about to modify a script that fetches files for xml content. It currently does so using fsockopen. I originally was going to use plain fopen, and I know that curl can also be used. Im looking for preferences as to use one method over another. Why one is better than the other etc. Thanks

[PHP] HTTP_ACCEPT_LANGUAGE

2002-05-17 Thread Gerard Samuel
Im looking to know how to handle it. HTTP_ACCEPT_LANGUAGE = en-us, en;q=0.75, th;q=0.50, yi;q=0.25 What are the 'q' values for? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Whats the best way?

2002-05-18 Thread Gerard Samuel
Well this is the first time actually creating a regex. It works, but was wondering if the regex was created properly. HTTP_ACCEPT_LANGUAGE is 'en-us, en;q=0.75, nl;q=0.50, fr;q=0.25' /* Explode the browser report to get each language */ $foo = split(',', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ); /* P

[PHP] xml parsing

2002-05-18 Thread Gerard Samuel
I got this example from Beginning PHP 4. Unfortunately, I cant get to wrox's site to see if there were any errata updates for this piece of code, but for the life of me, I dont know whats wrong with it. All its displaying is '-'. If anyone could direct me to where its broken, Ill be very gr

[PHP] regex (preg_replace)

2002-05-18 Thread Gerard Samuel
Im trying to get a final output to be '' but Im unable to get working. Could someone point me where Im going wrong. Thanks http://www.trini0.org";>'; $b = preg_replace("/()/i", "$1" . "$3", $a ); echo $b; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] regex (preg_replace)

2002-05-18 Thread Gerard Samuel
I figured it out. Change the last line to echo htmlspecialchars($b); and you'll get the proper output. Gerard Samuel wrote: > Im trying to get a final output to be '' but Im unable to get > working. Could someone point me where Im going wrong. > Thanks > >

Re: [PHP] ob_gzhandler? (compression)

2002-05-19 Thread Gerard Samuel
If Im not mistaken, all the current and recent Micro$oft, Netscape & friends support it. Jason Caldwell wrote: >Is there a listing somewhere that shows which web browsers support >"gz-encoded" web pages? > >Thanks >Jason > > > > > -- PHP General Mailing List (http://www.php.net/) To unsub

[PHP] file functions and clearstatcache

2002-05-21 Thread Gerard Samuel
Im just double checking on the use of clearstatcache. I have a function that checks whether a file exists and loads it like so function foo($bar) { if (file_exists($bar)) { include($bar); } } According to clearstat cache, its use is for files that change often. In my case

[PHP] php, files, character encoding???

2002-05-21 Thread Gerard Samuel
I was about to start putting together some code for a text editor. One of its requirements is that the files that it creates, must be able to be used in utf-8 char. encoded page. Then I started to wonder if php's fwrite() is character set aware. I did some preliminary searching, but I didn't come

Re: [PHP] upload problem...

2002-05-21 Thread Gerard Samuel
Take a look at move_uploaded_file() http://www.php.net/manual/en/function.move-uploaded-file.php Jas wrote: >Ok here is my error message: >Warning: Unable to open '' for reading: No such file or directory in >upload_done.php on line 9 > >I have checked permissions on the folder and they are corr

[PHP] image_create(), header.....

2002-05-24 Thread Gerard Samuel
Im trying to use dynamic buttons, and Im trying to figure out how to get around the header call. I figure use output buffering, but so far Ive only come up with errors. Anyone see a better way or any errors in my code. Thanks nb: Uncomment the echo() statement to get the error.

Re: [PHP] image_create(), header.....

2002-05-24 Thread Gerard Samuel
a unique name > chmod("../spool/jp$myTime.png", 0666); //leading 0, then the code for the > mode you want > ImageDestroy($im); > > print " GALLERYIMG=\"NO\" height=\"500\">"; > > I hope this helps! > > -Natalie > > -Orig

Re: [PHP] IMAGE CREATE() header problem

2002-05-24 Thread Gerard Samuel
Double check your file for the whitspace like the others have stated. I tried your example and had no problems with it... Dani wrote: >Hi again, > >I have got this script : >//setup image >$height = 200; >$width = 200; > >$im = ImageCreate($width,$height); >$white = ImageColorAllocate($im, 255,

[PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
I hope this makes sense to someone Im converting a script over to work with 4.1.x +. Im running php 4.1.2 on FreeBSD/Apache and I have 4.2.0 on w2k/IIS/Apache. I sent the script to a friend of mine who is running w2k/Apache with 4.2.0. He told me that the script isn't working for him but it w

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
break, because 'foo' and 'bar' are in $_POST. For some reason, this is working on my boxes with register_globals set to off. Martin Towell wrote: >code snippets would be good, if possible > >-Original Message- >From: Gerard Samuel [mailto:[EMAIL PROTECTED]] &g

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
register_globals set to off. If its going to run on my box, it would be nice if it ran on everyone elses to. Lars Torben Wilson wrote: >On Tue, 2002-05-28 at 18:05, Gerard Samuel wrote: > > >>Its a fairly long script but this is a basic rundown of the mechanics. >

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
the variables in. > >This looks like a valid sql to me, unless the database is set up to >_dis_allow zero length strings... I'd suggest looking at the two database >schemas to see if they're exactly to same > >-Original Message- >From: Gerard Samuel [mailto:

Re: [PHP] File Upload

2002-05-29 Thread Gerard Samuel
'])) { > echo "$lineNo $key => $val"; > $lineNo++; > } > > and I get this: > > Dumping file info... > -- > 1 name => somefile.exe > 2 type => application/x-msdownload > 3 tmp_name => none > 4 size => 0 > >

Re: [PHP] Post 4.1.0 PHP

2002-05-30 Thread Gerard Samuel
POST_VARS; > >while inside the code reference is made only to $_POST ? > >Sorry if this has been covered repeatedly, I've only just rejoined the >list after a break from the relentless volume (of great, useful info). > >TIA >---- >Mi

[PHP] Class/Objects

2002-05-30 Thread Gerard Samuel
'legal' to use it like this -> $lcre->db_obj->run_some_code($bar); $lcre->tpl_obj->do_this_for_me($bar); Im not extending the classes, just using them, so is what Im doing ok?? Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General M

[PHP] Class/Objects

2002-05-31 Thread Gerard Samuel
'legal' to use it like this -> $lcre->db_obj->run_some_code($bar); $lcre->tpl_obj->do_this_for_me($bar); Im not extending the classes, just using them, so is what Im doing ok?? Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General M

Re: [PHP] Re: Class/Objects

2002-05-31 Thread Gerard Samuel
7; to use it like this -> >>$lcre->db_obj->run_some_code($bar); >>$lcre->tpl_obj->do_this_for_me($bar); >> >> > >This looks like it makes more sense as you are passing a reference to $bar >into $lcre - as long as your function is setup to acce

[PHP] php, javascript

2002-05-31 Thread Gerard Samuel
Just a general question. Is it possible to embed php in pure javascript/dhtml code?? I tried but it didn't work, not sure if it was me or its not possible. Thanks... -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net

[PHP] cache control and cookies...

2002-05-31 Thread Gerard Samuel
fix if possible. Im not sure if its because the expires time is too far back. The cookie's lifetime is 1 month. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] displaying client IP address

2002-06-01 Thread Gerard Samuel
hp >page since it's talking to MySQL. > >Any help would be much appreciated. > >Hugo > > > > > -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Trouble with mysql_pconnect unable to connect to database?

2002-03-23 Thread Gerard Samuel
Is that supposed to be -> $db = @mysql_pconnect("localhost", "bookorama", "bookorama123"); Jim Hankins wrote: > I'm doing a simple database connection using the follow syntax: > > > > Book-O-Rama Search Results > > > Book-O-Rama Search Results >if (!$searchtype || !$searchterm) > { >

[PHP] Code Bulk

2002-03-26 Thread Gerard Samuel
Im in a debate with someone else. Basically were debating code bulk. This is just an example -> run_this_code; } echo 'Finished'; ?> Now, if I understand php correctly, the whole script gets parsed, but since $run_this code isn't set, $this->run_this_code doesn't get echoed/executed. What th

Re: [PHP] Code Bulk

2002-03-26 Thread Gerard Samuel
ule/negligible - is speed, to the > microsecond, important in this situation? > > -Original Message----- > From: Gerard Samuel [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, March 27, 2002 11:23 AM > To: PHP > Subject: [PHP] Code Bulk > > > Im in a debate with someon

Re: [PHP] Re: Code Bulk

2002-03-26 Thread Gerard Samuel
tes) and then do something like: > > print microtime(); > include "thatfile.php"; > print microtime(); > > and see how long it took to parse 3000 lines... one more line isn't going > to make that much difference. > > On Tue, 26 Mar 2002, Gerard Samuel wrote: >

[PHP] Loop, array, life....

2002-04-03 Thread Gerard Samuel
Ok, this one is breaking my back all day. First some sudo-code -> fuction email_to_user() { $sql = 'select distinct(email) from user'; $emailfetch = mysql_query($sql); $sql = 'select news, date from news order by sid desc limit 10'; $newsfetch = mysql_query($sql); while

[PHP] Loop, array, life....

2002-04-03 Thread Gerard Samuel
(made a correction in sudo code) Ok, this one is breaking my back all day. First some sudo-code -> fuction email_to_user() { $sql = 'select distinct(email) from user'; $emailfetch = mysql_query($sql); $sql = 'select news, date from news order by sid desc limit 10'; $news

Re: [PHP] Loop, array, life....

2002-04-03 Thread Gerard Samuel
a_seek() call against > that to reset it for the next time through the loop. Otherwise you'll > just get a null result because you're already at the end of the data. > > -Steve > > On Wednesday, April 3, 2002, at 02:30 PM, Gerard Samuel wrote: > >> (made a cor

[PHP] Classes??

2002-04-04 Thread Gerard Samuel
Maybe a simple question. But can one file contain 2 or more classes?? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Classes??

2002-04-04 Thread Gerard Samuel
Yes true, but I have only written one class 3 weeks ago, and now Im about to go deep into it. I wasn't sure like down the line like 2 months from now that Im unable to extend it etc, because I didn't follow guidelines... Miguel Cruz wrote: > On Thu, 4 Apr 2002, Gerard

[PHP] What's wrong with php??

2002-04-06 Thread Gerard Samuel
Well yesterday, my test box went down because of the powersupply failed. I replaced it today, and I just so happened to pull up a phpinfo() page, and it would display half the page and hang. The test site seems to be operating normally, but phpinfo page isn't like it should. I tried reinstalling

[PHP] Strange variable.....

2001-11-19 Thread Gerard Samuel
Hey all. Im debugging a script that was written by someone else, and alot of the variable has 2 '$$' in it. For example a varible is intialised and used as $$string. I haven't been using php for that long, but I haven't seen anything like this. Whats the story with variables with $$ in the

Re: [PHP] Strange variable.....

2001-11-19 Thread Gerard Samuel
That explains it all. Thanks David Robley wrote: > On Tue, 20 Nov 2001 14:13, Gerard Samuel wrote: > >>Hey all. Im debugging a script that was written by someone else, and >>alot of the variable has 2 '$$' in it. For example a varible is >>intialised and

[PHP] Explanation

2001-11-28 Thread Gerard Samuel
Hi. Im looking over someone else's code and I come across something I dont understand and dont know where in the manual to look for it. Here is an example ==> $string1 = (isset($string2)) ? $HTTP_GET_VARS['pid'] : ""; I have no idea what the '?' in the line and the ':' at the end, so I have n

Re: [PHP] Re: Explanation

2001-11-28 Thread Gerard Samuel
Thank you for your explanation on this one guys. This is a real saver, got to start coding with this shorthand. Yes I found a reference in the manual but it was sparse. I found this explanation also, so keep this for the archives... http://www.faqts.com/knowledge_base/view.phtml/aid/5742/fid/38 T

[PHP] Single/Double Quotes

2001-12-12 Thread Gerard Samuel
Im tring to rewrite some code to use single/double quotes correctly (as correct as can be). If I use $result=mysql_query('SELECT book FROM ' . TAB_AUTHORS . " WHERE aid = $aid"); I get an mysql error. That should be correct, if I understand it right. But if I use $result=mysql_query('SELECT boo

[PHP] php performance (was: Single/Double Quotes)

2001-12-12 Thread Gerard Samuel
sees the single quotes around the $aid it evaluates it to the > value stored in the variable. > Your first example connntained $aid within a set of double quotes, thus > it was treated as a literal. > > Hope this helps - Miles Thompson > > At 09:08 AM 12/12/2001 -0500,

[PHP] Email class

2001-12-15 Thread Gerard Samuel
Could someone recommend a good php email class. Im trying out class.phpmailer.php, but its not jiving right with me... Thanks -- 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 admi

[PHP] File Download

2001-12-24 Thread Gerard Samuel
Hey all. Im trying out a script that where I can download the contents of a database as a dump. On a large database, the end get truncated. ie, there were still maybe 6-7 more tables more till the end out of maybe 100 tables. The behaviour is erratic. It is not consistent with where the dump

[PHP] File Upload

2001-07-29 Thread Gerard Samuel
Hey all, Im running freebsd 4.3, apache 1.3.20, mysq.3.23.39, php 4.0.6. Im trying to figure out file uploading. If I echo $pic, $pic_name, $pic_size, $pic_type, after the form is submitted, everything echoes correctly. In my script I have ==> $archive_dir = "/files/www/data/archive"; $filename

Re: [PHP] File Upload

2001-07-29 Thread Gerard Samuel
Phil, thats why you get the big bucks. Dammit, I was messing around with this all day. Thanks it works now. Gerard Philip Murray wrote: > Quoting Gerard Samuel <[EMAIL PROTECTED]>: > >>Hey all, Im running freebsd 4.3, apache 1.3.20, mysq.3.23.39, php 4.0.6. >>Im t

[PHP] Form Data

2001-07-30 Thread Gerard Samuel
Hey all. Another thought. In a form I have there is a drop down box with age groups. ie 20-25 26-35 etc. If I submit the form and echo the variable for the dropdown box, the output is correct ie 20-25. When I inject the variable in mysql, the data in the database is 20- or 35-, its only

Re: [PHP] Form Data

2001-07-30 Thread Gerard Samuel
cation Security - www.whitecrown.net > */ > > - Original Message - > From: Gerard Samuel <[EMAIL PROTECTED]> > To: PHP <[EMAIL PROTECTED]> > Sent: Monday, July 30, 2001 3:29 AM > Subject: [PHP] Form Data > > > | Hey all. Another thought. In a form I have there

[PHP] PHP_SELF

2001-07-30 Thread Gerard Samuel
Im trying to introduce some logic into a form.I am unsing $PHP_SELF as the target. I have a text area that the user inputs their age. What I want is that if the field is blank, to stop the script and send the user back to fill in their age. My problem now is that if I go to the blank applic

Re: [PHP] PHP_SELF

2001-07-30 Thread Gerard Samuel
So far this message and another who mentioned $HTTP_POST_VARS[] made a small light go off in my head. Not enough to get the script woriking, but it made me think. Its not clear, but I sort of came up with another way, but I dont know if its doable . In my form I have a hidden element called

Re: [PHP] PHP_SELF

2001-08-01 Thread Gerard Samuel
Ok, I would like to thank Ralph Guzman & Richard Lynch for your help. I combined your ideas into my own working example. Just posting here for archiving/discussion purposes... // Input some data // echo "\n"; echo "1. Age:\n"; echo "   \n"; echo "2. Email:\n"; echo "   \n"; echo "   \n"; // Star

[PHP] (//// <=== huh??)

2001-08-02 Thread Gerard Samuel
In my script that puts out a form I have a drop down list which include ==> echo "$Education\n"; echo "Bachelor's Degree\n"; It uses a $PHP_SELF target. After the form is submitted, on the new page, in the textbox I have Bachelor\\\'s Degree getting outputed by $Education and the more I submit t

[PHP] huh??

2001-08-03 Thread Gerard Samuel
In my script that puts out a form I have a drop down list which include ==> echo "$Education\n"; echo "Bachelor's Degree\n"; It uses a $PHP_SELF target. After the form is submitted, on the new page, in the textbox I have Bachelor\\\'s Degree getting outputed by $Education and the more I submit t

[PHP] UPDATE syntax

2001-08-13 Thread Gerard Samuel
I have a database with 5 columns and cols 1,2,3 & 5 are filled. I want to insert into 4 and change 5. Could I use an UPDATE command to do this.. Here is what I have ==> $query = "UPDATE mpn_asklee (Reply, Post) VALUES ('$Reply[$i]', '$post[$i]') WHERE ID = '$counts'"; $result = mysql

Re: [PHP] UPDATE syntax

2001-08-13 Thread Gerard Samuel
[$i]', Post='$post[$i]' WHERE > ID='$counts'" > > > > On Mon, 13 Aug 2001 15:20:17 -0400 > Gerard Samuel <[EMAIL PROTECTED]> wrote: > > >>I have a database with 5 columns and cols 1,2,3 & 5 are filled. I want >>to ins

[PHP] Arrays/forms/Loops/Persist (was Re: [PHP] UPDATE syntax)

2001-08-14 Thread Gerard Samuel
> $id[]="$query_data[0]"; and using a hidden field, but that failed. My problem is basically, how does one one make an array 'persist'. I looked through the archive, and didnt find anything substantial. If you need more info please email me. Thanks for listening Gerard

[PHP] Attempt At Prev/Next Links

2001-08-17 Thread Gerard Samuel
Hey all. Im trying to setup a page where it has prev/next links. I have included a snip of the code. On the first page everything is cool, but on subsequent pages, the count get out of control. I was testing with displaying 5 entries at a time. The first page is good, the next displays 7

Re: [PHP] basename()

2001-08-20 Thread Gerard Samuel
$file = basename ($path); $file = $file.php3; Jeremy Morano wrote: > Hello, > > Can someone please show me how to use basename() correctly? > This is what I am doing: > > $file = basename ($path); > $file = basename ($path,".php3"); > > This is the error I'm gettig: > > Warning: Wrong paramet

Re: [PHP] basename()

2001-08-21 Thread Gerard Samuel
Oh yes, I dont like warnings. Thanks for pointing that out Renze Munnik wrote: > On Mon, Aug 20, 2001 at 03:42:34PM -0400, Gerard Samuel wrote: > >>$file = basename ($path); >>$file = $file.php3; >> >> > > You might want to consider using, > > $file

[PHP] order of update??

2001-08-23 Thread Gerard Samuel
My seem stupid to some, but when running update tablename set x='$x', y='$y', z='$z' where a=$a; Does it matter if it the set were in backwards order ie z, y, x ?? Just curious, Im having a problem and I dont know if its because of the order Thanks -- PHP General Mailing List (http://www

Re: [PHP] Re: order of update??

2001-08-23 Thread Gerard Samuel
o you all later. trini0 [EMAIL PROTECTED] wrote: > Gerard Samuel <[EMAIL PROTECTED]> wrote: > >>My seem stupid to some, but when running >>update tablename set x='$x', y='$y', z='$z' where a=$a; >>Does it matter if it the set were in

Re: [PHP] Re: order of update??

2001-08-23 Thread Gerard Samuel
t error message are you getting? > > Sam Masiello > Software Quality Assurance Engineer > Synacor > (716) 853-1362 x289 > [EMAIL PROTECTED] > > -----Original Message- > From: Gerard Samuel [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 23, 2001 3:28

[PHP] file uploads & windows clients

2001-08-27 Thread Gerard Samuel
Hey all. I have a problem. I made a script that handles file uploads, and all the while I was testing on mozilla and netscape, totally forgot about IE. I have it set to only accept jpeg pics. It works no problem on mozilla and netscape, but IE isnt do too well. When I try to upload a jpeg

Re: [PHP] file uploads & windows clients

2001-08-27 Thread Gerard Samuel
e != "image/jpeg") { echo "Please let the picture be in jpeg format. Thanks.\n"; exit(); } Gerard Samuel wrote: > Hey all. I have a problem. I made a script that handles file uploads, > and all the while I was testing on mozilla and nets

[PHP] double check query statement??

2001-08-28 Thread Gerard Samuel
$query = "SELECT mpn_job.ID, job, assigned_to, status_date, category"; $query .= "FROM mpn_job, mpn_job_category WHERE CID = mpn_job_category.ID"; $query .= "AND category = '$category'"; $result = mysql_query($query); $row = mysql_fetch_row($result); foreach

Re: [PHP] double check query statement??

2001-08-28 Thread Gerard Samuel
Gentlemen, thank you for correcting me with the space ont the end. Ill try and make it a habit to echo out the query. All is well in the land of PHP, till next time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

[PHP] strings in a function return

2001-08-29 Thread Gerard Samuel
Hey all. I just started venturing into functions. I have a function that displays a form, but I have a problem with getting the multiple strings back after the submit. Im tryed a return statement at the bottom of the function, but it cannot take more than one string. I tried turning the ar

Re: [PHP] strings in a function return

2001-08-29 Thread Gerard Samuel
I was doing it like so ==> $string = array(var1, var2...); return string; I also tried to implode the array into a string and return the result, but no go. David Robley wrote: > On Thu, 30 Aug 2001 09:35, Gerard Samuel wrote: > >>Hey all. I just started venturing into funct

Re: [PHP] strings in a function return

2001-08-29 Thread Gerard Samuel
ay = array("$new_cat,$assigned_to","$job","$assigned_by") $string = implode("|",$array); return $string; } The variables that form $array are from the form David Robley wrote: > On Thu, 30 Aug 2001 10:19, Gerard Samuel wrot

Re: [PHP] strings in a function return

2001-08-29 Thread Gerard Samuel
echo "$data[0]"; } $array = array("$new_cat,$assigned_to","$job","$assigned_by"); $string = implode("|",$array); return $string; } The variables that form $array are from the form....

Re: [PHP] strings in a function return

2001-08-29 Thread Gerard Samuel
es that form $array are from the form.... David Robley wrote: > On Thu, 30 Aug 2001 10:19, Gerard Samuel wrote: > >>I was doing it like so ==> >>$string = array(var1, var2...); >>return string; >> >>I also tried to implode the array in

Re: [PHP] strings in a function return

2001-08-29 Thread Gerard Samuel
: > On Thu, 30 Aug 2001 10:45, Gerard Samuel wrote: > >>Mozilla sucks sometimes with email formatting. >>Correction==> >> >>Here is a snippet example. >> >>function assign() { >> global $adminurl, $string; >> to

Re: [PHP] strings in a function return

2001-08-29 Thread Gerard Samuel
o with this new found knowledge called 'functions'. David Robley wrote: > On Thu, 30 Aug 2001 11:38, Gerard Samuel wrote: > >>top(); is a function that displays a menu, that works. >> is where the form goes. >>In its current setup less the array/implode/explod

Re: [PHP] Refreshing php.ini without restart...

2001-08-31 Thread Gerard Samuel
I can only speak for apache... ==> apachectl graceful Raphael Pirker wrote: > Hi, > > i just moved my PHP project from my local PC to the online webserver and I > will need to do a few adjustments to the server. since the server is used by > all the employees in the company, there is no chan

[PHP] str_replace and arrays

2001-09-05 Thread Gerard Samuel
Hey all. Im trying to reduce some lines of code that has muliple lines of str_replace. I figure lets try using arrays but its not working. E.g. I have about 15-20 lines like this. $message = str_replace(":D", "", $message); Im trying $path = "images/forum/icons/"; $one = array(":D",":)"); $two

[PHP] file management

2001-09-07 Thread Gerard Samuel
Can a file be truncated from the beginning, and by x amount of lines?? Thanks -- 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 management

2001-09-07 Thread Gerard Samuel
Sterling, your example looks doable, Ill report back when Im done with these other functions. Thanks Sterling Hughes wrote: > On Fri, 7 Sep 2001, Gerard Samuel wrote: > > >>Can a file be truncated from the beginning, and by x amount of lines?? >>Thanks >>

Re: [PHP] file management

2001-09-07 Thread Gerard Samuel
ng Hughes wrote: > On Fri, 7 Sep 2001, Gerard Samuel wrote: > > >>Can a file be truncated from the beginning, and by x amount of lines?? >>Thanks >> >> > Truncated from the beginning? Do you mean truncate the file by X > lines, st

[PHP] Delete top 2 lines (was file management)

2001-09-07 Thread Gerard Samuel
es, the whole file gets dumped, not what I want. The form Im using can only put out 109 bytes plus /n total. In this example (if you want to call it one), I would like it to kill the first 2 lines in the file. Thanks to Hughes for putting me on to this, its a little clearer... Gerard Samu

[PHP] files

2001-09-07 Thread Gerard Samuel
hey, I have a large file and I want to keep the last x row of it. I figured out how to navigate to the point where I want to extract the data, but I cant figure out how to extact from the file current $fp and write out the data to another file. Think of it like this, when the file gets to be x

[PHP] Describing mysql table

2001-09-18 Thread Gerard Samuel
Im trying to get results from a mysql command (describe tablename;) into php. I know about the php functions, but I would like the mysql nameing instead. Im trying like so $query = "DESCRIBE users"; $result = mysql_query($query); $array = mysql_fetch_array($result); foreach ($array as $data)

Re: [PHP] Array question

2001-09-18 Thread Gerard Samuel
Try this. $sql = "select bp_section_id,bp_section_name from bp_sections order by bp_section_name"; $sql_result = mssql_query($sql); while ($row = mssql_fetch_array($sql_result)){ $bp_section_id = $row["bp_section_id"]; $bp_section_name = $row["bp_section_name"]; $ln = "$bp_secti

Re: [PHP] Need help. please

2001-09-18 Thread Gerard Samuel
John Holcomb wrote: > I'm sorry for those who my have responded to my last > email. I thought I had plenty of room in my email > client, but I forgot to delete my trash, so I did not > get any responses. So, I'm going to restate my initial > problem. Any help will be greatly appreciated. > > Th

Re: [PHP] Describing mysql table

2001-09-18 Thread Gerard Samuel
Hey I figured out my problem. Instead of using a foreach loop, I used a while loop and everything is cool man :). UPDATED CODE: $query = "DESCRIBE mpn_users"; $result = mysql_query($query); while ($data = mysql_fetch_array($result)){ echo "$data[0], $data[1], $data

[PHP] file maniputation??

2001-10-03 Thread Gerard Samuel
Hey all. I have a script that uses that creates/manipulates files, and it works great on my end. Thats no question. There is a small percentage of my users that when they try to run the file it cannot create or modify files. I suspected file ownership may be wrong on files and directories.

Re: [PHP] file maniputation??

2001-10-04 Thread Gerard Samuel
'b'. This is useful only on systems > which differentiate between binary and text files (i.e. Windows. It's > useless on Unix). If not needed, this will be ignored. " > > Can you ignore it as well? > > Maxim Maletsky > www.PHPBeginner.com > > > ---

[PHP] php, files, ownership....(was file manipulation)

2001-10-04 Thread Gerard Samuel
Ok, I found out what was causing some of the people who were using my script and have it fail. They are on a shared server and apache is being run as user nobody, so therefore the script is being run as nobody. But the the files has to have user ownership foo foo. Is it at all possible to have

[PHP] Re: php, files, ownership....(was file manipulation)

2001-10-04 Thread Gerard Samuel
ROTECTED] > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > - Original Message - > From: Gerard Samuel <[EMAIL PROTECTED]> > Newsgroups: php.general > To: PHP <[EMAIL PROTECTE

[PHP] Means of collecting HTTP response headers

2004-07-30 Thread Gerard Samuel
A means that is not specifically tied to Apache functions. Just looking for a way so that it works no matter the webserver. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Means of collecting HTTP response headers

2004-07-30 Thread Gerard Samuel
On Friday 30 July 2004 01:32 pm, Gerard Samuel wrote: > A means that is not specifically tied to Apache functions. > Just looking for a way so that it works no matter the webserver. > Seems like the function stream_get_meta_data() will fill the job.. -- PHP General Mailing L

Re: [PHP] Should I wait for PHP 5.1?

2004-08-01 Thread Gerard Samuel
On Sunday 01 August 2004 12:19 pm, Randall Perry wrote: > Any major gotchas going from 4 to 5? Any problems with PostgreSQL > connectivity? Will I have to scour and rewrite current scripts? > My opininon would be to wait on maybe 5.0.1, especially if its on a production box. Im not having an abs

[PHP] XML Breaking Help!

2004-08-03 Thread Gerard Samuel
Im parsing a document, and its stopping prematurely. I get this error -> not well-formed (invalid token) Its breaking on the word -> Exposé in the document. Is the "é" an illegal character? Any ideas how to work around this??? Thanks for any pointers... -- PHP General Mailing List (http://www.p

[PHP] Advise on parsing XML

2004-08-05 Thread Gerard Samuel
Im writing an xml parser. Most of the documents Im parsing, is written by someone else, so have no control over the validity of the xml file. Im running into problems with parsing a few documents where the author uses "exotic" characters such as "é". Characters like this kill the parser. Ok. Im

Re: [PHP] Advise on parsing XML

2004-08-05 Thread Gerard Samuel
On Thursday 05 August 2004 11:33 pm, CD Baby wrote: > > I'm writing an xml parser. > > Gerard - > > All of that stuff has already been taken care of for you. Hundreds of > hours have gone into developing GREAT xml parsers! > > http://www.php.net/dom > and > http://www.php.net/simplexml > > They ta

Re: [PHP] Re: Advise on parsing XML

2004-08-07 Thread Gerard Samuel
On Saturday 07 August 2004 11:22 am, Jason Barnett wrote: > I assume you are using PHP4's DOMXML functions? If that's the case then > you have a bit of a problem. XML support changed between 4.0 and 5.0, we > use libxml2 (which supports UTF-8), but the object model / methods changed > to better c

<    1   2   3   4   5   >