[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
$_POST['submitter'] has anything in it, and sometimes 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 =

[PHP] if string contains

2005-09-29 Thread John Taylor-Johnston
Humour me. I knew how to do this. I want to parse $searchenquiry and see if it contains searchenquiry=. Good grief, sorry. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] if string contains

2005-09-29 Thread John Taylor-Johnston
Jasper Bryant-Greene wrote: John Taylor-Johnston wrote: Humour me. I knew how to do this. I want to parse $searchenquiry and see if it contains searchenquiry=. $yourAnswer = ( strpos( $searchenquiry, 'searchenquiry=' ) !== false ); Thanks, John -- PHP General Mailing List (http

Re: [PHP] if string contains

2005-09-29 Thread John Taylor-Johnston
()* http://ca.php.net/manual/en/function.strpos.php instead. Rob Agar wrote: heh. you perhaps remember the strstr function..? :) Rob -Original Message- From: John Taylor-Johnston [mailto:[EMAIL PROTECTED] Sent: Friday, 30 September 2005 2:26 PM To: php-general@lists.php.net

[PHP] creating a shopping cart.

2005-10-01 Thread John Taylor-Johnston
they want to store and then have a check out where I'll header it all into a txt file. session_name(ESLpostcard); session_start(); session_register(yourname); if (isset($HTTP_POST_VARS[yourname])) $yourname = $HTTP_POST_VARS[yourname]; -- John Taylor-Johnston

[PHP] session_name(CCLTrolley)

2005-10-01 Thread John Taylor-Johnston
$TrolleyContents is a string. Basically what I want to accomplish here is if $TrolleyContents already exists append $AddToTrolley to $TrolleyContents, if not register $TrolleyContents. Am I going about it right? John ?php #printcontents.php session_name(CCLTrolley); session_start(); if

Re: [PHP] session_name(CCLTrolley)

2005-10-01 Thread John Taylor-Johnston
Robert Cummings wrote: On Sat, 2005-10-01 at 23:57, John Taylor-Johnston wrote: $TrolleyContents is a string. Basically what I want to accomplish here is if $TrolleyContents already exists append $AddToTrolley to $TrolleyContents, if not register $TrolleyContents. Am I going about

Re: [PHP] session_name(CCLTrolley)

2005-10-01 Thread John Taylor-Johnston
'] ) == '' ) { $_SESSION['TrolleyContents'] = $_POST['AddToTrolley']; } else { $_SESSION['TrolleyContents'] .= ','.$_POST['AddToTrolley']; } } echo $_SESSION['TrolleyContents']; phpinfo(); ? Robert Cummings wrote: John Taylor-Johnston wrote: Robert Cummings wrote: Why is it outdated

Re: [PHP] session_name(CCLTrolley)

2005-10-01 Thread John Taylor-Johnston
Robert Cummings wrote: ?php session_name( 'CCLTrolley' ); session_start(); // Initialize the trolley. if( !isset( $_SESSION['TrolleyContents'] ) ) { $_SESSION['TrolleyContents'] = array(); } // Add new entry. if( isset( $_POST['AddToTrolley'] ) ) {

Re: [PHP] session_name(CCLTrolley)

2005-10-01 Thread John Taylor-Johnston
Robert Cummings wrote: And $_SESSION instead of session_register and always access your session vars through $_SESSION. I'm safe with PHP Version 4.1.2 ? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session_name(CCLTrolley)

2005-10-01 Thread John Taylor-Johnston
Robert Cummings wrote: To decrement the quantity of an item in the trolley: ?php if( isset( $_SESSION['TrolleyContents'][$myData-RNum] ) ) { $_SESSION['TrolleyContents'][$myData-RNum] -= 1; if( $_SESSION['TrolleyContents'][$myData-RNum] = 0 ) { unset(

[PHP] Re: anyone want to teach php?

2005-10-02 Thread John Taylor-Johnston
Karl, I cannot make promises, but I might have someone. If he answers me, I'll let you know. He got me started a few years ago. Excellent teacher, and author of phpMyAdmin :-P John Karl James wrote: Hello Team, I was wondering if there is anyone that would like to teach Me the language as

Re: [PHP] session_name(CCLTrolley)

2005-10-02 Thread John Taylor-Johnston
Robert Cummings wrote: Is there a reason you're using a comma delimited string? I would recommend using an array instead: ?php session_name( 'CCLTrolley' ); session_start(); // Initialize the trolley. if( !isset( $_SESSION['TrolleyContents'] ) ) { $_SESSION['TrolleyContents'] = array(); }

Re: [PHP] session_name(CCLTrolley)

2005-10-02 Thread John Taylor-Johnston
Warning: Bad arguments to implode() in /var/.../printtrolley.php on line 14 Array ( [TrolleyContents] = 1 3 4 4 5 6 ) I restarted Mozilla and tried again. It's ok now. Thanks for your time. Array ( [TrolleyContents] = Array ( [16] = 16 [30] = 30 [47]

Re: [PHP] session_name(CCLTrolley)

2005-10-02 Thread John Taylor-Johnston
This is the old version I demonstrated. You should go with the later version that sets the values to the quantity :) I thought I had? Haven't I? But this is the easiest shopping cart I have ever seen. However, I still have not understood what you were doing with these lines I commented out.

Re: [PHP] session_name(CCLTrolley)

2005-10-02 Thread John Taylor-Johnston
This is what you recommended. Is there a reason you're using a comma delimited string? I would recommend using an array instead: ?php session_name( 'CCLTrolley' ); session_start(); // Initialize the trolley. if( !isset( $_SESSION['TrolleyContents'] ) ) { $_SESSION['TrolleyContents'] = array();

Re: [PHP] session_name(CCLTrolley)

2005-10-03 Thread John Taylor-Johnston
Excellent. Thanks. I think I follow what you have done. But to clarify, and learn, what are you doing with -= ? $trolley[$item] -= $quantity; Likewise, i had not followed what you were doing with the lines I commented out. They did not seem to work, and I succeeded in doing what I wanted

Re: [PHP] session_name(CCLTrolley)

2005-10-03 Thread John Taylor-Johnston
after removing $quantity of $itembr /; trolleyPrint(); if( $trolley[$item] 1 ) { unset( $trolley[$item] ); echo Trolley after cleaning up empty entry for $itembr /; trolleyPrint(); } } ? Cheers, Rob. -- John Taylor-Johnston

Re: [PHP] session_name(CCLTrolley)

2005-10-03 Thread John Taylor-Johnston
Robert Cummings wrote: I took a look at your link and it appears to be working fine, though you haven't yet wired up the viewcart.php When I create viewcart.php, what is the best way to extract and display the contents of $_SESSION['TrolleyContents'] ? Do I use my $sql value? or in my while

Re: [PHP] session_name(CCLTrolley)

2005-10-03 Thread John Taylor-Johnston
$mydata-RNum - $mydata-field1: $mydata-field2.; } } Thanks, John Robert Cummings wrote: On Mon, 2005-10-03 at 16:38, John Taylor-Johnston wrote: Robert Cummings wrote: I took a look at your link and it appears to be working fine, though you haven't yet wired up the viewcart.php When I

