Re: [PHP] proxy server

2006-08-14 Thread John Taylor-Johnston
ervers won't do diddly-squat... I'm sure. CGI proxy I think is the key word I'm looking for. I would even pay $10 per year for an SMTP access account if it fixed my problems. John -- John Taylor-Johnston --

[PHP] RSS Creator

2006-08-30 Thread John Taylor-Johnston
Has anyone created an RSS feed creator in PHP? I could make one fast enough, but ... John -- John Taylor-Johnston - "If it's not Open Source, it's Murphy's Law." ''&#

[PHP] Alternative to FCKeditor

2006-09-24 Thread John Taylor-Johnston
Anyone know of a good alternative to FCKeditor? Or a decent file uploader? Even after paying for a little help, I get zip for FCK. I need another solution, another editor with an active forum or support, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

[PHP] Removing quotes

2006-10-10 Thread John Taylor-Johnston
Someone kindly gave me this once. I now need to reverse engineer it to remove the quotes and plus signs from $searchenquiry. Is it as simple as this? // FINAL RESULT: [+"john" +"johnston"] $sEnquiry = preg_replace("/\s+/", "+", $sEnquiry); // RESULT: ["john" "johnston"] $sEnquiry

[PHP] If array()

2006-10-10 Thread John Taylor-Johnston
How can I use "if" to see an array contains something? if ($array()) does not work, of course. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us

2006-10-16 Thread John Taylor-Johnston
This is what http_accept_language gives me depending on which browser. Depending on the visitor in my region, it will either be French or English. _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us,en;q=0.8,fr;q=0.5,fr-ca;q=0.3 _SERVER["HTTP_ACCEPT_LANGUAGE"] fr-ca,en-us;q=0.5 Is this a reasonable approa

Re: [PHP] _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us

2006-10-17 Thread John Taylor-Johnston
Stut, Richard, Thanks for the feedback! Quebec has a language law, so I'm obligated to serve French first. I can wiggle around that if the preferred language is "other". John Is this a reasonable approach? if(stristr($_SERVER["HTTP_HOST"],"fr")) { include("french.htm");}else{ include("english

[PHP] testing 234

2006-03-16 Thread John Taylor-Johnston
Are any of my posts getting through? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] making a tutorial

2006-03-16 Thread John Taylor-Johnston
I'm making a tutorial and don't really understand how to do this myself :) Which of the following pets do have at home: dog cat snake snake none of these How do I parse favourite[]? I might have 2 or 5, so I need to parse ^0] - nMax. It is a checkbox. I might use favourite[] with mail() or s

Re: [PHP] testing 234

2006-03-16 Thread John Taylor-Johnston
Are any of my posts getting through? They don't appear to be. This one only made it halfway :P Yeah, it doesn't seem to accept my email from another address. Thanks Rob. I was trying to post something last night and it never got through. This email seems acceptable to the group Gods. -- PHP Ge

[PHP] PHP post data

2006-04-05 Thread John Taylor-Johnston
Scrolling back and forward through my PHP generated search engine, my browser (FF) alerts to remind me that I have post data. What kind of header can I add to avoid it doing that? Else what is the problem? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

[PHP] Faking Boolean

2006-04-05 Thread John Taylor-Johnston
How can I take enquiry: or and parse its value to come up with this to do a boolean search +"john" or +"john" +"johnston" Does there exist a function yet :) ? I suppose I could explode $searchenquiry for spaces and reassemble the bits? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Faking Boolean

2006-04-06 Thread John Taylor-Johnston
Thanks! Your first appraoch seems to make clearer sense for me. Great pinch hit, John Paul Novitski wrote: If you're splitting your search string into discrete words, most search engine logic doesn't require quotes. Typically, quotation marks combine multiple words into single expressions, wh

[PHP] hosting reselling

2006-05-05 Thread John Taylor-Johnston
Kind of off-topic. My current ISP has problems with quality control: especially offering php 5 & mysql. Also rates keep going up per account. Reselling is beginning to look very interesting. Anyone have any recommendations for a reseller where I can host 5 sites myself with very low bandwidth

[PHP] 404 errors

