[PHP] sourceforge garage sale shopping carts?

2007-03-21 Thread jtjohnston
Are there any shopping carts at Sourceforge that you would recommend? Or other Open Source script? I don't mean to be cheap, just find a fast solution for a friend. Something simple, a simple garage sale with a few options and categories. I created the shopping cart for www.compcanlit.ca, and

Re: [PHP] PHP Notice: Undefined index

2006-05-22 Thread jtjohnston
: Undefined index: submitter in /home/jtjohnston/domains/jtjohnston.ca/public_html/comments.php on line 29 Because $_POST['submitter'] is not set? Because your script assumes it IS set? Because sometimes your script is called to display the form, before $_POST['submitter'] has anything

[PHP] Quickie array question

2003-06-11 Thread jtjohnston
foreach($newlines as $newline) { #how do I get the index of the array each time $newline is printed out? echo ??; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] 4 hours staring - can't see clear.

2003-06-11 Thread jtjohnston
Can someone see clearly through what I'm trying to do please? I've been at this for 4 hours trying to see where I have gone wrong. # contents of a text file # Enregistrement TI: ... So They Understand ...: Cultural Issues AU: Schneider,-William PB: Logan, UT : Utah

[PHP] PHP Problem or MySQL (Match ... against)?

2002-12-02 Thread jtjohnston
I'm stuck. I have been to the MySQL lists for this. Now I'm reconsidering my PHP code. http://ccl.flsh.usherb.ca/print/display.table.inc.phps I just don't know where I'm going wrong anymore. If I run this SQL in PHPMyAdmin, it works. jdaxell.ccl should have one entry for ready maria. SELECT

Re: [PHP] PHP Problem or MySQL (Match ... against)?

2002-12-02 Thread jtjohnston
Chris, or anyone, I have tried to escape the slashes. Debugging ... $sql = 'SELECT ... ... AGAINST (\'ready maria\' IN BOOLEAN MODE) ...'; This works. But if I addslashes or stripslashes, or do nothing, it does not work. See these 3 variations. Neither work. What should I do? A part from hang

[PHP] Calendar

2002-05-26 Thread jtjohnston
Can somone take a look at this? I found this on sourceforge, but cannot reach author. http://www.collegesherbrooke.qc.ca/languesmodernes/calendar/example.php This month won't display properly. It's missing /trtr somewhere. Every other month seems to work. Can someone help please? Here is the

[PHP] Calendar

2002-05-26 Thread jtjohnston
Can somone take a look at this? I found this on sourceforge, but cannot reach author. http://www.collegesherbrooke.qc.ca/languesmodernes/calendar/example.php This month won't display properly. It's missing /trtr somewhere. Every other month seems to work. Can someone help please? Here is the

[PHP] Calendar

2002-05-26 Thread jtjohnston
Can somone take a look at this? I found this on sourceforge, but cannot reach author. http://www.collegesherbrooke.qc.ca/languesmodernes/calendar/example.php This month won't display properly. It's missing /trtr somewhere. Every other month seems to work. Can someone help please? Here is the

[PHP] Calendar

2002-05-26 Thread jtjohnston
Can somone take a look at this? I found this on sourceforge, but cannot reach author. http://www.collegesherbrooke.qc.ca/languesmodernes/calendar/example.php This month won't display properly. It's missing /trtr somewhere. Every other month seems to work. Can someone help please? Here is the

[PHP] inspirational

2002-05-25 Thread jtjohnston
I want to detect the url my .php lies in. This is over kill and BS: $myurlvar = http://.$SERVER_NAME.parse($SCRIPT_NAME); How do I get http://foo.com/dir1/dir2/dir3/;. There seems to be nothing in phpinfo() that will give me a full url to play with. Flame me if you will, but I browsed TFM

[PHP] eval()

2002-05-20 Thread jtjohnston
I know I'm not doing this right, but .. What I want to do is display the value of $q1 through $q3. How? I can't get eval() to do it, can I? for ($i = 1; $i = 3; $i++) { $x= eval (\$q.$i); echob$x/b\n; echobrinput type=\hidden\ name=\a.$i.\ value=\\\n; } John -- PHP General Mailing List

[PHP] setcookie()

2002-05-11 Thread jtjohnston
This is a bug Feature/Change Request I made to: http://bugs.php.net/bug.php?id=17158 setcookie() states cookies must be sent before any other headers are sent (this is a restriction of cookies, not PHP). I argue this is a restriction of PHP, not cookies. Here is my proof:

Re: [PHP] setcookie()

2002-05-11 Thread jtjohnston
with server-side issues. If you want to write javascript that sets a client-side Javascript cookie, go ahead. It has nothing to do with PHP and PHP will certainly not get in your way. -Rasmus On Sat, 11 May 2002, jtjohnston wrote: This is a bug Feature/Change Request I made to: http

Re: [PHP] setcookie()

2002-05-11 Thread jtjohnston
On Sat, 11 May 2002, jtjohnston wrote: This is a bug Feature/Change Request I made to: http://bugs.php.net/bug.php?id=17158 setcookie() states cookies must be sent before any other headers are sent (this is a restriction of cookies, not PHP). I argue this is a restriction

[PHP] HTML Question

2002-03-31 Thread jtjohnston
I suppse this is an HTML question more than PHP. I have a server elsewhere that does not have PHP accessible. Stupid cheap of them, but true. I want to display a page within a page, WITHOUT using ?php ... ? which won't work. I tried stuff like: IFRAME SRC=http://www.somewhere.ca/test.php;

[PHP] Re: Php.ini

2002-03-31 Thread jtjohnston
Once upon a time on another (Windows) server I could place a php.ini in a directory and it would choose that one first before it defaulted to c:\windows\php.ini. It doesn't work on my Apache server today, but who knows? Chris Kay wrote: Question I have is, Is it possible to specify a php.ini

[PHP] server side includes

2002-03-31 Thread jtjohnston
I guess what I'm getting at is that a php server acts like a server side includes server, right? On webrings they use something like: script scr=http://foo.com/test.php;/script test.php would have to spit out javascript like this: http://ss.webring.com/navbar?f=j;y=tombeaudreau;u=10035307

Re: [PHP] return

2002-03-31 Thread jtjohnston
Gary, To add to the conversation ... You created a function to pass something through it, to process something and now you want to get something back, right? That's what return does. It gets something back for your effort. You could simply: echo addslashes($var); But let's say you do it a

[PHP] Re: PHP / cgiwrap - weird problem

2002-03-31 Thread jtjohnston
Why are you using cgiwrap? seriously? Are you using an old httpd server and not apache? CGIWRAp from my perling experiences was good for firewalling, keeping users out of areas of your server. But cgiwrap is a pain in the ass for your users. If you have your/their permissions set up right, why

Re: [PHP] Apache

2002-03-21 Thread jtjohnston
Scott , I am. :) I'm looking at IndexIgnore but not sure if it's what I want? John Errmm... i don't know any apache groups, but if you want to do what you ask, just read the documentation, it's easy :-) jtjohnston wrote: Anyone know of a good apache group? I want to hide the structure