Re: [PHP] session_name(CCLTrolley)

2005-10-03 Thread John Taylor-Johnston
Use foreach to traverse the array and display each trolly entry nicely This might be cleaner? I'm not sure if I'm using while and list right, but somehting like that? $glquery = mysql_query($sql); while ($mydata = mysql_fetch_object($glquery)) { while (list($_SESSION['TrolleyContents'],

[PHP] Warning: Cannot send session cookie

2005-10-04 Thread John Taylor-Johnston
Any idea why I'm getting this error, and only on this page? I have the same header on every other page? http://testesp.flsh.usherb.ca/thingstodo.html The page contains a \n before I start my ?php. Is this doing it? ?php session_name( 'CCLTrolley' ); session_start(); // Initialize the trolley.

Re: [PHP] Warning: Cannot send session cookie

2005-10-04 Thread John Taylor-Johnston
Michael Crute wrote: The page contains a \n before I start my ?php. Is this doing it? That \n is it. You can't send ANYTHING to the browser before you send the headers and cookies are part of the headers. Take out the \n and all should be well. Thanks. Dreamweaver screwed me over ;)

Re: [PHP] session_name(CCLTrolley)

2005-10-04 Thread John Taylor-Johnston
Robert Cummings wrote: On Mon, 2005-10-03 at 18:08, John Taylor-Johnston wrote: Use foreach to traverse the array and display each trolly entry nicely If list() works for you it's fine. I don't really use it so not entirely sure of it's functionality with respect to looping. I

[PHP] Java editor

2005-10-18 Thread John Taylor-Johnston
Is there a OS java (or other) html editor I can implement on a Web page. I want a user to type text, use bold, italics, etc. I would then store the html in a MySQl record and then use php to insert the edited text. I've seen some packaged, in Moodle for example. John -- PHP General Mailing

Re: [PHP] Java editor

2005-10-19 Thread John Taylor-Johnston
Looks good. But I was hoping for open source. John Torgny Bjers wrote: John Taylor-Johnston wrote: Is there a OS java (or other) html editor I can implement on a Web page. I want a user to type text, use bold, italics, etc. I would then store the html in a MySQl record and then use php

Re: [PHP] Java editor

2005-10-19 Thread John Taylor-Johnston
Thanks Rob. They are hard to choose between?! I'll play with both. I only want the very basics. Thanks! John On Tue, 2005-10-18 at 23:52, John Taylor-Johnston wrote: Is there a OS java (or other) html editor I can implement on a Web page. I've seen some packaged, in Moodle for example

Re: [PHP] Java editor

2005-10-19 Thread John Taylor-Johnston
and then use php to insert the edited text. [/snip] Sorry I missed this earlier. Have you looked at htmlArea? http://www.htmlarea.com/ -- John Taylor-Johnston - If it's not Open Source, it's Murphy's Law

[PHP] SCRIPT_NAME

2005-10-20 Thread John Taylor-Johnston
SCRIPT_NAME and PHP_SELF always include leading url information and slashes. Is there a function I can use to skin either down to the filename? No slashes or leading url. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: SCRIPT_NAME

2005-10-20 Thread John Taylor-Johnston
Thanks! John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: OOP Newbie - why does this not work?

2005-10-21 Thread John Taylor-Johnston
Here,s my guess: var $liveclass; $liveclass = new(Test); echo $liveclass-get() ; echo BR ; echo This is in the php code block ; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] JPG Slide show

2005-10-22 Thread John Taylor-Johnston
Hi, Found this on one of my favourite tech show sites: http://www.flickr.com/photos/globalhermit/sets/1134389/show/ Is there something in PHP I can script or find toproduce a slide show of the contents of a Linux directory? (Baby pictures :) ) John -- PHP General Mailing List

[PHP] WWW-Authenticate

2005-10-22 Thread John Taylor-Johnston
Does anyone see anything wrong with my code below? It works in other files, on other servers. I copied and pasted it exactly? It won't recognise the user name or password. Does Authenticate work on all servers? Here is my phpinfo if that helps?!

Re: [PHP] WWW-Authenticate

2005-10-22 Thread John Taylor-Johnston
Robert Cummings wrote: On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote: Does anyone see anything wrong with my code below? It works in other files, on other servers. I copied and pasted it exactly? It won't recognise the user name or password. Does Authenticate work on all servers

Re: [PHP] WWW-Authenticate

2005-10-22 Thread John Taylor-Johnston
Robert Cummings wrote: On Sat, 2005-10-22 at 18:21, John Taylor-Johnston wrote: Robert Cummings wrote: On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote: Does anyone see anything wrong with my code below? It works in other files, on other servers. I copied and pasted

Re: [PHP] JPG Slide show

2005-10-22 Thread John Taylor-Johnston
name them) of galeries to work. :( Show me one that generates thumbnails - And works for you personally. But thanks for the Yahoo key words to search with: PHP image gallery scripts. Any one :) Please. Richard Lynch wrote: On Sat, October 22, 2005 11:15 am, John Taylor-Johnston wrote

Re: [PHP] JPG Slide show

2005-10-24 Thread John Taylor-Johnston
luckily I can do. But not always for everyone. Thanks, John Richard Lynch wrote: On Sun, October 23, 2005 12:09 am, John Taylor-Johnston wrote: ... out there, I'll eat my hat. :-) Get your false teeth out and glue them on. I defy you to find one that works. Not counting

[PHP] fopen

2005-10-25 Thread John Taylor-Johnston
It does what I want, but I worry 4096 may not be big enough. Possible? Is there a way to detect the filesize and insert a value for 4096? $buffer = fgets($dataFile, $filesize); Is this what it is for? John ?php #http://ca3.php.net/fopen $filename = /var/www/html2/assets/about.htm ; $dataFile =

[PHP] php not activated

2005-10-30 Thread John Taylor-Johnston
I have some html + php stored in a mysql record. But when I echo the contents: $mydata-HTML=input type=text size=40 value=?php if($searchenquiry) echo stripslashes(htmlspecialchars($searchenquiry)); ? name=searchenquiry /; the php is not activated; rather I see ?php ... ? in my html

[PHP] un-eval()

2005-10-30 Thread John Taylor-Johnston
Does eval() have a synonym? I store html in a mysql record, extract it into $contents. Under normal circumstances, I have to eval($contents) to get any embedded php code to work. But when I use FCKeditor: http://testesp.flsh.usherb.ca/~johj2201/ramtest.php $contents='input type=text

[PHP] eval();

2005-10-30 Thread John Taylor-Johnston
I need to generate embedded php within in a mysql record. $contents is the actual contents of that record. ?php $contents = div class=\indent\ style=\font-size: 16px; font-family: arial,helvetica; font-weight: bold;\About the Project/div ?php echo \hello world\; ?; echo eval($contents); ? I

Re: [PHP] eval();

2005-10-30 Thread John Taylor-Johnston
?php $contents = div class=\indent\ style=\font-size: 16px; font-family: arial,helvetica; font-weight: bold;\About the Project/div ?php echo \hello world\; ?; echo eval($contents); ? eval() expects PHP code, not HTML with embedded PHP code. Try this (untested): eval( ? $contents ?php );

Re: [PHP] eval();

2005-10-30 Thread John Taylor-Johnston
eval( ? $contents ?php ); However, if eval() is the answer, you're probably asking the wrong question. You should take a hard look at your code and think of a better way to do what you need to do. Back to the drawing board? It is either store my html+embedded code in a mysql record, or in

Re: [PHP] un-eval()

2005-10-30 Thread John Taylor-Johnston
I guess I won the powerball $100 million. I'd feel better with the cash ;) John Robert Cummings wrote: Does eval() have a synonym? The infinite set of source code permutations that can output the word 'red' as a sole output regardless of whatever other logic may occur within the content of

[PHP] Help with new config

2005-11-01 Thread John Taylor-Johnston
New server, new config. PHP 4.3.9 and new mysql db. phpmyadmin works among other scripts, including: http://compcanlit.usherbrooke.ca/whovisits.php But this bugger won't: http://testesp.flsh.usherbrooke.ca/testdb.phps http://testesp.flsh.usherbrooke.ca/phpinfo.php I cannot even see the

[PHP] Register Globals

2005-11-04 Thread John Taylor-Johnston
Ok, you are all used to working with register_gloabsl=off. mail($to, stripslashes($subject), wordwrap($message, 60), From: $from\r\n); I change this line to: mail($to, stripslashes($_POST[subject]), wordwrap($_POST[message], 60), From: $_POST[from]\r\n); and I get: Parse error: parse

Re: [PHP] Register Globals

2005-11-04 Thread John Taylor-Johnston
this within other quotation marks and only if the array's index is a string. Hope that helps, Larry -- John Taylor-Johnston - If it's not Open Source, it's Murphy's Law. ' ' 'Collège de Sherbrooke: ô¿ôhttp

[PHP] Register Globals (more)

2005-11-04 Thread John Taylor-Johnston
Patience please :) See my html below. Basically, if type=checkbox is checked, I'm trying to build $to string in mail(). parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING line 4 How do I rebuild this peice of code to be register_globals=off