2006-05-16 Thread John Taylor-Johnston
I get a lot of 404 errors. Is there a way in PHP to redirect them in such a way as it does not burn my bandwidth? Or (an Apache trick I learned once) to discourage them by referring them to localhost? Or something? Something I can embed in PHP. John -- PHP General Mailing List (http://www.php.

[PHP] PHP Notice: Undefined index

2006-05-19 Thread John Taylor-Johnston
Any idea why this bit of code if("yes" == $_POST['submitter']) { mysql_select_db($db,$myconnection); $sql = "INSERT INTO `$db`.`$table` (name,email,comments,entrydate) values ('$name','$email','$comments','$entrydate')"; mysql_query($sql) or die(print mysql_error()); } is provoking

[PHP] Date() finding yesterday

2006-05-20 Thread John Taylor-Johnston
I cannot seem to get this right. How can I produce yesterday? $today = date("Y-m-d"); $yesterday = date("Y-m-") . date("d")-1; $yesterday = date("Y-m-d")-1; $yesterday = date("Y-m-"."d"-1); I've been looking at the manual :) ... Thanks, John -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] PHP Notice: Undefined index

2006-05-22 Thread John Taylor-Johnston
s it's called after they hit submit and it has something in it? if (isset($_POST['submitter']) && "yes" == $_POST['submitter']){ http://php.net/isset -- John Taylor-Johnston ---

[PHP] mysql_num_rows

2006-05-30 Thread John Taylor-Johnston
How can I get an integer value for mysql_affected_rows()? I get text: " n Database Transfer(s)". I would like to create my own error flag and exit; if the number of affected rows is <= 0. The example for mysql-num-rows in the manual does not work. I have MySQL - 4.1.12. $num_rows = mysql_n

[PHP] FImage $aSubDir

2008-10-28 Thread John Taylor-Johnston
I have http://www.flash-here.com/downloads/fhimage.html installed. I like it just the way it is. But instead of displaying (see function below). Instead of displaying the file name under the photo, weak excuse for a caption, I would like to open and nl2br the contents of a like named text file.

[PHP] Re: FImage $aSubDir

2008-10-28 Thread John Taylor-Johnston
Could it be this easy? $chopped= strlen($aFn) - 4; $filename = $chopped.".txt"; print"color='#99'>"; include($filename); print""; John Taylor-Johnston wrote: I have http://www.flash-here.com/downloads/fhimage.html installed. I like it jus

Re: [PHP] Detect language date(F)

2004-01-26 Thread John Taylor-Johnston
t; } else if (preg_match("/^([a-z]{2})$/i", $_SERVER["HTTP_ACCEPT_LANGUAGE"], > $m='')) { // e.g. de >$locales[] = strtolower($m[1])."_".strtoupper($m[1]); // e.g. de_DE >$locales[] = strtolower($m[1]); // e.g. de >setlocale(LC_TI

Re: [PHP] Detect language date(F)

2004-01-26 Thread John Taylor-Johnston
But even if I change my browser language to de-ch, I stll get "February" when I run it. http://www.glquebec.org/glq2-test/english/testlanguage.php ? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [php] search.php

2004-01-29 Thread John Taylor-Johnston
I want to create an old fashioned search function that will look in *.htm and *.html files above /home/user/public_html and return a URL. Anything handy ? Haven't done or seen something like that since my Perling days. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] [php] search.php

2004-01-29 Thread John Taylor-Johnston
Raditha, mnogsearch spans sites and aspseek is ASP. I was hoping for something simple in PHP <|:( J Raditha Dissanayake wrote: > grep > htdig > mnogsearch > aspseek > google appliance > > John Taylor-Johnston wrote: > > >I want to create an old fashioned search

[PHP] search.php

2004-01-31 Thread John Taylor-Johnston
I found this script. I would like to modify it so it searches in not just the current directory, but also any other subdirectories. There are maybe better scripts out there, but I like this one for its simplicity. Can anyone lend a hand please? John "," ", $bleh); if (str

Re: [PHP] search.php

2004-01-31 Thread John Taylor-Johnston
subdir in the array. It probably is far from the most elegant way, but > offers the least amount of real editing/manipulation. > > I welcome any/all flaming for my suggestion :) > > -M > > -Original Message- > From: John Taylor-Johnston [mailto:[EMAIL PROTECTED

Re: [PHP] search.php

2004-02-01 Thread John Taylor-Johnston
Where or what recursive function would I need to get all sub-directories? If not, can someone suggest another script? Much appreciated, John Taylor-Johnston - Université de Sherbrooke http://compcanlit.ca/ Mike Brum

[PHP] search.php

2004-02-01 Thread John Taylor-Johnston
Can anyone give me a heads up on how to recurse for sub-directories please? What function can I use? I'm still kind of new at this, John > 1) set $which_one to the directory you want to search. > 2) create a recursive funtion (many on php.net) to get all subdirectories > under it and build an ar

Re: [PHP] search.php

2004-02-01 Thread John Taylor-Johnston
ome specific problems no one > has the time to code for you. > > John Taylor-Johnston wrote: > > >Can anyone give me a heads up on how to recurse for sub-directories please? What > >function can I use? > >I'm still kind of new at this, > >John > > > >

[PHP] Need to refine this:

2004-02-03 Thread John Taylor-Johnston
Hi, I need to refine this. I'm tired ... long day. I would like to echo $mydata->district only once unless it changes. echo "\n"; while ($mydata = mysql_fetch_object($glquery)) { #- if $mydata->district is different, then echo "$mydata->district\n"; echo "$mydata->city $mydata->plac

[PHP] Re: What should the permissions on a PHP file be?

2004-02-03 Thread John Taylor-Johnston
rw-r-r should do it. Permissions really only become an issue using Perl. PHP is very accomodating that way. Pooya Eslami wrote: > I need to know what is the most secure and reliable way to put permissions > on a .php file. > I usually put it as rw-r-r, is this good or is there a better way of >

[PHP] Re: authentication comparing to /etc/passwd

2004-02-03 Thread John Taylor-Johnston
password in a form, and compare the username and password and > see if the username exists and the password is correct? > > basically I want to have a page where a person enters their username and > password and if correct to use the header function to send the

[PHP] Re: authentication comparing to /etc/passwd

2004-02-03 Thread John Taylor-Johnston
Found this too: You are not authorised to enter the site \n"; exit; } else { if (!($conn=ora_logon("[EMAIL PROTECTED]",$PHP_AUTH_PW))) { Header("WWW-authenticate: basic realm=\"$SID\""); Header("HTTP/1

Re: [PHP] Need to refine this:

2004-02-03 Thread John Taylor-Johnston
Jason, > You're tired so you want others to do your work? No ... > Maintain a 'flag' which stores 'previous' value of $mydata-district. If 'flag' > and $mydata-district differ print $mydata-district and update 'flag'. I cannot declare $temp = $mydata->district; outside while ($mydata so ... ? I

Re: [PHP] Need to refine this:

2004-02-03 Thread John Taylor-Johnston
> [1] http://us2.php.net/manual/en/control-structures.do.while.php > Thanks! Didn't see that page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] extract(filename)

2004-02-04 Thread John Taylor-Johnston
In Borland Delphi, I can extract a filename from the paramstr(0) and then exchange out the extension. ChangeFileExt(extractfilename(paramstr(0)), '.html'); Is there a way to extract the filename of "/home/www/calendars/february2004.html" and swap its extension for .htm? february2004.htm is pure

Re: [PHP] extract(filename)

2004-02-04 Thread John Taylor-Johnston
Burhan, Novel indeed! RTFM :) I was playing around with filename and a few other words. Didn't think of basename. Thanks, J > > Is there a way to extract the filename of > > "/home/www/calendars/february2004.html" > > and swap its extension for .htm? > How about starting at the manual? What a nove

[PHP] pathinfo() & basename()

2004-02-04 Thread John Taylor-Johnston
I'm getting this error: Warning: basename() expects parameter 1 to be string, array given in /home/users/q/qx04t9mu/www/calendars/test3.php on line 8 What did I do wrong? $extension is a string?! line 2>$fullpath = pathinfo($_SERVER["SCRIPT_FILENAME"]); line 3>echo $fullpath["extension"] . "\n"

[PHP] MySQL: Order by

2004-02-04 Thread John Taylor-Johnston
This is probably a MySQL question, and maybe an easy question, but I'm here to learn <|:) When I order by number, it echoes 1,2,3,4,5,6,7,8,9,10 and hten jumps to 100...199 before it comes back to 11-19. Any way of ordering that differently? $sql = 'SELECT * FROM '.$table.' ORDER BY number desc

RE: [PHP] MySQL: Order by

2004-02-05 Thread John Taylor-Johnston
Thanks all. That solved the problem. I should have realised it. Still learning ... :) -- John Taylor-Johnston http://compcanlit.ca/ > Sounds like your 'number' column is not actually a number but a string. > Change it to type INT and that should fix it. > Chris. -- PHP G

[PHP] Can I do this?

2004-02-07 Thread John Taylor-Johnston
Can I include a script on another server doing this? $sql = 'SELECT * FROM '.$table.' where number like '.$number.';'; http://foo.com?list.php?number=16 include("http://elsewhere.com/list.php";); My $sql is error-ing - obviously. http://elsewhere.com/list.php is not receiving $number. Can I ev

[PHP] Re: Can I do this?

2004-02-08 Thread John Taylor-Johnston
Ah! A little experimenting ... Yes I can :) Answered my own question. include("http://elsewhere.com/list.php?number=$number";); André Cerqueira wrote: > John Taylor-Johnston wrote: > > > Can I include a script on another server doing this? > > > > $sql = 

