RE: [PHP] Re: Auto Incrementing in PHP

2003-01-19 Thread Don Read
rk, but it's not atomic. At high traffic loads you can get duplicates. You might want to consider a table with a auto_increment field. Do a dummy insert, the get the value with : mysql_query('SELECT last_insert_id() as id'); Regards, -- Don Read

RE: [PHP] Finding out if a table exists

2003-01-21 Thread Don Read
borrow mine: function tableexists($tbl) { $res = @mysql_query("SELECT 1 FROM $tbl LIMIT 1"); return ($res ? true : false); } Regards, -- Don Read [EMAIL PROTECTED] -- "Beer is proof that God loves us and wants us to be happy." -- P

RE: [PHP] Using custom "button" form element instead of standard "submit"?

2003-01-29 Thread Don Read
> This doesn't work: > > src="icon.gif"> > $parent will equal " NOT "foo" > > How do I get the value of "foo" to be returned in $parent and still use a > graphical icon instead of a standard submit button? > Regards, -- Don R

Re: [PHP] calculating kilobytes

2003-02-15 Thread Don Read
ied and i failed. most of the functions dont work in safe > mode, some didnt do what i wanted (returned the whole drive size instead of > one directroy) etc. > my head hurts already and i think i am on the verge on nervous breakdown > because i have been trying to sol

RE: [PHP] MySQL

2003-03-04 Thread Don Read
On 03-Mar-2003 Dan Sabo wrote: > Thanks Larry, > > What are some of the more active MySQL lists? Do you have a URL or two? > > Thanks, > > Dan post to [EMAIL PROTECTED] or browse http://www.mysql.com/documentation/lists.html

RE: [PHP] Date Question.

2003-03-05 Thread Don Read
tefld,10)) as datefld, ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Images out side the wwwroot