[PHP] match by relevancy

2005-11-04 Thread John Taylor-Johnston
I'm using PHP Version 4.3.9 and MySQL 4.1.12. I recently upgraded from PHP 4.1.x and MySQL 4.0.x. Basically my SQL below now render empty set. It worked until my upgrade. Basically ORDER BY relevancy DESC no longer works, I think!? I got help building this $SQL here, so I'm hoping

[PHP] random row

2005-11-15 Thread John Taylor-Johnston
My question is simnple. I want to randomly select a row in a mysql table. I have a primary id. ?php $server = localhost; $user = foo; $pass = foo; $db=foo_db; $table=foo_table; $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $sql = ??; $news =

[PHP] shell command

2005-11-18 Thread John Taylor-Johnston
Hi, I want to echo the location of head.jpg hidden in some deep dark recess of my server, unbeknownst to me. Which shell command do I use? How do I echo it? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[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] include(sendmail.phps);

2005-03-13 Thread John Taylor-Johnston
I want to include a phps file. But would like it to display the coloured formatting of a phps, instead of executing the code with in. Is this possible? This does not work: include(sendmail.phps); Thanks, John -- John Taylor-Johnston

[PHP] if table not exists

2005-03-15 Thread John Taylor-Johnston
How do I get PHP to create a table, if one does not already exist? I have to do something with: $news = mysql_query($sql) or die(print mysql_error()); What can I also add something to $sql? $sql = if not exists CREATE TABLE `demo_assignment1` ... John snip $server =