Re: [PHP] Apache

2002-03-21 Thread jtjohnston
the documentation, it's easy :-) jtjohnston wrote: Anyone know of a good apache group? I want to hide the structure of a directory when there is no idex.html present g J -- John Taylor-Johnston - ' ' ' Collège de

Re: [PHP] Apache

2002-03-21 Thread jtjohnston
Thanks all :) I went with: http://httpd.apache.org/docs/mod/core.html#options Directory /your/absolute/path/dir /Directory and not put Indexes between. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] easyphp question

2002-03-21 Thread jtjohnston
Anyone using easyphp? I want to know if the new 4.1.2 binary at http://www.php.net/downloads.php is what I want or is it good for Apache? Doesn't seem to mention anything about versions for Apache, only the zip package. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Apache

2002-03-20 Thread jtjohnston
Anyone know of a good apache group? I want to hide the structure of a directory when there is no idex.html present g J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Invalid Argument ??? Not sure how to debug this

2002-03-17 Thread jtjohnston
Daniel, $myrow[artist] and $myrow[title] might be a good place to start. It looks like all your ; are in place. I don't think you can place inside [] like that: echo trtd.$myrow[artist].td.$myrow[title]; I have been struggling with this code: I was wondering if someone could lend me a

Re: [PHP] Copy *.*