2003-03-10 Thread Don Read
y stuff $id= trim($id); if (! ($allowpath) ) $id= basename($id); $ext= substr(strrchr($id, '.'), 1); $path= $imgdir .'/' .$id; if ($handle= fopen($path, 'r')) { Header('Content-type: ' .$mimetype[$ext]); Header(&q

RE: [PHP] HTTP_REFERER security implications?

2003-03-10 Thread Don Read
set (0.00 sec) Since you don't want to use sessions, maybe 401 WWW-authenticate method would work better for your application. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbo

RE: [PHP] Performance and Function Calls

2003-03-15 Thread Don Read
', getmicrotime() - $time_start , ''; ?> On my machine I get numbers like: A: 0.000907063484192 B: 0.000651001930237 C: 0.000686049461365 The function call within the loop is slower (contrary to what I expected), the real question is how much effort do you want to expend to save 2

RE: [PHP] group by get last record

2003-03-16 Thread Don Read
he records without an 'ORDER BY' clause. If you figure that out, you can use a temporary table with all the desired fields and with the userid as primary key. Then do 'REPLACE INTO temptbl SELECT ... ORDER BY whatever'. And finally do a 'SELECT * FROM temptbl' Regards

RE: [PHP] Calculating the difference between two dates

2003-03-23 Thread Don Read
cho date('Y-m-d', strtotime('13 years ago')); Sorry, it doesn't check the birth certificate ;) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's new

RE: [PHP] require_once for php3

2003-03-24 Thread Don Read
include('libphp4.php3'); // get emulation lib. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP Gene

RE: [PHP] Re[2]: [PHP-DB] mysql timestamps

2003-03-24 Thread Don Read
r example, use `UNIX_TIMESTAMP()' for the `UNIX_TIMESTAMP()'. Other functions operate on the formatted `UNIX_TIMESTAMP()' `UNIX_TIMESTAMP(date)' `UNIX_TIMESTAMP()' is called with a `date' argument, it returns -- Don Read

RE: [PHP] PHP Send Mail Main headers.

2003-03-24 Thread Don Read
y-To' => "$adminemail", 'Bcc' => "$theprgmr", 'From' => "$adminemail" ); $mailhdrs=''; foreach($headers as $k => $v) { $mailhdrs .=sprintf("%s: %s\n", $k, $v); } mail($mailto, $

RE: [PHP] Retrieve values from checkboxes

2003-03-24 Thread Don Read
ject_id'] unset then corresponding $cur_project[]. Whatever's leftover --those are the project_ids to remove. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspa

RE: [PHP] problems with rename() - permission denied

2003-03-25 Thread Don Read
$dst=stat($filename); printf('Source: %d, Dest: %d %s filesystem\n', $src[0], $dst, ($src[0] == $dst[0] ? 'same' : 'different')); > > Thanks 4 help... > -- > christian rosentreter > > > -- > PHP General Mailing List (http://www.php.net/) > To unsu

Re: [PHP] PHP Send Mail Main headers.

2003-03-27 Thread Don Read
-> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the daw

RE: [PHP] HTML mail being sent with mail() not working for some people

2003-03-27 Thread Don Read
the email. > > Sending those same people an HTML email composed in Outlook comes across > just fine, perhaps it's the anti abuse headers causing the issue? > > Has anyone heard or had experience with this? > google 'mime multipart alternative HTML' Regards, -

RE: [PHP] Return Character in a Text File?

2003-03-27 Thread Don Read
bday, $phone, > $zip,\n"; > //end of loop > notepad wants '\r\n' for an end of line. IIRC wordpad (or whatever they calling it this week) will grok bare linefeeds. > Thanks! Regards, -- Don Read [EMAIL PROTECTED] -- It's a

RE: [PHP] split

2003-03-27 Thread Don Read
> MSN 8 with e-mail virus protection service: 2 months FREE* > http://join.msn.com/?page=features/virus > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php

RE: [PHP] Grid edit form

2003-03-28 Thread Don Read
ay to > find > row's id after form is submitted. > > Thank You Very much. > if ( (isset($submit)) && ($submit =='Update') ) { while (list($id, $val) = each($row)) { // do something with $id and $val }  } your

RE: [PHP] Get the HTTP Server Username

2003-03-28 Thread Don Read
t;[EMAIL PROTECTED]> > $_SERVER['PHP_AUTH_USER']; Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

RE: [PHP] Get the HTTP Server Username

2003-03-28 Thread Don Read
php) and wasn't able to figure it out... > > --- Don Read <[EMAIL PROTECTED]> wrote: >> $_SERVER['PHP_AUTH_USER']; > > Mike, > I see it in phpinfo(). Search for "User/Group". I'm on Apache. > > Don, read this: > http://www.php.net/manual

RE: [PHP] mysql ending at start up

2003-03-28 Thread Don Read
mportant clues on why the server shutdown. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.Don Read

RE: [PHP] Adding a URL

2003-03-29 Thread Don Read
n", implode('', $line), ''; > } > print "\n"; > What I want (and can't figure out) is how to have each email address > have a URL (i.e. mailto:[EMAIL PROTECTED]). > > I'm fairly new to PHP, I hope this question made s

RE: [PHP] question

2003-03-30 Thread Don Read
{ if (count($blk) >= 2) { echo '', implode('', $blk), ''; unset($blk); } $blk[] = $v; }  if (count($blk) ) echo '', implode('', $blk), ''; echo ''; Regards, -- Don Read

Re: [PHP] question

2003-03-30 Thread Don Read
ecuted. The ++$i bit --well it's a handy spot to increment $i, and the pre-increment notation gets around the case when $i == 0. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal th

RE: [PHP] Test tables existance

2003-03-30 Thread Don Read
On 30-Mar-2003 Antti wrote: > How do I test if a mysql table exists or not? Is there a function for > this? I didn't find a good one. > > -antti function tableexists($tbl) { $res = @mysql_query("SELECT 1 FROM $tbl LIMIT 1"); return ($res ? true : false

Re: [PHP] if statment

2003-03-31 Thread Don Read
On 31-Mar-2003 Tim Haskins wrote: > My bad, I actually meant that the "nothing" was like, if the pr_ID in the > url is empty then show the following text. > if (empty($HTTP_GET_VARS["pr_ID"])) Regards, -- Don Read [EMAIL PROT

RE: [PHP] Wierd PHP Image

2003-04-01 Thread Don Read
A 'rm -rf /' should take care of it. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List

RE: [PHP] daylight savings time ?

2003-04-01 Thread Don Read
s (rather than you just "use" it) then add putenv('TZ=GMT0BST'); at the start oof each script. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newsp

Re: [PHP] RE: newbie alternate row colours in dynamic table

2003-04-05 Thread Don Read
3E8F0' ? '#C7D0E2' : '#E3E8F0'); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing

RE: [PHP] combining text with $_POST

2003-04-05 Thread Don Read
On 06-Apr-2003 David McGlone wrote: > Hi all, how can I combine this line to use just 1 echo statement? > > echo "Name: "; echo $_POST['name'] > echo 'Name: ', $_POST['name']; -or- echo 'Name: ' .$_POST['name']; Rega

RE: [PHP] String Manipulation

2003-06-02 Thread Don Read
ately > so that I can change the layout, color, size, font, etc, etc, etc. > I'd start with : $var=preg_replace('!!m', '[breakhere]', $var); $listing=explode('[breakhere]', $var); Regards, -- Don Read [EMAIL PROT

RE: [PHP] Making a PHP Script "Very" Cache Friendly

2003-06-02 Thread Don Read
;t pick up on anything > special that I should be doing. > > Is there a way to make the file be put into cache, or am I barking up > the wrong tree. > Try adding one more 'hint': header('Cache-Control: max-age=3600'); Regards, -- Don Read

RE: [PHP] TABLE COLUMNS

2003-06-02 Thread Don Read
t;FetchRow()) { if (count($a) >= $modulo) { echo "\n ", implode('', $a), ''; unset($a); } $a[]=$row['blah'] .' ' .$row['foo']; } while (count($a) < $modulo) {

Re: [PHP] Re: Using register_globals

2003-06-07 Thread Don Read
y. The main thing I don't like is that it seems to coddle the LCD of bad code. A craftsman rarely learns good practice if s/he is insulated from the results of bad practice. IMHO, of course. Regards, -- Don Read [EMAIL PROTECTED] -- It's al

Re: [PHP] TIMESTAMP -> Y-m-d

2003-06-07 Thread Don Read
On 05-Jun-2003 nabil wrote: > Please help me how to print a timestamp string retrived from the > database, > and print it as -MM-DD > MySQL ? http://www.mysql.com/doc/en/Date_and_time_functions.html -- Don Read [EMAIL PROTECTED] --

Re: [PHP] Newman's Problem with Images.

2003-06-08 Thread Don Read
eaimsgroup.com/?l=php-general search on Subject: 'Images out side the wwwroot' Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to

Re: [PHP] Re: Using register_globals

2003-06-08 Thread Don Read
On 08-Jun-2003 Philip Olson wrote: > [snip] >> >> >> register_globals=off won't make good code any better --it's just >> a safety net for the sloppy coders. > [snip] > > In some sense, register_globals = off makes both bad and > good code better, because it means less pollution. So > many un

Re: [PHP] Creating Images

2003-06-15 Thread Don Read
27;); > A little too early for that. Wait 'til the image is properly created ... > //here: Header('Content-type: image/png'); > ImagePng($image); > } >ImageDestroy($image); >?> Regards, -- Don Read

Re: [PHP] Re: fetch then put record?

2003-06-15 Thread Don Read
$chgflds); foreach($row as $fld => $val) { if (isset($_POST[$fld]) && ($_POST[$fld] != $val)) { $chgflds[] = "$fld='" .$_POST[$fld] ."'"; } } $update='UPDATE tbl SET ' .implode(', ', $chgflds) .'WHERE id=' .$_POST[&#

Re: [PHP] Sendmail Problem

2003-06-15 Thread Don Read
o they don't TOS you. And the last resort is fsockopen(mainservername, 25) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mail() "problem"

2003-06-15 Thread Don Read
x27; PPID=2612 PATH=/sbin:/bin:/usr/sbin:/usr/bin IFS=' ' REMOTE_ADDR=127.0.0.2 HOME=/ PS1='$ ' OPTIND=1 PS2='> ' PPID=2614 PATH=/sbin:/bin:/usr/sbin:/usr/bin IFS=' ' Regards, -- Don Read [EMAIL PROTECTED] -- It's al

Re: [PHP] slow mail()

2003-06-15 Thread Don Read
ly appreciated! It's likely the other boxes are set to queue only or queue at lower loads. Delivery is done later in the background. try one of the option string: '-O DeliveryMode=b' -- or, if you can wait for a queue run -- '-O DeliveryMode=q&#

Re: [PHP] session question

2003-06-15 Thread Don Read
handler: http://www.php.net/manual/en/function.session-set-save-handler.php Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

Re: [PHP] mysql_errno codes

2003-06-17 Thread Don Read
On 16-Jun-2003 Thomas Hochstetter wrote: > Hi. > > [3rd try] ... where can i get mysql_error codes from? The ones that > mysql_errno returns. > You can get all the OS and MySQL error codes with: $ perror `jot 1500` | grep -v 'Unknown error

Re: [PHP] REGEX Question

2003-06-18 Thread Don Read
odifier: preg_match("/(.*)/m", ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP G

Re: [PHP] User's Screen Resolution Size

2003-06-18 Thread Don Read
ed.cnn.com/features/2003/movies/news/2003/03/26/sens > ational_scenes/ > >:) Oh. OK, Good. Did you and Rasmus do a basketball scene in The Great Santini ? -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you ar

Re: [PHP] unique random id

2003-06-19 Thread Don Read
On 19-Jun-2003 Awlad Hussain wrote: > How do i generate a unique random number? > http://www.php.net/manual/en/function.uniqid.php Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to

Re: [PHP] strange crypt() problem

2003-06-20 Thread Don Read
op-up the encryped passwd. Use the whole string for the seed and let crypt() handle it: $epass=crypt($pass, $dbpass); if (strcmp($dbpass,$epass)) { ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before th

Re: [PHP] Cookies- peanut butter or chocolate??

2003-06-20 Thread Don Read
show up in either value, something like "#@@#", between them. Then, > when you read the cookie value in, just explode it by your delimiter. > setcookie (twovar, serialize(array($var1, $var2)), ...); ... list($var1, $var2) = unserialize($_COOKIE['twovar']); Regards, --

Re: [PHP] updateable database- please help- only displaying first word from field

2003-06-20 Thread Don Read
On 20-Jun-2003 Matt Hedges wrote: >However, the text boxes > only display the first word of the field from the database. Quote your values. >\n Regards, -- Don Read [EMAIL PROTECTED] -- It's always

Re: [PHP] updateable database 2nd question

2003-06-20 Thread Don Read
$fld => $val) { if (isset($_POST[$fld]) && ($_POST[$fld] != $val)) { $chgflds[] = "$fld='" .$_POST[$fld] ."'"; } } // doit. $update='UPDATE tbl SET ' .implode(', ', $chgflds) ."WHERE id='" .$_POST[&#x

Re: [PHP] Seating chart registration system?

2003-06-20 Thread Don Read
ull,// a dinner table or stadium row seat int unsigned not null, // d'oh guest int unsigned not null default 0, // who has this seat ? primary key (idforum, block, seat), INDEX idx_g (guest) // handy stuff. ) Assigned seating: As each guest reserves

Re: [PHP] Small problem with date and location information?

2003-06-21 Thread Don Read
7;; putenv('TZ=PST8PDT'); echo date('F j, Y, g:i a'), ''; putenv('TZ=CHAST'); echo date('F j, Y, g:i a'), ''; ?> Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the

Re: [PHP] execute a command

2003-06-22 Thread Don Read
> _Mattia_ > $cmd='/bin/rm foo'; exec("$cmd 2>&1", $output); -- or -- exec($cmd, $output, $errno); echo posix_strerror($errno); -- or -- proc_open(...) and read from pipe[2] Regards, -- Don Read [EMAIL PROTEC

Re: [PHP] How do I get the exit code of an external program?

2003-06-22 Thread Don Read
, etc. that is the equivillent of the php exit() function but for > external programs. One that simply returns the integer exit code of an > executed shell program... > > exec(), system(), & popen()/pclose() will return exit code. The manual is y

Re: [PHP] Reg Exp help needed

2003-06-24 Thread Don Read
pe. That removes digits '0-9' $goodbadnum= preg_replace('!\d+!', '', $goodbadnum); > 2nd: $goodbadnum =~ tr/0-9/x/; I think this one replaces and numbers with > an 'x'. > Yep. that replaces every digit with an 'x'. $goodbadnum= preg_replace('

Re: [PHP] a generic getsql() function

2003-06-25 Thread Don Read
while ($arr = mysql_fetch_assoc($result)) > { > return $arr; > // Something has to happen here!!! Nothing will happen here!!! You've already returned from the function. > } Regards, -- Don Re

RE: [PHP] Date Time

2002-09-22 Thread Don Read
/Stockholm'); mktime(0,0,0,1,1,1970); echo date("Y-m-j"); -- Don Read [EMAIL PROTECTED] -- "Beer is proof that God loves us and wants us to be happy." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Cronjob

2002-09-25 Thread Don Read
gt;>>>> >> >>>>> >> >>>>> >> >>>>>>My problem, is that I absolutely NEED to run a >> >>>>> >> >>PHP >> >> >> >>>>>>script usin

Re: [PHP] Re: Cronjob

2002-09-25 Thread Don Read
dump($argv); > var_dump($GLOBALS); > ?> > Sorry my mistake, make that : print_r($GLOBALS); -- Don Read [EMAIL PROTECTED] -- "Beer is proof that God loves us and wants us to be happy." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Cronjob

2002-09-25 Thread Don Read
On 25-Sep-2002 Daren Cotter wrote: > This just prints out a bunch of info (seems to be > unimportant)...what am I looking for in this? > You're looking for your argument string "blah" -- Don Read [EMAIL PROTECTED] -- "Beer i

RE: [PHP] dynamic website

2002-09-25 Thread Don Read
so, how do you around > this problem. > Yes it could. To get around it : benchmark & optimize your indexes and queries. Check into using persistant connections, it is normally a good idea in general -but watch out that you don't exhaust kernel resour

Re: [PHP] How do I do this PERL in PHP?

2003-09-17 Thread Don Read
#x27;'; $data=file_get_contents('dafile.txt'); $msgblks=explode('', $data); foreach($msgblks as $blk) { list($to, $subj, $msg) = explode($marker,preg_replace($pat, $marker, $blk)); ... do__your_stuff($to, $subj, $msg); ... } Regards, -- Don Read

Re: [PHP] German Date - GMDATE Function

2003-10-23 Thread Don Read
ale='de_CH.ISO_8859-1'; // Alternate: 'de_DE.ISO_8859-1' setlocale(LC_TIME, $locale); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that

Re: [PHP] Email Body

2003-10-23 Thread Don Read
il but no line breaks. Any suggestions? > double-quotes around your string? Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. --

RE: [PHP] How to remove new line character?

2003-11-03 Thread Don Read
On 02-Nov-2003 Koala Yeung wrote: > Thanks a lot > > I'd like to remove newline only. > Is there any simple way? > rtrim($str, "\r\n"); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. S

RE: [PHP] stepping through alphabet

2003-11-19 Thread Don Read
On 19-Nov-2003 Steve Buehler wrote: > > Amazing what I learned today. :) I love this list and its people. > How about one more? (ver 4.1.0): foreach(range('A', 'Z') as $letter) { echo $letter, "\n"; } Regards, -- Don Read

RE: [PHP] last_insert_id function

2001-01-24 Thread Don Read
inserted in that time? You're wrong; from the manual: " ... The last ID that was generated is maintained in the server on a per-connection basis. It will not be changed by another client. " Regards, -- Don Read[EMAIL PROTECTED] -

RE: [PHP] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Don Read
_USER,$PHP_AUTH_PW, $realm))) { Header('WWW-authenticate: basic realm="'.$realm .'"'); Header('HTTP/1.0 401 Unauthorized'); echo ''; echo 'Failed LoginInvalid name or password'; exit; } } return(true); } Regard