Re: [PHP] if table not exists

2005-03-15 Thread John Taylor-Johnston
http://dev.mysql.com/doc/mysql/en/create-table.html Thanks. Then this looks reasonable? Would anyone code it differently? # $server = localhost; $user = myname; $pass = mypass; $db = mydb; $table = demo_assignment1;

[PHP] Different approach?

2005-03-17 Thread John Taylor-Johnston
Hi, I've read: http://dev.mysql.com/doc/mysql/en/create-table.html Would anyone code/approach this differently? # $server = localhost; $user = myname; $pass = mypass; $db = mydb; $table = demo_assignment1;

[PHP] Re: Different approach?

2005-03-18 Thread John Taylor-Johnston
Sorry to bother. I was hoping for inspiration. The code works. I wonder if there is a cleaner way? John John Taylor-Johnston wrote: Hi, I've read: http://dev.mysql.com/doc/mysql/en/create-table.html Would anyone code/approach this differently

[PHP] fopen

2005-03-18 Thread John Taylor-Johnston
Hi, FOpen question. My script is dying. Our results file could not be opened for writing What can I add to get more info from the die? Do I «have» to specify a pathname in $defaultfile? John $defaultfile = ffmail.txt; #default file to write to @ $results = fopen($datafilename, a); #open

[PHP] Re: fopen