Re: [PHP] Re: Can I do this?

2004-02-08 Thread John Taylor-Johnston
>they would be able to see your php code. How?!?! Adam Bregenzer wrote: > On Sun, 2004-02-08 at 03:18, John Taylor-Johnston wrote: > > Ah! A little experimenting ... Yes I can :) Answered my own question. > > > > include("http://elsewhere.com/list.php?number=$num

Re: [PHP] Revised: RE: [PHP] Re: Can I do this?

2004-02-11 Thread John Taylor-Johnston
This thread is still alive? :) What you see is what you include. André was mistaken. That is the lesson. And there is no danger. If there was, folks would have stopped using PHP long ago. In my case, I'm hijacking my own script on another server. I'm doing it only because I don't have access to

[PHP] Re: phpMyAdmin Problems

2004-02-11 Thread John Taylor-Johnston
and password and paste them > into the proper folders? > > I put a couple screenshots that illustrate what I described online at > http://geowebworks.geobop.org/test/phpmyadmin/index.php > > Thanks. -- John Taylor-Johnston ---

Re: [PHP] phpMyAdmin Problems

2004-02-11 Thread John Taylor-Johnston
Helpful, isn't he. If you can't find it in your config file, post again and I'll show you what i have in mine. John Jason Wong wrote: > This has nothing to do with PHP. Please ask on the relevant list/forum. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