Re: [PHP] anchor "#" not working?

2001-03-04 Thread Don Read
emory on my part, but i think I've seen something similar (i.e. "" is flakey inside tables). play with putting within your or tags. Regards, -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin against God, not the bureaucracy.

RE: [PHP] Unix-time problem

2001-03-04 Thread Don Read
> > Any clues on how to fix this so that I can go beyond the past 31 years? > function get_birthdate($age_in_years) { list ($y,$m,$d) =explode('-', date('Y-m-d')); $bdstr=sprintf("%02d/%02d/%04d", $m, $d, $y - $age_in_years); return($bdstr); } Regards

RE: [PHP] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Don Read
ory, NOR does it clear any session > cookie. Again, works fine in other browsers, per spec. > Is this a NT-Domain network ? It's been a few years since i was sysadmining, but the user might have to log off the network domain/workgroup to re-select the credential file (luser.pwl file

RE: [PHP] Slideshow problem

2001-03-07 Thread Don Read
my loop. I am using latest php4 > version. You are confused on how HTTP works. http://www.acts.eku.edu/web/FASTWEB/HTMLOUCH.HTM (scroll down a couple of paragraphs) Regards, -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin again

RE: [PHP] Combo Box containing field

2001-03-10 Thread Don Read
dbres = @mysql_query($qry); if ($dbres) { echo ''; while ( $row = mysql_fetch_object($dbres)) { selectoption($row->id, $row->name, $usercountry); } echo "\n"; } Regards, -- Don Read