2005-03-18 Thread John Taylor-Johnston
errors #print custom error if file doesn't exist or improper permissions if (!$results) { die (Our results file could not be opened for writing.); } -- John Taylor-Johnston - If it's not Open Source, it's Murphy's Law

[PHP] Re: fopen

2005-03-18 Thread John Taylor-Johnston
I could use: or die($php_errormsg); but it is turned off in my php.ini and I can't modify it myself. John FOpen question. My script is dying. Our results file could not be opened for writing What can I add to get more info from the die? $defaultfile = ffmail.txt; #default file to write

Re: [PHP] send email sample

2005-03-19 Thread John Taylor-Johnston
Burhan Khalid wrote: Can you give me a send email sample? RTFM : http://www.php.net/manual/en/function.mail.php Burhan, That's awfully polite. RTFM. How are people supposed to get started? Take that attitude back over to the Perl newsgroup. One of the joys of PHP has been a

Re: [PHP] Re: fopen

2005-03-19 Thread John Taylor-Johnston
Hi, W+ does not work either. I have resorted to adding a blank, 0 byte text file. But it needs chmod 666. Interesting, I add this line: chmod($defaultfile, 666); and it send back an illegal error, but it appears to work anyway - the data is written! What does the at_sign mean at the start of

Re: [PHP] Re: fopen