2002-03-17 Thread jtjohnston
Windows :) John [EMAIL PROTECTED] wrote: At 17.03.2002 03:10, you wrote: Does anyone know of another snippet any place where I can copy *.* (files and all sub-directories) from one drive to another? In other words, a backing-up function. The snippet I got from

[PHP] pathname

2002-03-17 Thread jtjohnston
I need a function to traverse a pathname to check if the path exists, if not start from scratch and create (MkDir) the path. Let's say: $to_path = c:\\aaa\\bbb\\ccc\\ddd\\; or $to_path = c:/aaa/bbb/ccc/ddd/; if(!is_dir($to_path)) { #I need to explode by both \\ AND / to find out

[PHP] rec_copy

2002-03-17 Thread jtjohnston
http://www.php.net/manual/en/function.copy.php Thanks all! I needed to check if pathname exists: if (!is_dir($to_path)) { echo Creating destination pathbr; create_path($to_path); } John Steele helped out with a few lines of code. I added a comment to

[PHP] Update: [PHP] Weird?

2002-03-16 Thread jtjohnston
I have created date :) $date = date (MD); That's not it. It seems to fail at one level or another, I think, becuase the function calls itself - and probably gets lost somehow. John ... i think you might have to create the $date directory before writing a file to it. writing to

[PHP] PHPMyAdmin: [PHP] From: Newman, using and ' or ` in My Sql