RE: [PHP] Getting name of the main file from external included s

2001-03-13 Thread Don Read
re some combination of $SCRIPT_FILENAME, $SERVER_NAME, $PHP_SELF, or REQUEST_URI is what you want. -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin against God, not the bureaucracy. God will forgive you but the bureaucrats won

RE: [PHP] software localization with PHP

2001-03-14 Thread Don Read
ntf specification as well. example: body_beg(SITENAME.' '.nls('Statistics')); // title & open body ... $ds=formatdate($dte); // localized date string ... printf('' .nls('Statistics for') ."\n", $ds); ... printf

RE: [PHP] Array help

2001-03-14 Thread Don Read
On 15-Mar-01 Chris wrote: > Hi, > Is there a way to do an array_pop with php3? > > unset($dirs[sizeof($dirs)-1]); // php4 array_pop(); Regards, -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin against God, not the

RE: [PHP] include() suggestion

2001-03-17 Thread Don Read
left(datesigned,10) as ds from webmaster where id=$qwid"; debug(__FILE__,__LINE__, $qry); $res = mysql_query($qry); if ( $res) { ... just add &debug=1 to the url to trace out execution. Regards, -- Don Read [EMAIL PROTECTED] -- If you

Re: [PHP] include() suggestion

2001-03-17 Thread Don Read
lude('fpstats.php'); if (isset($lint)) error_reporting(31); ... fpstats.php --- removed a semi-colon. browser output --- Parse error: parse error in fpstats.php on line 130 -- PHP/3.0.18 (maybe a 4.0 thing ?) Regards, -- Don Read