2005-03-21 Thread John Taylor-Johnston
Thanks for that! John Richard Lynch wrote: On Sat, March 19, 2005 6:48 am, John Taylor-Johnston said: chmod($defaultfile, 666); http://php.net/chmod has examples that tell you exactly why this is wrong... 666 is decimal. The 666 you want is Octal. They ain't the same number

Re: [PHP] Re: fopen

2005-03-21 Thread John Taylor-Johnston
Richard, thanks. chmod($defaultfile, 666); http://php.net/chmod has examples that tell you exactly why this is wrong... The 666 you want is Octal. chmod($defaultfile, 0666); Check. Thanks. Didn't pay enough attention to that. What does the at_sign mean at the start of this line? @

Re: [PHP] Re: Different approach?

2005-03-21 Thread John Taylor-Johnston
server. It's part of a bigger tutorial: http://compcanlit.usherbrooke.ca/eslcafe/hotpotatoes/hot-potatoes_104.htm I'm still working on it. John Taylor-Johnston wrote: I've read: http://dev.mysql.com/doc/mysql/en/create-table.html Would anyone code/approach this differently

Re: [PHP] Different approach?

2005-03-22 Thread John Taylor-Johnston
Thanks! Needed to know that! :) John Josh Whiting wrote: $sql = INSERT INTO $table (StudentNumber,Exercise1,Exercise2) values ('$StudentNumber','$Exercise1','$Exercise2'); mysql_select_db($db,$myconnection); mysql_query($sql) or die(print mysql_error()); your example looks pretty

[PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
Martin, Anyone, I'm desperate :( PHP isn't sending my SQL correctly. It's not a MySQL problem. It's my PHP syntax. Debugging: http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B $sql = 'SELECT ... FROM '.$table.' WHERE MATCH ... AGAINST (\'ready maria\' IN BOOLEAN

Re: [PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
Tom, Anyone, No I'm not looking for a , I'm trying to pass double quotes into MySQL. Like I said, it works when debugging: http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B http://ccl.flsh.usherb.ca/print/display.test.inc.phps but fails when I try to pass my

Re: [PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
are the field types in the mysql DB? -Original Message- From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 4 December 2002 4:13 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Whimper, help :) Tom, Anyone, No I'm not looking for a , I'm trying to pass double

Re: [PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+maria%26quot%3B I blame PHP. Can't be MySQL. echo $sql displays the EXACT same thing. Debugging ... Works jdaxell.ccl = 2 records found: $sql =

Re: [PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+maria%26quot%3B I blame PHP. Can't be MySQL. echo $sql displays the EXACT same thing. Debugging ... Works jdaxell.ccl = 2 records found: $sql =

[PHP] Sigh :)

2002-12-04 Thread John Taylor-Johnston
Hi, Can someone take a look at this again, please? http://news.php.net/article.php?group=php.generalarticle=126934 Your posts so far have proven fruitless. Thanks for trying. :) I do appreciate it. I will try to answer everyone at the same time. Someone mentionned it might be a problem with

[PHP] magic quotes

2002-12-04 Thread John Taylor-Johnston
What are magic quotes? Will this help me? http://news.php.net/article.php?group=php.generalarticle=126934 How is this different from stripslashes. I have RTF doc :) http://www.php.net/manual/en/function.get-magic-quotes-gpc.php Be gentil ::p -- John Taylor-Johnston

Re: [PHP] Sigh :)

2002-12-04 Thread John Taylor-Johnston
. Robbert van Andel -Original Message- From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 9:33 AM To: [EMAIL PROTECTED] Subject: [PHP] Sigh :) Hi, Can someone take a look at this again, please? http://news.php.net/article.php?group=php.generalarticle

Re: [PHP] Sigh :)