2002-03-16 Thread jtjohnston
The standard quote (') should be used to delimit string literals in MYSQL statements. Use it to surround strings you're inserting into or comparing against VARCHARs, CHARs, TEXTs, etc. $sql = UPDATE mytable SET name='Best Table Of All' WHERE id=3; That is ok if you call MySQL in your .php.

[PHP] No Sense: [PHP] Update: [PHP] Weird?

2002-03-16 Thread jtjohnston
$date? That's your problem. There's no directory named $date on your computer, and you're trying to write files into a non-existent directory. jtjohnston wrote: I have created date :) $date = date (MD); That's not it. It seems to fail at one level or another, I think, becuase

[PHP] Re: [PHP] Weird?

2002-03-16 Thread jtjohnston
Dave, That's just the problem with the code. See the snippet, http://www.php.net/manual/en/function.copy.php The function should MKDIR for me one level at a time as the function calls itself. It should MKDIR and copy *.* if (is_dir($file)) { rec_copy ($from_path.$file./,

[PHP] Copy *.*

2002-03-16 Thread jtjohnston
Does anyone know of another snippet any place where I can copy *.* (files and all sub-directories) from one drive to another? In other words, a backing-up function. The snippet I got from http://www.php.net/manual/en/function.copy.php has been a disaster. John -- PHP General Mailing List

[PHP] Weird?

2002-03-15 Thread jtjohnston
Does anyone have time to run this code? This is definitely weird. Either a Windows or a code problem. If I set: $to_path = c:\\ccl_www\\.$date.ccl_www\\; to: $to_path = c:\\ccl_www\\.$date.\\ccl_www\\; (I add \\) It fails to create c:\ccl_www\20020315\ccl_www, but otherwise will create

[PHP] [More] Re: Weird?

2002-03-15 Thread jtjohnston
Miguel, No, You're right I wasn't running E=All. It's a windows machine, so I have all the write priveledges I want. These are the errors I'm getting: Warning: stat failed for c:\ccl_www\MarFriccl_www\ (errno=2 - No such file or directory) in C:\WINDOWS\Bureau\php\microweb\backup4.php

[PHP] New Day, New Problem

2002-03-14 Thread jtjohnston
If I change: $to_path = c:\\.$date.www\\; to $to_path = c:\\.$date.\\www\\; It doesn't work? Otherwise, it works. Can anyone help? Undoubtably something f-ed in the code, or is it a Windows thing? ### $date = date (Ymd);

[PHP] rec_copy

2002-03-13 Thread jtjohnston
You might have seen a version of this function: http://www.php.net/manual/en/function.copy.php I would like to rework this line: mkdir($to_path, 0777); where mkdir will ignore $to_path if the directory already exists. I have already tried this: #if(!mkdir($to_path, 0777)) #

Re: [PHP] rec_copy

2002-03-13 Thread jtjohnston
So I just declare at the beginning: if(!is_dir($to_path)) mkdir($to_path, 0777); The code works. But how can I make sure $from_path exists first and fails if not? Same thing? if(!is_dir($from_path)) { echo failed; exit; } The first time I ran it, I ran it with a non-existing $from_path

[PHP] Double slash

2002-03-13 Thread jtjohnston
On a windows server, echo getcwd().br; gives me: C:\WINDOWS\Bureau\php\microweb How do I double slash it? Is this ok: $test_path = getcwd().\\test1\\; echo $test_path; It seems ok, when I echo it? Any screwy Windows thing I need to know about? John -- PHP General Mailing List

Re: [PHP] Double slash

2002-03-13 Thread jtjohnston
looks good to me - only screwy thing I can think of is the backslash thing - REALLY annoying - and confusing sometimes Yeah, no kidding. Thanks Martin! What about if I try copying $to_path onto a Network server? Do you see any problems with the code and $to_path? (Not that I have a server

[PHP] Re: What permissions for uploading?

2002-03-13 Thread jtjohnston
Not to but in, but you might want to check on your version. www.php.net published an advisory on a possible flaw on that very issue: http://www.php.net/release_4_1_2_win32.php http://security.e-matters.de/advisories/012002.html Leif K-Brooks wrote: I have a script that allows the user to

[PHP] Broadcasting

2002-03-10 Thread jtjohnston
Not really a php thing, more a loss of php :) ! My PHP-MySQL server has been stolen from my office (last night). Security has not been doing their job! I noticed in the logs once where people were trying to get in by FTP on occasion, or adding weird things to a url, when it was running just as

[PHP] Broadcasting

2002-03-10 Thread jtjohnston
Not really a php thing, more a loss of php :) ! My PHP-MySQL server has been stolen from my office (last night). Security has not been doing their job! I noticed in the logs once where people were trying to get in by FTP on occasion, or adding weird things to a url, when it was running just as

[PHP] Broadcasting

2002-03-10 Thread jtjohnston
Not really a php thing, more a loss of php :) ! My PHP-MySQL server has been stolen from my office (last night). Security has not been doing their job! I noticed in the logs once where people were trying to get in by FTP on occasion, or adding weird things to a url, when it was running just as

[PHP] CSS Group

2002-03-09 Thread jtjohnston
Can anyone recommend a good CSS news group? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] CSS