RE: [PHP] how do i get a variable type?

2001-03-17 Thread Don Read
strings and none > around integers). depending on your SQL engine, you can usually quote integers. Regards, -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin against God, not the bureaucracy. God will forgive you but the

Re: [PHP] PHP/MySQL & Control Structures -> if (mysql_query())

2001-03-20 Thread Don Read
{ $row = mysql_fetch_object($result); echo 'count: ', $row->cnt, ''; }  Regards, -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin against God, not the bureaucracy. God will forgive you but the bureauc

RE: [PHP] getcwd()

2001-04-15 Thread Don Read
On 15-Apr-01 kenny.hibs wrote: > Is there a php3 alternative to the getcwd() function > try: $cwd=`pwd`; -- or -- $cwd=`/bin/pwd`; Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to

RE: [PHP] Speed of MySQL connections - Socket vs. Non-Socket

2001-04-17 Thread Don Read
o add in the connection build & tear-down time. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Maili

RE: [PHP] Tip for cookies

2001-04-17 Thread Don Read
ied using a value from a cookie in a function and it never could > access it unless I passed it. Funny function my_func() { global $cookie; // ? if ($cookie == "thin mint") call_girl_scout(); } BTW, sometimes the hair does grow back. -- Don Read

RE: [PHP] select question

2001-04-17 Thread Don Read
| | tmpd| | trnc| | trnd| +-+ 10 rows in set (0.02 sec) mysql> show tables like 'tmp%'; ++ | Tables_in_cache (tmp%) | ++ | tmpc | | tmpd | +---

Re: [PHP] mySQL Question....

2001-04-17 Thread Don Read
efficient (faster) way? I don't want to DELETE the duplicates, just > don't want dups to show up in my SELECT queries. > > Thanks. > Jason > > select distinct(email_addr) ... -- Don Read [EMAIL PROTECTED] -- It's always da

Re: [PHP] IP address enconding

2001-04-19 Thread Don Read
urn(' '); for ($i = 0; $i < 4; $i++) { $k = (int) ($n / $msk); $n -= $msk * $k; $t[$i]= $k; $msk /=256.0; }; $a=join('.', $t); return($a); } Regards, -- Don Read [EMAIL PROTECTED] --