2002-12-04 Thread John Taylor-Johnston
:33, John Taylor-Johnston wrote: Hi, Can someone take a look at this again, please? http://news.php.net/article.php?group=php.generalarticle=126934 Your posts so far have proven fruitless. Thanks for trying. :) I do appreciate it. I will try to answer everyone at the same time

Tom: [PHP] magic quotes

2002-12-04 Thread John Taylor-Johnston
=php.generalarticle=126934 JTJ How is this different from stripslashes. JTJ I have RTF doc :) JTJ http://www.php.net/manual/en/function.get-magic-quotes-gpc.php JTJ Be gentil ::p JTJ -- JTJ John Taylor-Johnston JTJ - JTJ

[PHP] Humour me

2002-12-06 Thread John Taylor-Johnston
Humour me. New server. I'm a little tired. Where is my php.ini on a red hat server? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Can I check MYSQL version

2002-12-08 Thread John Taylor-Johnston
Hi, Can I check mysql version so if version = 4 $sql = 'version 4 stuff' else $sql =version 3 stuff; -- John Taylor-Johnston - If it's not open-source, it's Murphy's Law. - Université de Sherbrooke

Re: [PHP] Can I check MYSQL version

2002-12-08 Thread John Taylor-Johnston
mysql SELECT VERSION(); - '3.23.13-log' Ok, how do I PHP it for greater than or equals version 4 :? John Johannes Schlueter wrote: On Sunday 08 December 2002 20:42, John Taylor-Johnston wrote: Hi, Can I check mysql version so if version = 4 $sql = 'version 4 stuff' else

[PHP] MySQL: FullText Index

2002-12-09 Thread John Taylor-Johnston
Does anyone know what the limit is for a FULLTEXT Index in MySQL 3.23.49+? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] session_start

2002-12-14 Thread John Taylor-Johnston
I used to think I knew how to do this ... take pity :) I start my session: session_name(TestALS); session_start(); I register a variable: session_register(studentid); if (isset($_SESSION[studentid])) { $id = $_SESSION[studentid]; echo \$studentid= $studentidbr; } Pretend $studentid contains

[PHP] I did: Re: session_start

2002-12-14 Thread John Taylor-Johnston
I did call session_start() before anything is output to the browser. http://www.php.net/manual/en/function.session-start.php I only have one php file so I know I'm recyling my code each time: session_name(TestALS); session_start(); session_register(studentid); if (isset($_SESSION[studentid])) {

[PHP] Session: I RTFM

2002-12-14 Thread John Taylor-Johnston
Jason wrote: RTFM again. Jason, again, I RTFM, but did not get it working. Otherwise I wouldn't have dared ask a question. Sessions depends on a number of factors including your version of PHP and the setting of register_globals. The FM manual says: $_SESSION (or $HTTP_SESSION_VARS with PHP

[PHP] Re: Session: I RTFM

2002-12-14 Thread John Taylor-Johnston
[familyname]; echo yay session works, \$familyname= $familynamebr; } -- John Taylor-Johnston - If it's not open-source, it's Murphy's Law. ' ' ' Collège de Sherbrooke: ô¿ô http://www.collegesherbrooke.qc.ca

Re: [PHP] Session: I RTFM