2002-03-08 Thread jtjohnston
Has anyone any code that creates a CSS file? A GUI? As in: style type=text/css !-- body {font-family: helvetica, arial, geneva, sans-serif; font-size: small; color: #00} //-- /style -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Use an ini file

2002-03-07 Thread jtjohnston
Anyone know of an easy to use library/or code that will read and write an ini file? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Use an ini file

2002-03-07 Thread jtjohnston
Anyone know of an easy to use library/or code that will read and write an ini file? See parse_ini_file() together with the file handling functions. Dave, http://www.php.net/manual/en/function.parse-ini-file.php Good, but no code to write to an ini file? :) John -- PHP General Mailing

[PHP] $db_list = mysql_list_dbs

2002-03-06 Thread jtjohnston
mysql-list-dbs works but displays all databases. How do I limit to display those that a user has access rights to? http://www.php.net/manual/en/function.mysql-list-dbs.php $link = mysql_connect($server, $user, $password); $db_list = mysql_list_dbs($link); while ($row =

[PHP] how to access an ini file using PHP

2002-03-06 Thread jtjohnston
[Posted and Replied] Salut Marc, You could find an ini file function. Something like: http://www.zend.com/apidoc/c1948.php http://ca.google.yahoo.com/bin/query_ca?p=how+to+access+an+ini+file+using+PHPy=onhc=0hs=0 You would have to add one line: [MyData] name=foo age=100 sex=y I've done it

[PHP] Re: File/Directory Permissions

2002-03-06 Thread jtjohnston
I know you would want to code your chmod, but I use my CuteFTP window to auto-calculate which permissions I want to use/code. Not necessary on Windows, but on Unix it's an absolute. I use 644 (Read Owner, Read Group, Read Public,Write Owner, on a Unix server with no trouble for normal *.PHP

[PHP] Is flock necessary?

2002-03-06 Thread jtjohnston
Group: Is flock even necessary? Allan: You look like you have Perled. It was necessary for Perl. Have you thought of MySQL instead? Alan McFarlane wrote: I've just written a couple of simple routines which read an write small text files to the server: function readData( $filename, $data )

[PHP] exists?

2002-03-05 Thread jtjohnston
It's late, I'm tired I want to parse $searchenquiry if(% exists in $searchenquiry) { do }else{ do } -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp

[PHP] Does anyone follow?

2002-03-04 Thread jtjohnston
Does anyone follow what I'm trying to do? I have a list of authors I explode from a field called AUS I sort them sort($authors); The layout is agreeable What I would like now to do is change: array_push($authors,$singleauthor); for array_push($authors,$singleauthor,$mydata-id); But

Re: [PHP] Does anyone follow?

2002-03-04 Thread jtjohnston
Can you show me how :) ? I'm in over my head I get working with arrays, but need more practice, examples etc to learn how to code from How would two arays work? John Does anyone follow what I'm trying to do? I have a list of authors I explode from a field called AUS I sort them

[PHP] Ifrst

2002-03-04 Thread jtjohnston
Is this over kill? Is there a better way? I have an array I want to display all occurences of strings that start with a or A http://wwwphpnet/manual/en/functionsubstrphp $rest = substr($mystring, 0, 1); // returns a ? -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit:

[PHP] case insenstive

2002-03-04 Thread jtjohnston
I need to make this case insensitive This seems like over kill? if((substr($author, 0, 1) == a) or (substr($author, 0, 1) == a)) { } -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp

[PHP] sort()

2002-03-04 Thread jtjohnston
Thanks! Has this ever been improved? It sorts but case insensitively Is this over kill :) usort($authors, create_function('$a,$b','return strcasecmp($a,$b);')); D'Alpuget, Blanche d'Alpuget, Blanche da Silva e Orta, Teresa Margarida Dabydeen, Cyril de Campos, Haroldo De Certeau, Michel de

[PHP] Apache PHPMyAdmin

2002-03-02 Thread jtjohnston
Hi, No one seems to be home at my favourite apache newsgroup :) so I'll ask here. I'm trying to reconfigure my PHPMyAdmin. What do I add to my conf file so as in http://phpmyadmin.somehere.com/ points to a specific directory on my (windows) drive? For example, how would I point

[PHP] if(isset($submit))

2002-02-27 Thread jtjohnston
Has anyone tried: input type=\image\ name=\submit\ value=\submit\ src=\nextgif\ border=\0\ align=\ABSCENTER\ instead of : input type=\submit\ name=\submit\ value=\\ I can't get this to work: if(isset($submit)) with: input type=\image\ name=\submit\ value=\submit\ src=\nextgif\ border=\0\