RE: [PHP] update form design question.

2001-04-25 Thread Don Read
. Should I update the DB as I move to the next > page or perhaps after all pages are viewed? > > Anyways, any thoughts, ideas and or suggestions are all welcome. I'd think a "commit changes" on the last page would be more intuitive for the users, but the programming would

RE: [PHP] the SkyBiz matrix|downline program using PHP & mySQL

2001-04-25 Thread Don Read
eople o one's > right & left is getting impossible logically. > please help! I'd kinda imagine it would. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor&#

Re: [PHP] HTTP authentication : logout!!!

2001-05-08 Thread Don Read
if (! (isset($PHP_AUTH_USER)) ) { authheader($realm); exit; } if (! (checklogin($PHP_AUTH_USER, $PHP_AUTH_PW, $realm)) ) { authheader($realm); echo 'Failed Login'; exit; } } Regards, -- Don Read [E

RE: [PHP] Date & Time Formatting ??

2001-05-08 Thread Don Read
em to really be able to vary the DB format. combine the date & time: mystamp datetime .. select date_format(mystamp,'%m-%d%Y %r') as ts from blah; > > Any examples or links to good docs appreciated find /usr/local -name "manual.txt" -print | gre

Re: [PHP] HTTP authentication : logout!!!

2001-05-08 Thread Don Read
$row = mysql_fetch_object($result); >> if ($row) { >> return(true); >> } >> return(false); >> } >> Basically it's a spin-lock file that is checked on login ... could just as easily be done as a shared semaphore, DB entry, whatever. Reg