2002-12-14 Thread John Taylor-Johnston
] Session: I RTFM Date: Sat, 14 Dec 2002 18:41:40 -0500 From: John Taylor-Johnston [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED

[PHP] needle in a haystack (Can't find :)

2002-12-16 Thread John Taylor-Johnston
http://www.php.net/manual/en/function.in-array.php Can't find the °ù¢# $needle in my $haystack. Why? :p (It is a serious example :) ?php $needle = Ten things I hate about you; if(in_array($needle, $haystack)) { echo Found it; }else{ echo Not there; } $haystack = array (Ten Things I

[PHP] [php] INSERT INTO

2002-12-16 Thread John Taylor-Johnston
Yes I'm reading the FM :) http://www.php.net/manual/en/ref.mysql.php I should know this. How will I PHP this SQL into my MySQL table? INSERT INTO testals VALUES ($part1, $part2, $part3, $part4); I'm particularily concerned aboute single quotes. How do I escape them? Should I? Here is what I

[PHP] Re: Where am I?

2002-12-17 Thread John Taylor-Johnston
Hope you got your answer before now? Run phpinfo(); inside a php file. See: $DOCUMENT_ROOT or $_SERVER[DOCUMENT_ROOT] All other variables you need are listed there. $_SERVER[TEMP], for example, is very useful. Don't forget to add the $ to the beginning of the variable name. I couldn't

Re: [PHP] test

2002-12-17 Thread John Taylor-Johnston
Y'sure? Spam bot? John Martin Towell wrote: na! didn't work :) g -Original Message- From: Roger Lewis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 4:59 PM To: Php-General Subject: [PHP] test This is a test. -- -- PHP General Mailing List

Re: [PHP] test

2002-12-17 Thread John Taylor-Johnston
Roger, Are you emailing or posting to the news group? John Roger Lewis wrote: But it did! Otherwise I wouldn't have received your comment. Why did I get this message from Mailer-Daemon: Sorry. Your message could not be delivered to: php-list,emc (The name was not found at the remote site.

[PHP] Re: mysql_num_rows

2002-12-17 Thread John Taylor-Johnston
I use $mycounter, not saying it is pretty. But if you have a whole bunch of stuff deleted, your last id might be worth a lot more than the actual number of rows. $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query('select * from '.$table.'

Re: [PHP] test

2002-12-17 Thread John Taylor-Johnston
Lookee there, I'm getting it now and I'm sending to the newsgroup. Subject: NDN: [PHP] Re: mysql_num_rows Date: Wed, 18 Dec 2002 14:18:28 +0800 From: Mailer-Daemon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sorry. Your message could not be delivered to:

[PHP] Re: repeat region

2002-12-19 Thread John Taylor-Johnston
Jeff or anyone, Ok, I'll bight. What are you doing with the % and %7 ? $idx=1; echo(TR) while(fetch_rows) { printf(TD%s/TD, ID); if($idx%7=0) {echo('/TRTR'} ++$idx; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
I think this is perl? REMOTE_HOST How can I do this? I want to check the referer. If A do Aa, else Bb I can't find a variable in phpinfo() ?php $appareil = getenv('REMOTE_HOST'); if(strpos($appareil, www.foo.ca)) { echo found $appareil; }else{ echo did not find $appareil; } ? -- PHP General

[PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
The deal is my ISP does a redirect from www.delete.compcanlit.ca to www.delete.compcanlit.usherbrooke.ca. I'm trying to if statement the redirect. Again, I find no variable in phpinfo(). John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
What happened when you tried that? Nothing. Nothing showed. In fact nothing for getenv('REMOTE_HOST') in the else either. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
message. Nothing appeared as the referrer. John John Nichel wrote: Try... $_SERVER['HTTP_REFERER'] John Taylor-Johnston wrote: The deal is my ISP does a redirect from www.delete.compcanlit.ca to www.delete.compcanlit.usherbrooke.ca. I'm trying to if statement the redirect. Again, I find

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
John Nichel wrote: Try... $_SERVER['HTTP_REFERER'] John Taylor-Johnston wrote: The deal is my ISP does a redirect from www.delete.compcanlit.ca to www.delete.compcanlit.usherbrooke.ca. I'm trying to if statement the redirect. Again, I find no variable in phpinfo(). John

<    1   2   3   4   5   6   >