[PHP] Re: PHP MAIL function...why wont it work????

2002-02-27 Thread jtjohnston
Your smtp is valid? Try error checking for that? See you php.ini. If you are running it on localhost you might try the same smtp that is used in your emailer. I gaffed on that once. :) Brad Wright wrote: Hi all... I have a line in a page that should send me an email when the page is loaded.

Re: [PHP] if(isset($submit))

2002-02-27 Thread jtjohnston
:/inetpub/wwwroot/top.html?submit.x=118submit.y=20 so php would get this as $submit_x and $submit_y HTH Martin -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 4:17 PM To: [EMAIL PROTECTED] Subject: [PHP] if(isset($submit)) Has

Re: [PHP] if(isset($submit))

2002-02-27 Thread jtjohnston
on the image, I got this url file:///C:/inetpub/wwwroot/top.html?submit.x=118submit.y=20 so php would get this as $submit_x and $submit_y HTH Martin -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 4:17 PM To: [EMAIL PROTECTED] Subject

Re: [PHP] if(isset($submit))

2002-02-27 Thread jtjohnston
file:///C:/inetpub/wwwroot/top.html?submit.x=118submit.y=20 so php would get this as $submit_x and $submit_y HTH Martin -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 4:17 PM To: [EMAIL PROTECTED] Subject: [PHP] if(isset($submit

[PHP] isset?

2002-02-27 Thread jtjohnston
So what is the good of isset? What does if(isset($submit)) do differently than if($submit) ?? J -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp

Re: [PHP] if(isset($submit))

2002-02-27 Thread jtjohnston
Over kill? Martin Towell wrote: or have a hidden field, maybe, called submit -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 4:33 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] if(isset($submit)) So I can forget using type

[PHP] Convert An Array

2002-02-24 Thread jtjohnston
http://ccl.flsh.usherb.ca/db/authors_under_study.php or $names = array (john, mary, bill, mary, bill, mary, bill, john, bill, john); 1) How do I count the elements of $names to produce: bill 4 john 3 mary 3 2) How do I store the counted elements into a new array? How do I create this:

Re: [PHP] Access Array Values?