RE: [PHP] Wrapping text to store in the database

2001-05-08 Thread Don Read
mean > how to wrap it up in html tags? > > Ideas? nl2br() Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- P

RE: [PHP] Default values in MySQL

2001-05-08 Thread Don Read
r(80) DEFAULT '' NOT NULL, contact varchar(80) DEFAULT '' NOT NULL, addr1 varchar(80) DEFAULT '' NOT NULL, addr2 varchar(80), city varchar(80) DEFAULT '' NOT NULL, ... Not that it has anything to do with PHP. htt

RE: [PHP] PHP Mysql query data conversion newbie

2001-05-10 Thread Don Read
} else { > echo $amyrow["date"]; >} } else { echo 'pfsst.'; } >echo ""; > } > HTH Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest b

RE: [PHP] Newbie... Executing UNIX commands...

2001-05-10 Thread Don Read
On 10-May-01 macky wrote: > im using PHP + APACHE on Linux Box > > i wonder what command in PHP can i use to execute Unix commands $foo=`ls` thats a "back-tick" Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkes

RE: [PHP] PHP + GD + FreeBSD

2001-05-10 Thread Don Read
l -name "libpng*" -print to see if the libs exists, if not cd /usr/ports/graphics/png make && make install (may want to do gd as well) cd /usr/ports/graphics/gd make deinstall make && make install then build php. Regards, -- Don Read

  1   2   3   >