[PHP] Split()

2004-02-17 Thread John Taylor-Johnston
Can I while this? Not sure how to go about it? while ($pieces exist) { echo $pieces[i]; } Thanks, John $pizza = "piece1 piece2 piece3 piece4 piece5 piece6"; $pieces = explode(" ", $pizza); echo $pieces[0]; // piece1 echo $pieces[1]; // piece2 http://www.php.net/manual/en/function.explode.php h

[PHP] Re: Split()

2004-02-17 Thread John Taylor-Johnston
I can do this, but want to understand how to while it: Or should I? $tempslices = explode("\r\n", $pizza); foreach ($tempslices as $singleslice) { echo "http://www.foo.org$singleslice\";>$singleslice "; } Still learning :) John Taylor-Johnston wrote: >

Re: [PHP] Re: Split()

2004-02-17 Thread John Taylor-Johnston
r\";>$singleauthor "; } "John W. Holmes" wrote: > From: "John Taylor-Johnston" <[EMAIL PROTECTED]> > > > I can do this, but want to understand how to while it: Or should I? > > > > $tempslices = explode("\r\n", $p

[PHP] mem

2004-02-17 Thread John Taylor-Johnston
I'm not even sure if this is a Unix thing, or if it can be done, but ... How can I read the amount of memory used in a directory /var/something/ (and maybe sub-directories) and echo it? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mem

2004-02-17 Thread John Taylor-Johnston
Both for that matter. I have root access. I want to echo how much /var/xxx contains, and while I'm at it, how much my partition contains and how much is used. Gerard Samuel wrote: > On Wednesday 18 February 2004 01:25 am, John Taylor-Johnston wrote: > > I'm not even sure if t

Re: [PHP] mem

2004-02-17 Thread John Taylor-Johnston
That was very helpful, thanks, John - Edwin - wrote: > Not that this is still a php question but... > > On Wed, 18 Feb 2004 01:38:39 -0500 > John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > > > Both for that matter. I have root access. I want to echo how > >

Re: [PHP] mem

2004-02-17 Thread John Taylor-Johnston
thanks Gerard Samuel wrote: > On Wednesday 18 February 2004 01:38 am, John Taylor-Johnston wrote: > > Both for that matter. I have root access. I want to echo how much /var/xxx > > contains, and while I'm at it, how much my partition contains and how much > > is used.

[PHP] include (byname.php?lang=fr");

2004-02-18 Thread John Taylor-Johnston
I want to create a language option, so the resulting html is in French or English, depending. But passing variables like this doesn't work: echo $lang; // 'fr' Warning: main(): Failed opening '../_phpcode/byname.php?lang=fr' for inclusion (include_path='.:/usr/local/share/pea

Re: [PHP] include (byname.php?lang=fr");

2004-02-18 Thread John Taylor-Johnston
Why didn't I think of that :) ? Thanks John, John "John W. Holmes" wrote: > From: "John Taylor-Johnston" <[EMAIL PROTECTED]> > > > I want to create a language option, so the resulting html is in French or > English, depending. But passing variables

[PHP] enum('part1','...')

2004-02-23 Thread John Taylor-Johnston
Basically I have an enum field. I would like to extract the parts of the field to create some html. district enum('part1','part2','part3','part4') while (district??) { echo "".district[0]." } part1 part2 part3 part4 Can I even do this? How? J -- PHP General Mailing List (http://www.php.net/

Re: [PHP] enum('part1','...')

2004-02-23 Thread John Taylor-Johnston
rict,"\n"; > } > > Note: I'm using single quotes for some of the string chunks to eliminate the > multiple backslashes for the double quotes. I'm also using commas to echo > the 5 parts in sequence, rather than concatenate them then echo the result. > > &

Re: [PHP] enum('part1','...')

2004-02-23 Thread John Taylor-Johnston
2004 11:57, John Taylor-Johnston wrote: > > Basically I have an enum field. I would like to extract the parts of the > > field to create some html. > > Can I even do this? > yes > > How? > archives > -- > Jason Won

Re: [PHP] Send mail with attached

2004-02-23 Thread John Taylor-Johnston
I know I have something in here that did it. [Shake, shake, rattle, bump] This is how I send an image in a postcard maker I fashioned once: http://www.CollegeSherbrooke.qc.ca/languesmodernes/jtjohnston/0postcard0/send_mail.phps http://www.CollegeSherbrooke.qc.ca/languesmodernes/jtjohnston/0postca

Re: [PHP] enum('part1','...')

2004-02-23 Thread John Taylor-Johnston
Hmm. http://marc.theaimsgroup.com/?l=php-general&m=106933918806372&w=2 > -Original Message- > From: Alan Lord [mailto:[EMAIL PROTECTED] Lord?! Wasn't one of those perl dark lords was it? :) I'll try the code. Jason Wong wrote: > On Tuesday 24 February 2004

[PHP] calendar class

2004-02-24 Thread John Taylor-Johnston
Anyone recommend a good calendar class at phpclasses.org or elsewhere? Something I can install with ease and teach someone else to use and update using, oh say phpmyadmin? Thanks, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: htacess

2004-02-25 Thread John Taylor-Johnston
Manuel, Do you have a command line access to the server? http://httpd.apache.org/docs/programs/htpasswd.html htpasswd -b /var/www/html/db/tools/htpasswd.users jdaxell ** (batch mode) htpasswd -c /var/www/html/db/tools/htpasswd.users jdaxell (creation mode) htpasswd /var/www/html

[PHP] [php] if $sql has returned something

2004-02-25 Thread John Taylor-Johnston
I'm trying to figure out something. I found some calendar making code. For each table cell, I want to add $day around $day if an entry exists in $db.$table $sql = 'SELECT * FROM '.$db.'.'.$table.' where eventid like '.$eventid.';'; if ($sql ??) {echo "$day"; }else{ echo "$day"; } How do I code

Re: [PHP] [php] if $sql has returned something

2004-02-25 Thread John Taylor-Johnston
($glquery) { echo " $day "; }else{ echo " $day "; } Bao Ruixian wrote: > John Taylor-Johnston wrote: > >$sql = 'SELECT * FROM '.$db.'.'.$table.' where eventid like '.$eventid.';'; > >if ($sql ??) > This will do: > if ($sql) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [php] if $sql has returned something

2004-02-25 Thread John Taylor-Johnston
t; >$eventid = $link_date; > >$sql = 'SELECT * FROM '.$table.' where eventid like '.$eventid.';'; > >#echo $sql; > >#SELECT * FROM GMCalendar where eventid like 2004-02-16; > >$glquery = mysql_query($sql); > > > >if ($glquery) >

Re: [PHP] [php] if $sql has returned something

2004-02-25 Thread John Taylor-Johnston
Richard, Thanks. Should I still include the die ? $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $eventid = $link_date; $sql = 'SELECT * FROM '.$table.' where eventid like \''.$eventid.'\';'; $glquery = mysql_query($sql) or die("Invalid query: " . mysql_e

Re: [PHP] [php] if $sql has returned something

2004-02-25 Thread John Taylor-Johnston
Very helpful & much appreciated. Richard Davey wrote: > Hello John, > > Wednesday, February 25, 2004, 6:26:41 PM, you wrote: > > JTJ> Richard, > JTJ> Thanks. Should I still include the die ? > > JTJ> $glquery = mysql_query($sql) or die("Invalid query: " . mysql_error()); > > It's up to you, I nev

[PHP] function.date.php

2004-02-25 Thread John Taylor-Johnston
Is there a way to reverse engineer http://www.php.net/manual/en/function.date.php ? I want to feed in 2003-02-28 and extract February 28, 2003. I can substr it out ... $eventid = "2003-02-28"; $year = substr($eventid, 0,4); $month = substr($eventid, 5,7); $year = substr($eventid, 8,10); But the

[PHP] strip html

2004-03-02 Thread John Taylor-Johnston
Is there a function to strip html from a string? This function seems to stip out everything between the tags too, no? http://www.php.net/manual/en/function.strip-tags.php John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: strip html

2004-03-02 Thread John Taylor-Johnston
Scrap that. Sorry. My fault. Understood. :) J John Taylor-Johnston wrote: > Is there a function to strip html from a string? > This function seems to stip out everything between the tags too, no? > http://www.php.net/manual/en/function.strip-tags.php > > John -- PHP General Mai

[PHP] Re: why use safe mode?

2004-03-02 Thread John Taylor-Johnston
>Just wondering why some do and some don't use safe mode, It comes set to off in php.ini. Paranoia likely, I don,t know. You are talking about this in php.ini? ; Safe Mode ; safe_mode=Off You might be able to turn it off in your script? Run phpinfo(); to see if it is available. Someoen with mor

[PHP] Arrays & Keys?

2004-03-24 Thread John Taylor-Johnston
Am I doing this right? Is there a better way? Am I doing this key thing right? I'm doing the language thing. I have no extra plugins or rpms to help do this properly. So I need advice. Is this going to work? I'm trying to make sense of http://www.php.net/manual/en/language.types.array.php $date =

[PHP] Re: Arrays & Keys?

2004-03-25 Thread John Taylor-Johnston
http://www.php.net/manual/en/function.setlocale.php That is the problem. I have tried that, but it needs to be installed. I'm not in a position to ask on this particular server. I have PHP Version 4.3.4 all the same. http://www.glquebec.org/English/test.php The code echoes Friday 22 December 1

[PHP] [php] php reply to email

2004-04-01 Thread John Taylor-Johnston
How might I email into my php script. I have created a little BBS and would like to combine the functionality of an emailing list, a bit like Yahoo groups. Every time there is a post on my BBS, subscribed users get a copy. But, they would like to reply to the email, not click on a URL. When they

[PHP] NMax

2004-11-06 Thread John Taylor-Johnston
How can I calculate how many records I have in a table? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: NMax

2004-11-06 Thread John Taylor-Johnston
I might add, I do this, think there must be a better way? $mycounter = 0; while ($mydata = mysql_fetch_object($news)) { $mycounter++; } John Taylor-Johnston wrote: > How can I calculate how many records I have in a table? > John -- PHP General Mailing List (http://www.php.ne

[PHP] Display an image

2004-11-12 Thread John Taylor-Johnston
I have a longblob with a jpeg loaded in it. But how do I display it? `photo` longblob NOT NULL, This doesn't work :) I need header information, etc. So what does? echo "\n"; I don't have an example to work with. John --snip- $sql2 = "select * from ".$db.".".$table"; $

[PHP] [php] What does PHP mean?

2004-11-22 Thread John Taylor-Johnston
p. It is a general question? :) -- John Taylor-Johnston - "If it's not Open Source, it's Murphy's Law." °v° Bibliography of Comparative Studies in Canadian, Québec and Foreign Literatures

[PHP] if(date("Y-m-d") >

2005-01-10 Thread John Taylor-Johnston
his is week $week[i]"; Can someone show me how please? = $week3) { echo "this is week 3"); } ?> Thanks, John -- John Taylor-Johnston - "If it's not Open Source, it's Murphy's

[PHP] Date()

2005-01-15 Thread John Taylor-Johnston
quot;2005-01-24"; $week3 = "2005-01-31"; $week4 = "2005-02-07"; $week5 = "2005-02-14"; $week6 = "2005-02-21"; $week7 = "2005-02-28"; `Doable´? Easy enough to learn how to do? John -- John Taylor-Johnston -

[PHP] Re: Date()

2005-01-15 Thread John Taylor-Johnston
gt; > > John > > Hi John, > > // convert your data to a timestamp: > $firstDayTs = strtotime($week5); > > // add 4 days > $lastDayTs = $firstDayTs + (4 * 86400); > > echo date('F', $firstDayTs) . ' ' . date('m', $firstDayTs) . '-&#

[PHP] Re: Date()

2005-01-15 Thread John Taylor-Johnston
Torsten, Whatever the combination, it echos "February 02-2005February 02-2005February 02-2005". What is wrong with it? "; echo date('F', $firstDayTs) . ' ' . date('m', $firstDayTs) . '-' . date('Y',$lastDayTs) ."&qu

[PHP] Geographical tendancies with RemoteHost

2005-01-22 Thread John Taylor-Johnston
With my counter, I track RemoteHost and IPAddress and save it in a mysql table. One of my colleagues asked me these questions (below). I can track number of hits per month. Is there any OS code anywhere that I might implement to see geographical tendencies? John >Is it possible to track this as

[PHP] if(($mydata->address

2005-06-01 Thread John Taylor-Johnston
This should be easy, but refuses to work: if( ($mydata->address != "") and ($mydata->addresspublic == "yes") ) { } But in other combinations, they work? if($mydata->address != ""){} or if($mydata->addresspublic == "yes"){} So what new

Re: [PHP] if(($mydata->address

2005-06-01 Thread John Taylor-Johnston
nk If I do this... if("" = $mydata->foo) // an error is thrown. If I come back in and finish the comparison operator (which I needed to know was broken) it fixes the conditional statement at this point. -- John Taylor-Johnston -

[PHP] mozilla & urlencode

2005-06-03 Thread John Taylor-Johnston
I seem to have a problem with Mozilla or with IE? echo "district)."\">"; http://foo.org/_private/directory.php#Montr%E9al+District+%234 works in IE6, but Mozilla will not accept it. Mozilla does not work. Am I approaching this wrong? Should I create my HTML this way? echo "district."\">";

Re: [PHP] mozilla & urlencode

2005-06-03 Thread John Taylor-Johnston
I sent this to Mozilla groups. I'm beginning to wonder if Mozilla supports ? I think re-asked my question clearer below. John i dont think having a + in an achor tag is standard.. but i could be wrong. I'm truly hoping this is a reported bug already. This URL does not work in most recent up

Re: [PHP] mozilla & urlencode

2005-06-04 Thread John Taylor-Johnston
This works: "District of St. Francis" http://www.glquebec.org/tezt.php#District+of+St.+Francis This does not: "Montréal District #2" http://www.glquebec.org/tezt.php#Montr%E9al+District+%232 I'm beginning to see the problem lies with the French character "é". I don't see it being #. In any

[PHP] $date("l-m");

2005-06-04 Thread John Taylor-Johnston
$mydata->lastinsalled = "2004-05"; How can I determne if $mydata->lastinsalled is one year or more older than the current $date("l-m"); Anyting simple and over looked? I have been browsing the manual:: http://ca.php.net/manual/en/function.strtotime.php http://ca.php.net/manual/en/function.date

Re: [PHP] mozilla & urlencode

2005-06-05 Thread John Taylor-Johnston
Egads!! But thank you for the research. Back to the drawing board. John Jochem Maas wrote: John Taylor-Johnston wrote: I'm beginning to see the problem lies with the French character "é". I don't see it being #. In any case, I cannot change existing fields. How ca

[PHP] replace striing éèêà

2005-06-05 Thread John Taylor-Johnston
Can someone show me how to get rid of international characters in $string? Is there a function already made? You cannot use accented characters in a name reference : name="montréal">. I guess this below is a start. Is there a better way? John http://ca.php.net/manual/en/function.str-replace.php

[PHP] $mydata->StampDate

2005-06-26 Thread John Taylor-Johnston
John -- John Taylor-Johnston - "If it's not Open Source, it's Murphy's Law." ' ' 'Collège de Sherbrooke: ô¿ôhttp://www.collegesherbrooke.qc.ca/languesmodernes/ - 819-56

[PHP] Re: $mydata->StampDate

2005-06-26 Thread John Taylor-Johnston
n.strtotime.php John Jasper Bryant-Greene wrote: John Taylor-Johnston wrote: I created my own counter. I have a varchar (10) field that resembles a date: 2005-06-26. Now I would like to parse out $mydata->StampDate to find how many hits per day I have had since "2003-08-23". Where d

[PHP] date field

2005-08-10 Thread John Taylor-Johnston
I have a field 'updated' How can I tell if the date is older than 1 year ago (or should I think of 365 days)? `updated` date NOT NULL default '1999-12-12' I've looked at: http://ca3.php.net/manual/en/function.getdate.php Thanks, John -- PHP General Mailing List (http://www.php.net/) To unsubs

[PHP] IP & Geographical

2005-08-11 Thread John Taylor-Johnston
I have a field in my counter that collects IP addresses. Now the powers that be want be to collect that data and sort it geographically etc. Is there anyone who has done this? Where would I find some OS code? I've heard of it done. John -- PHP General Mailing List (http://www.php.net/) To unsub

[PHP] Re: date field

2005-08-11 Thread John Taylor-Johnston
Thanks Ben! John Ben Ramsey wrote: In PHP, you could do something like: $updated = strtotime($db_result['updated']); $one_year_ago = strtotime('-1 year'); if ($updated < $one_year_ago) { // updated date is older than a year ago } John Taylor-Johnston

[PHP] wrapping text

2005-08-13 Thread John Taylor-Johnston
Folks are complaining mail arrives and text will not wrap. $message comes directly from a textarea. Old mail readers, I guess? How can I make their life better and make the text wrap? mail("[EMAIL PROTECTED]", stripslashes($subject), stripslashes($message), "Return-Path: <[EMAIL PROTECTED]>\r\n

[PHP] Re: wrapping text

2005-08-13 Thread John Taylor-Johnston
>"wordwrap(stripslashes($message), 72)". Thanks! Another reason why I gave up on Perl :) A fucntion made already since 4.0.2.! :) Matthew Weier O'Phinney wrote: Folks are complaining mail arrives and text will not wrap. $message comes directly from a textarea. Old mail readers, I guess? Ye

[PHP] php explained in sql

2005-08-19 Thread John Taylor-Johnston
In php, if I wanted to know if $mydata->email contained something, I would do this, right? if ($mydata->email) {} How would I express this in SQL (MySQL)? Thanks. Sorry to be off-topic, if I am, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

<    1   2   3   4   5   6   >