2002-02-24 Thread jtjohnston
I knew there was areason why I stopped Perling :) THANKS! How do I disassemble its values? How would I foreach? Something like this? foreach (array_count_values ($names) as $name and $count) -?? { echoa href=\search.php?input=.$name.\.$name./a (.$count.)br`; } a

Re: [PHP] Email Verification

2002-02-24 Thread jtjohnston
Is this what you want? function validateEmail ($email) { return (ereg('^[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.' . '[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email)); } This will also do the job. It actually connects to the mail

[PHP] Re: ? re phpwebhosting.com - still in business??

2002-02-24 Thread jtjohnston
What's their deal? How do they offer all that and be so cheap? Using my site like Geocities to advertise? http://www.phpwebhosting.com/host_details.html J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Access Array Values?

2002-02-24 Thread jtjohnston
:) foreach (array_count_values ($names) as $name=$count) Thanks M! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysql 4 windows

2002-02-24 Thread jtjohnston
Does anyone know if mysql 4 windows is up to snuff yet? I'm running http://www.easyphp.org/ Can it be installed as localhost2? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Not Quite: how to build an array

2002-02-23 Thread jtjohnston
I'm splitting mysql entries to build an array of author names called $authors. As someone already suggested, you could use: array_push($authors, explode(;, $mydata-AS)); http://ccl.flsh.usherb.ca/db/authors_under_study.php It works, but still gets First argument to array_push() needs to be

[PHP] countless

2002-02-23 Thread jtjohnston
Success. After a bit of tinkering :) and reading up. Thanks for the ideas. Now one last question. here is my array $authors: http://ccl.flsh.usherb.ca/db/authors_under_study.php sorted alphabetically. How do I go about sorting again it so it renders: Aguiar, Flavio1 Andrade, Mario

[PHP] Re: I need a random number eather one or two

2002-02-23 Thread jtjohnston
rand (1, 2) http://www.php.net/manual/en/function.rand.php ? J Philip J. Newman wrote: I'm trying to make a random number kind of a coin toss, heads = 1 = left tales = 2 = right any solutions Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL

[PHP] how to build an array

2002-02-22 Thread jtjohnston
I guess it's because I didn't really follow Niklas' post, so I'll ask the first part of yesterday's question again, if someone can help me think my way through it. I've been looking at http://www.php.net/manual/en/ref.array.php but don't really get HOW to build an array from my MySQL data. I'm

[PHP] Not Quite: how to build an array

2002-02-22 Thread jtjohnston
OK. I use: while ($mydata = mysql_fetch_object($news)) { $authors = explode(;, $mydata-AS); } Then why Invalid argument supplied for foreach() Am I indeed building an array as I go through my database? foreach($authors as $author) { #echo sort($author).br\n; echo $authorbr\n; }

Re: [PHP] Re: how to build an array

2002-02-22 Thread jtjohnston
Yeah but, this doesn't work either? I'm trying :) $news = mysql_query(select AS from $table); while ($mydata = mysql_fetch_object($news)) { # $authors = explode(;, $mydata-AS); array_push ($authors, explode(;, $mydata-AS)); } foreach($authors as $author) { echo $authorbr\n; } --

Re: [PHP] login determines content on page

2002-02-22 Thread jtjohnston
What's the difference between if (isset($submit_happening)) and if $submit_happening) John [EMAIL PROTECTED] wrote: On Fri, 22 Feb 2002 21:38:16 -0500, you wrote: I'd to know how difficult it is to achieve the following: Create login page, when the submit button is clicked, the user info

[PHP] phpmyadmin

2002-02-21 Thread jtjohnston
I know this is a bit off the wall for most, but for what purpose do you use phpmyadmin mysql? What are your projects? Does anyone know of any good articles that discuss databasing, PHP, MySQL and or PHPMyAdmin for academic purposes? I'm a university researcher and want to collect some data.

[PHP] gzip?

2002-02-21 Thread jtjohnston
What header do I type to gzip something out on the screen? To make the output go faster, such as this text output: http://ccl.flsh.usherb.ca/db/export_to_nb_format.php I don,t want to actually zip the output, just make it go faster. Someone once told me I could do that so the server spits output

[PHP] More: gzip?

2002-02-21 Thread jtjohnston
It's called GZIP output buffering whatever that may be? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] This?: ob_start

2002-02-21 Thread jtjohnston
Does this do it? ob_start(); while ($personne = mysql_fetch_object($news)) { $output = ; $output .= R#:.$personne-id.¶\n; if($personne-TNum != ){$output .= T#:.$personne-TNum.¶\n;} $output = ob_get_contents($output); echo $output; ob_end_clean(); } -- PHP General Mailing List

[PHP] Result: ob_start

2002-02-21 Thread jtjohnston
I've narrowed down working code to this, but does it really do the job? Does this really go faster? header(Content-type: text/plain); ... while ($personne = mysql_fetch_object($news)) { ob_start(); $output = ; $output .= R#:.$personne-id.¶\n; if($personne-TNum != ){$output .=

[PHP] foreach not in reach

2002-02-21 Thread jtjohnston
Question 1: How can I append strings to my authors array? Me thinks this doesn't work :§) ? $authors .= explode(;, $mydata-KW); I'm getting Invalid argument supplied for foreach() Question 2: Once I get this working, I want to (a) alphabetise the contents of the array, (b) count repititions, (c)

[PHP] Need help

2002-02-20 Thread jtjohnston
Yeeesch! I neet help. I need a method to flush out lists of authors in a MySQL field called KW. The field looks a bit like this: 1; Caribbean and West Indies; Guyana;4;

[PHP] phpmyadmin-mysql

2002-02-17 Thread jtjohnston
Hello, I'm looking for code to display all my mysql databases in a select. On change, I want to display all my tables in a select. Finally, on change, it has to display all record of the table selected: Print Record id YR AU BT 1 1997 Fee, Margery Writing Orality:

[PHP] Frustrating ?

2002-02-17 Thread jtjohnston
Heres's a frustrating, and maybe not so stupid question? I'm getting Warning: Supplied argument is not a valid MySQL result resource on this line: while ($mydata = mysql_fetch_object($news)) So what am I doing wrong here: $where = id like $id; $news = mysql_query('select * from ccl where

[PHP] More: Frustrating ?

2002-02-17 Thread jtjohnston
while ($mydata = mysql_fetch_object($news)) So what am I doing wrong here: $where = id like $id; $news = mysql_query('select * from ccl where '.$where.' order by AU desc'); //desc = z-a A) Have you already confirmed that a valid database connection was made? Yes. A copy and paste of

[PHP] http://

2002-02-07 Thread jtjohnston
I'm looking for a function that will find occurences of urls in any given string and do this: http://www.nowhere.com/ becomes a href=http://www.nowhere.com/;http://www.nowhere.com//a Could, should also look for mailto:[EMAIL PROTECTED] telnet:blah.blah or even news:blaj.blah Does such a thing

[PHP] MySQL

2002-02-05 Thread jtjohnston
In MySQL, I have a date field that is formatted 000-00-00 Is there a function in PHP I did not find yet that does this? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: MySQL

2002-02-05 Thread jtjohnston
$date = date (Y-m-d); #works? :) Jtjohnston wrote: In MySQL, I have a date field that is formatted 000-00-00 Is there a function in PHP I did not find yet that does this? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Previous n Articles

2002-02-05 Thread jtjohnston
I'm using this code to create a Next n Articles on my index.page from my mysql database. I worked most of it out myself. Then I got some help. It works. I thought I understood my own code enough to be able to construct a Previous n Articles. I guess not. My coding skills need help. So how do I

[PHP] Re: Dynamic Dropdown menu question.

2002-02-05 Thread jtjohnston
Michael, I think you're trying to kill yourself coding. here's what I do for myself: select name=from option value= SELECTEDSelect Someone/option ?php $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(select * from $table ORDER by

[PHP] autoindex

2002-02-05 Thread jtjohnston
I want to reset the autoindex in a mysql table using php if I can. I found this. Can anyone help? http://www.mysql.com/doc/m/y/myisamchk_other_options.html J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Previous n Articles

2002-02-05 Thread jtjohnston
Jason, I'm not ssure I follow. $offset is the number i read in in my a href $limit is the number displayed. $num_rows is the number of rows in my database. What are you doing with $previous? $previous would be my string, not the previous offset? Could you show me again? if(!$offset) {

[PHP] Yawn, good morning? night? Whateva! :)

2002-02-03 Thread jtjohnston
Good day, morning, night? It's dark, so that makes it sleepy bye time. Bit before I do, I'm trying to work this out. I have a little bit of code to print Next n articles in my database. Can someone help me straighten out these lines of code, pretty please ... before I go fleeping nuts :)

Re: [PHP] Can php Read contents from MS Word in Exactly sameformat

2002-02-03 Thread jtjohnston
Is there a function or class written to convert rtf reliably to html? :) Let me know, John A post reply would be helpful if you can. Jason G. wrote: MS Word is a proprietary, binary (i think), format... Have fun. There may be a solution out there. If you could convince her to save it in

[PHP] limit 0,30

2002-01-31 Thread jtjohnston
I want to do something like this on a page: Pages: 1 2 3 [Next] How can I code SELECT * FROM `bookmarks` LIMIT 0, 30 ? Thanks? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

  1   2   >