RE: [PHP] Formating datevariables...

2002-07-22 Thread John Holmes
OM your_table There's no need to involve PHP at all... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Digit Grouping

2002-07-22 Thread John Holmes
to do it? number_format() ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] redirecting after login

2002-07-23 Thread John Holmes
> why don't u do something like > > if (!username) > { you can not access this page > } > else > { > //page content > } > > ? > > that's a quick fix but might be all you need to do.. Umm...I hope register_globals is off... www.yourdomain.com

RE: [PHP] Re: MySQL - PHP combined log

2002-07-23 Thread John Holmes
QL. You'll still have the problem of identifying which PHP page caused the MySQL error, though... ---John Holmes... > -Original Message- > From: PHPCoder [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 23, 2002 2:23 AM > To: Richard Lynch > Cc: php-general > Subject: R

RE: [PHP] How to store an image into a mysql database using php language?

2002-07-23 Thread John Holmes
;ll tell you exactly how to do it. ---John Holmes... > -Original Message- > From: Rija [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 11:03 PM > To: [EMAIL PROTECTED] > Subject: [PHP] How to store an image into a mysql database using php > language? > >

RE: [PHP] Re: Formating datevariables...

2002-07-23 Thread John Holmes
pter 6 of the MySQL manual. It will save you a ton of work later on... ---John Holmes... > -R > > "Ragnar" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I have a column in a mysql table with a timestamp. The value of this

RE: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread John Holmes
Isn't there a MONTH function in PG? SELECT * FROM your_table WHERE MONTH(NOW()) = MONTH(your_column) ?? Or if PG stores dates in the Unix timestamp format, is the an equivalent to date() that you can extract the month from the column and compare them?? ---John Holmes... > -

RE: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread John Holmes
ber of seconds since Jan 1, 1970 or something. You could use a combination of date() and mktime() and maybe even strtotime() to figure the unix timestamp of the current month's start and end, then use the BETWEEN SQL given above... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: Formating datevariables...

2002-07-23 Thread John Holmes
ts may vary. I used some benchmark class by Sebastian Bergmann. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] MySQL Backup and Restore

2002-07-23 Thread John Holmes
base and use this: mysql -uuser -ppassword database_name < filename.sql ---John Holmes... > -Original Message- > From: Peter [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 23, 2002 11:04 PM > To: kip; [EMAIL PROTECTED] > Subject: RE: [PHP] MySQL Backup and Restore &

RE: [PHP] Accessing upper directory of public_html directory

2002-07-23 Thread John Holmes
n include/ directory above your web root. You can use: include("/home/full/path/to/your/dir/include/db.php"); Or include("../include/db.php"); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Trouble with \

2002-07-24 Thread John Holmes
something. If the \ is by itself, then stripslashes() won't do anything to it. Maybe you should just try $newtext = str_replace("\","",$old_text); Without seeing a sample of your file and some more information, all I can give is "snooty" answers, evidently.

RE: [PHP] Speeding up PHP or MySQL

2002-07-24 Thread John Holmes
for _anything_ that will speed up showing results to large > queries.. How about an index on your tables? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: date

2002-07-24 Thread John Holmes
mn with June 24th, or any 24th, will come up as Today. Something like this will work, though... SELECT IF(TO_DAYS(CURDATE()) = TO_DAYS(date_column),'Today',IF(TO_DAYS(CURDATE())-1 = TO_DAYS(date_column),'Yesterday',date_column)) FROM your_table; Hope that helps... ---John

RE: [PHP] datetime field - still a newbie

2002-07-25 Thread John Holmes
echo "Today"; break; case date("Ymd",strtotime("-1 day")): echo "Yesterday"; break; default: echo $your_row['Date_Column']; } Untested code, of course... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] preg_match() occurence position

2002-07-25 Thread John Holmes
are searching for? If not, you can use strpos(). www.php.net/strpos ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Parse error - new set of eyes?

2002-07-25 Thread John Holmes
> elseif ((!isset($HTTP_SESSION_VARS['clk']) || > (!isset($HTTP_SESSION_VARS['holy_cow']) || > (!isset($HTTP_SESSION_VARS['ipaddy']) || (!isset($HTTP_SESSION_VARS['a'])) Your parenthesis don't match up, if I can count correctly today. --

RE: [PHP] still on sessions

2002-07-26 Thread John Holmes
regular variable it is. Anything you assign to it will be available on any page you call session_start(). How much easier can it be?? If you really want a message, then on the last line of your file put echo "Session Closed"; ---John Holmes... -- PHP General Mailing List (http://www.php.n

RE: [PHP] calling user-defined php functions from tag

2002-07-26 Thread John Holmes
s on the link, he'll see: "The result of this > function is: 20" And he will, but it requires a page to be requested...otherwise use JavaScript. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] RE:

2002-07-26 Thread John Holmes
h or request to invoke PHP again. That being said, in your href link, pass an ID saying which function to call. It can be the name of the function, or a number to relate to it. Make the action of the page the current page. Maybe something like this is what you're after?? Run Function One";

RE: [PHP] Re: Date() Problem

2002-07-27 Thread John Holmes
you can do with a PHP function you can do with a MySQL function. You are also not completely lost if you're storing things as Unixtimstamps. You can convert from and to unixtimestamps and still make use of all of the MySQL functions... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread John Holmes
it all up, and then call up http://localhost/ to view your pages. ---John Holmes... > -Original Message- > From: Marcus Unlimited [mailto:[EMAIL PROTECTED]] > Sent: Saturday, July 27, 2002 10:05 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Q:What is the easiest way to test

RE: [PHP] removing html...

2002-07-27 Thread John Holmes
Use a regular expression. Something like this should work. eregi("(.*)",$html_text,$matches); $matches[1] should contain the text you are after. ---John Holmes... > -Original Message- > From: JJ Harrison [mailto:[EMAIL PROTECTED]] > Sent: Saturday, July 27, 2002 9

RE: [PHP] removing html...

2002-07-27 Thread John Holmes
Or... preg_match("/(.*)<\/body>/i",$html_text,$matches); ---John Holmes... > -Original Message- > From: JJ Harrison [mailto:[EMAIL PROTECTED]] > Sent: Saturday, July 27, 2002 9:41 AM > To: [EMAIL PROTECTED] > Subject: [PHP] removing html... > > Hi

RE: [PHP] Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread John Holmes
ns for the package you install. ---John Holmes... > -Original Message- > From: Marcus Unlimited [mailto:[EMAIL PROTECTED]] > Sent: Saturday, July 27, 2002 11:17 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Q:What is the easiest way to test my PH

RE: [PHP] Re: How to UPDATE two MySQL Tables

2002-07-27 Thread John Holmes
rony!) Just note that REPLACE is MySQL specific. A solution using it may not be portable to other databases. May or may not matter to you... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Is it possible...

2002-07-27 Thread John Holmes
and only HTML is sent to you. ---John Holmes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Quotes getting screwed up in form fields

2002-07-27 Thread John Holmes
ot;" HTML doesn't know that \ is used to escape the " character. It just sees the string "New York\" and treats the rest as an unknown attribute. So, to do it correctly, you should use this: Value="" ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] removing html...

2002-07-27 Thread John Holmes
s); Preg vs. Ereg nametotal time average iteration time 100%Preg Method 59ms5.906E-005 339%Ereg Method 200ms 0.00020036 Each method was called 10,000 times. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubs

RE: [PHP] Stopping Multiple Entries in mySQL DB

2002-07-27 Thread John Holmes
A", "Jackson, UK", "Someone Else, USA", etc...just not the same combination at all. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] string comparison

2002-07-27 Thread John Holmes
Strcmp() is case sensitive. So use it when you need a case sensitive comparison. ---John Holmes... > -Original Message- > From: Bas Jobsen [mailto:[EMAIL PROTECTED]] > Sent: Saturday, July 27, 2002 12:35 PM > To: PHP General > Subject: [PHP] string comparison >

RE: [PHP] Combining Columns in MySQL for PHP

2002-07-27 Thread John Holmes
> SELECT COMBINE(column_1, column_2) As column FROM column_list; > > Would give me the results of column_1 and column_2 simply by going through > "column". Use CONCAT() where you have COMBINE(). ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To un

RE: [PHP] Combining Columns in MySQL for PHP

2002-07-27 Thread John Holmes
with a temporary table, though: INSERT INTO temp (col) SELECT col1 FROM your_table; INSERT INTO temp (col) SELECT col2 FROM your_table; SELECT col FROM temp ORDER BY col ASC; ---John Holmes... > -Original Message- > From: Chris Earle [mailto:[EMAIL PROTECTED]] > Sent: Saturday

RE: [PHP] Speed issues.

2002-07-28 Thread John Holmes
ding the PHP script in the main page. For example > using printf(" and so forth. (A) will be faster, generally. Plus it's easier to read and find the PHP snippets in the HTML, than it is to read an entire page of print/echo statements. And it'll generally open neatly in a graph

RE: [PHP] php 'mail()' security

2002-07-28 Thread John Holmes
gives them less of a chance to insert extra headers, which is pretty much the only threat. If there's a possibility of the email not being shown as plain text, then you'll want to use striptags() like others mentioned. ---John Holmes... > -Original Message- > From: Tech

RE: [PHP] PHP-MySQL connection problem

2002-07-29 Thread John Holmes
Edit that file if it's there. If it's not, then look for a PHP-ini.dist or PHP-ini.recommended in the files you downloaded and rename it to PHP.ini and copy it to that location. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Resetting ID

2002-07-30 Thread John Holmes
u are using this column incorrectly. My guess is that you'd want to read up on the COUNT() or LIMIT functions in MySQL... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Pulling a data from array of checkboxes

2002-07-27 Thread John Holmes
> I am passing a value of checkboxes in a form to a new page like this (see > example here: http://www.gibsonusa.com/test/check/) > In a new page how can I pull the data from a MySQL database according to > each value I passed from a previous page? In other words: Assume that the > value of a chec

RE: [PHP] Hide the undefined offset error for the array?

2002-07-30 Thread John Holmes
) Hmm...what are you doing, btw? Are you use you couldn't make use of in_array()?? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] $row and alias

2002-07-30 Thread John Holmes
Use ibase_fetch_row() instead... Then you can use count() on it to see how many columns there are and loop through them all. ---John Holmes... > -Original Message- > From: Saci [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 30, 2002 2:44 PM > To: [EMAIL PROTECTED] >

RE: [PHP] shorter way to write include function?

2002-07-31 Thread John Holmes
No. ---John Holmes... > -Original Message- > From: Bas Jobsen [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 31, 2002 7:58 AM > To: PHP General > Subject: [PHP] shorter way to write include function? > > Hello, > > i have > /include/dotest.php: &g

RE: [PHP] Can several different sessions coexist?

2002-08-01 Thread John Holmes
; $_SESSION['area_one']['value2'] = 10; Then, in another area, you can do the same thing, basically... $_SESSION['area_two']['value1'] = 'Something'; $_SESSION['area_two']['value2'] = 1000; Then...when you want to drop the sessi

RE: [PHP] Why do i get this Notice Message?

2002-08-02 Thread John Holmes
ister_globals ON, but you are inside of a function, so it is a whole new variable now. So, like someone else suggested, make it global inside your function Global $PHP_SELF; Or, if you're on a new version, just use $_SERVER['PHP_SELF'] and you don’t have to worry about global. ---

RE: [PHP] PHP Hosting

2002-08-02 Thread John Holmes
Safe_mode = ON Open_basedir restrictions Use PHP in CGI mode and each runs as it's own user with access to only it's own file (may require separate Apache's, too...) ---John Holmes... > -Original Message- > From: Matt Babineau [mailto:[EMAIL PROTECTED]] > Sent:

RE: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix.

2002-09-17 Thread John Holmes
I'm not sure if that's a "bug", it's more of a feature request. ---John Holmes... > -Original Message- > From: Jason Caldwell [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 3:24 AM > To: [EMAIL PROTECTED] > Subject: [PHP] REGIST

RE: [PHP] COOKIE Question.

2002-09-17 Thread John Holmes
> I do the print $_COOKIE["Acccess]"; and I still don't see any data print. Did you typo in your code like you did here?? Try to dump the whole $_COOKIE[] array and see what's in it. print_r($_COOKIE); Did you mention what version of PHP you were using? ---John Holm

RE: [PHP] stopping repeated posts to a Bulletin Board

2002-09-17 Thread John Holmes
her suggestions, You can use a processing page that doesn't output anything and just does the insert and then redirects to a "success" page. Then, if they hit refresh, then it will only refresh the "success" page, not the processing page. You can also restrict the user t

RE: [PHP] stripslahes() | Common pitfalls?

2002-09-17 Thread John Holmes
okie before you stripslashes() it? I'll guess that you're not assigning the result to anything. Are you doing this? stripslashes($_COOKIE['value']); instead of $new_value = stripslashes($_COOKIE['value']); ?? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Urgent Installation Question

2002-09-18 Thread John Holmes
Have you tried the chapter in the PHP manual on installation? It walks you right through it. MySQL is just a simple unzip and go, there's no real setup to it at all other than changing the root password... ---John Holmes... > -Original Message- > From: César Aracena [ma

RE: [PHP] Urgent Installation Question

2002-09-18 Thread John Holmes
There should be a php-ini.dist that you can rename to PHP.ini ---John Holmes... > -Original Message- > From: César Aracena [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 18, 2002 6:03 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] Urge

RE: [PHP] Stripping specific tags

2002-09-19 Thread John Holmes
erything else through and assume it's good. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Loop through POST-result

2002-09-19 Thread John Holmes
array('firstname' => 'fname', 'lastname' => 'lname'); Are you serious? Take a look at the $HTTP_POST_VAR or $_POST array, which, amazingly, is an array that holds your form data, with the key is the name of the form field and the value is the value of the

RE: [PHP] Stripping specific tags

2002-09-19 Thread John Holmes
ess function to have. Did you read my post? The basic idea is validation is to allow what you _know_ is good, and kill the rest. You don't kill a couple things you know are bad, then assume the rest is good and let it in. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Script Modificaton question

2002-09-19 Thread John Holmes
read whole file $fileArr = file($filename); //open file and truncate to zero $fp = fopen($filename,"w+"); //write 20 lines of old file to new file fputs($fp,array_slice($fileArr,0,$numLines); //format $message //write message to file fputs($fp,$message); //close file fclose($fp); Adapt to your needs... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Date Concat?

2002-09-20 Thread John Holmes
x27;, YEAR(end_date)) FROM training Another option would be to just select out the individual month, day, and year out of the database, instead of a formatted date. Or select out a unix_timestamp and use date() to extract the individual parts and create your string... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Sessions

2002-09-20 Thread John Holmes
You have session_start() on the second page, too, right?? > -Original Message- > From: Erwin [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 20, 2002 5:45 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Sessions > > Hi all, > > I'm having a problem with sessions. I use PHP version 4.2.

RE: [PHP] Is php even right for this design?

2002-09-20 Thread John Holmes
waste of resources. Why not do the filtering with the SQL query? Why are you selecting out more than you need? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] return the amount of records in a mysql databace

2002-09-22 Thread John Holmes
Then do a SHOW DATABASES query before that and loop through the results, counting the rows in each table. If you have to do this, though, I think you have some normalization issues with your database... ---John Holmes... > -Original Message- > From: Jeff Bluemel [mailto:

RE: [PHP] mysql password function

2002-09-22 Thread John Holmes
Use this: $result = mysql_query("SELECT PASSWORD(" . $_POST['password'] . ")"); $password = mysql_result($result,0); or just use mysql_fetch_row() or AS in your query so you don't have to recreate that complex column name. ---John Holmes... >

RE: [PHP] Replace linefeed/newline from text inputs with tag?

2002-09-22 Thread John Holmes
> If i have a textarea form input for users and they enter in return spaces, > how can i replace the ascci chars with html tags? It'd be great if they had a function for this...they could call it nl2br() or something... www.php.net/nl2br ---John Holmes... -- PHP General Mailing

RE: [PHP] FW: Cannot Redeclare?

2002-09-22 Thread John Holmes
Funcs.php is probably being included twice at some point in your code. ---John Holmes... > -Original Message- > From: Stephen Craton [mailto:[EMAIL PROTECTED]] > Sent: Sunday, September 22, 2002 10:56 PM > To: [EMAIL PROTECTED] > Subject: [PHP] FW: Cannot Redeclare? >

RE: [PHP] Help with mail...

2002-09-22 Thread John Holmes
Variables are not evaluated within single quotes. You are trying to send an email to $address, literally. If you just have a single variable, lose the quotes entirely. Mail($address,$subject,$body); ---John Holmes... > -Original Message- > From: Chuck "PUP" Payn

RE: [PHP] Help with mail...

2002-09-23 Thread John Holmes
It's just part of the rules. Variables are not evaluated when they are between single quotes, they are between double quotes. Echo 'This is $var'; Will output that string, literally. Echo "This is $var"; Will take the value of $var, if any, and place it in th

RE: [PHP] mysql_num_rows error

2002-09-23 Thread John Holmes
to see what the problem is. You probably need quotes around $type or $type has no value. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Replace linefeed/newline from text inputs with tag?

2002-09-23 Thread John Holmes
page explains this correctly, btw. It says that a "" will be inserted before all newlines. ---John Holmes... > -Original Message- > From: David T-G [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2002 7:10 AM > To: PHP General list > Cc: John Holmes; '

RE: [PHP] Encryption Question

2002-09-23 Thread John Holmes
on username, decrypt it and then compare? SELECT 1 FROM table WHERE password_column = PASSWORD('$password') AND username = '$username' If a row is returned, the username and password match what's in the database. $password and $username would come from your form or whatever.

RE: [PHP] Maybe a stupid question but can it be done?

2002-09-23 Thread John Holmes
Just run two inserts. You can't do it with just one. I'd have to guess you have design issues if you have to do this anyhow... ---John Holmes... > -Original Message- > From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2

RE: [PHP] Another Encryption question

2002-09-23 Thread John Holmes
Look at a phpinfo() page, do you have mcrypt installed? I'd have to guess no, because that's generally how you get this error. ---John Holmes... > -Original Message- > From: Tom Ray [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2002 10:15 PM > To: [EMAI

RE: [PHP] Crypt() =or= md5()

2002-09-23 Thread John Holmes
I couldn't find anything in the manual, but I don't think crypt() works in windows...or at least 95/98. Or the function may be denied in your PHP.ini for some reason. ---John Holmes... > -Original Message- > From: Anthony Ritter [mailto:[EMAIL PROTECTED]] > Sent: M

RE: [PHP] session and expiration function

2002-09-23 Thread John Holmes
n routine. > if so, any ideas how? I don't think there's a way to do it besides hacking the source code. If you really have to do this, I'd set your own session.save_path() in your scripts and then write a script to do the cleanup and function calling for you. ---John Holmes...

RE: [PHP] session and expiration function

2002-09-23 Thread John Holmes
to go. You made your own garbage collector. I'm going to have to do this for a sourceforge site I have. I started a thread about this on the PHP board at Devshed and someone posted a sample function to handle the cleanup. ---John Holmes... > -Original Message- > From: chris

RE: [PHP] Maybe a stupid question but can it be done?

2002-09-23 Thread John Holmes
> if the 2 tables have the same name can't he just go > > INSERT INTO table1, table2 (table1.name=$name, table2.name=$name ... > blah); > > think u can do that .. but again that relies on table names being the same > i > guess... No...That's not a valid q

RE: [PHP] Re: html input and php (newbie), ask more

2002-09-24 Thread John Holmes
It's not a PHP issue, I'll tell you that. There is something that's not set up correctly in your apache configuration. Someone here should be able to give you the syntax, but you may find an answer on an Apache list or FAQ faster... ---John Holmes... > -Original Message-

RE: [PHP] table-wide or database-wide search and replace?

2002-09-24 Thread John Holmes
ly be feasible, you'd want to use the replace and regex functions already in MySQL. Only issues you may run into is the 30 second time limit... How much will you pay me to write it?? :) ---John Holmes... > -Original Message- > From: Justin French [mailto:[EMAIL PROTECTED]]

RE: [PHP] Showing online users!

2002-09-24 Thread John Holmes
How about: SELECT sUser FROM members WHERE sUpdated > NOW() - INTERVAL 10 MINUTE; as your query... I assume you are using a MySQL format date/datetime/timestamp column for sUpdated? ---John Holmes... > -Original Message- > From: Philip J. Newman [mailto:[EMAIL PROTECTED

RE: [PHP] RFE: Multiple auto_prepend_file statements to work in Apache

2002-09-24 Thread John Holmes
Even if it's only one file, have that file include the other necessary files... so two.php would include one.php, three.php, etc. You could even build the logic into two.php so it decides which other files to include based on any number of conditions. ---John Holmes... > -Original

RE: [PHP] Getting at the variable name itself

2002-09-24 Thread John Holmes
itself? You can't, AFAIK. You'd probably be better off by naming your input elements as arrays. etc... and then access it by $method['A']['B']... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] script to check for register_gloabs=off compatibility

2002-09-24 Thread John Holmes
Kind of defeats the purpose. You could easily use extract() or the import_request_variables() function to do what you want. It would be the same as having register globals on, though... ---John Holmes... > -Original Message- > From: Thom Porter [mailto:[EMAIL PROTECTED]]

RE: [PHP] Installing php in windows 95

2002-09-24 Thread John Holmes
The .dll is there. Look in the dlls folder for where every you installed PHP. You downloaded the binary and not the source code, right? ---John Holmes... > -Original Message- > From: Uma Shankari T. [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 25, 2002 12:13 AM

RE: [PHP] java script & session?

2002-09-24 Thread John Holmes
And there is any reference to PHP in your question where > -Original Message- > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 25, 2002 12:34 AM > To: [EMAIL PROTECTED] > Subject: [PHP] java script & session? > > I want drop down menu's in my setup tha

RE: [PHP] HT authentication question

2002-09-24 Thread John Holmes
to "time out" logins, or provide a "log-out" button. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] java script & session?

2002-09-24 Thread John Holmes
You aren't opening any PHP files, you are opening javascript files. Do you want the session info passed to the .js files? Is .js parsed as PHP on your server? Do you lose the session in your .phtml page after you call the given javascript? What is your question? ---John H

RE: [PHP] Ah ha ... confirm delete.

2002-09-24 Thread John Holmes
r not. If confirm() returns true, submit and process the form, otherwise, do nothing. ---John Holmes... > -Original Message- > From: Philip J. Newman [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 25, 2002 12:44 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Ah h

RE: [PHP] table-wide or database-wide search and replace?

2002-09-25 Thread John Holmes
e changed in PHP.ini or with a function call at the beginning of the script. > because i could do this on the command line (once off), and could also > break > the process into individual tables, or even groups of 50 rows or something > if needed -- although i'd do almost anythi

RE: [PHP] slashes added before '

2002-09-25 Thread John Holmes
Use stripslashes() on the text before you write it to the file. Where is this text coming from? The slashes are probably getting added by magic_quotes. ---John Holmes... > -Original Message- > From: Khalid El-Kary [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 25, 200

RE: [PHP] Set a default global - $_GET[]

2002-09-25 Thread John Holmes
et($_GET['...'])) { $_GET['...'] == "default value"; } ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Cronjob

2002-09-25 Thread John Holmes
Use lynx or wget to call your web page. lynx --dump http://www.domain.com/my_cron_page.php ---John Holmes... > -Original Message- > From: Daren Cotter [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 25, 2002 12:36 PM > To: PHP General Mailing List > Subject

RE: [PHP] PHP POST arrar is dropping 4 characters

2002-09-25 Thread John Holmes
This was just talked about last week, search the archives. IIRC, it was a bug, so maybe search the buglist, too. ---John Holmes... > -Original Message- > From: David Busby [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 25, 2002 7:29 PM > To: [EMAIL PROTECTED] >

RE: [PHP] Finding out when a Web page has changed

2002-09-26 Thread John Holmes
You could cache/save the actual contents of the file, then when you read it next time, compare it to what you saved and see if it changed. You may want to filter out everything but what's between and , so you're not thinking it changed just b/c of something in the headers... ---J

RE: [PHP] Finding out when a Web page has changed

2002-09-26 Thread John Holmes
Yeah, true. Maybe you could just ereg() out the content. Each url would need it's own ereg, though, so it won't be as easy to set up. But, technically, if the quote changes, then the page has been updated, even if it's dynamic. How do you define "updated"?? ---John H

RE: [PHP] Encrypted MySQL passwords

2002-09-26 Thread John Holmes
ted password? > Or, does mysql_pconnect handle this? Nope, it's all in the clear. MySQL 4.0 has support for doing this over SSL, I think. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Encrypted MySQL passwords

2002-09-26 Thread John Holmes
> BTW (and I have not checked the CVS/TODO, so I ask here), is > there planned support for SSL & MySQL 4.x.x in PHP?. Yes. More info in Chapter 4.3.9.1 of the MySQL manual. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] REMOTE ADDR

2002-09-26 Thread John Holmes
> This is php code Yeah, you can tell by the fact that there is no Anderson O Muniz > > Jesse Cablek <[EMAIL PROTECTED]> escreveu nas notícias de > mensagem:001c01c2659b$9b3b3480$[EMAIL PROTECTED] > > Anderson O Muniz scribbled; > > > > > > > > > > > > > > >

RE: [PHP] I don't want multiple form submitted

2002-09-26 Thread John Holmes
swer. Thanks This question is asked every week, it seems. Best method is to use a "middle-man". Use a middle page that processes the new post, then redirects the user to the next page. You can use a PHP header() solution, or a javascript META-REFRESH method. ---John Holmes... -- PH

RE: [PHP] Help with Regular Expressions

2002-09-26 Thread John Holmes
htmlentities() and it'll stop javascript and html from being evaluated. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] $_SESSION[] and register_globals=on

2002-09-27 Thread John Holmes
") and unset($_SESSION['value']) and maybe even unset($value); If you don't ever unregister variables, then you won't have a problem. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Regular expression help converting doc to xml

2002-09-27 Thread John Holmes
e $new_text = str_replace("\n\t","\n\t",$your_text); Assuming there is a tab in there... You'd be better off getting an editor that'll do this for you. Textpad lets you search and replace with regular expressions. Other programs do too. ---John Holmes... -- PHP

RE: [PHP] Logic -- conditional statements

2002-06-04 Thread John Holmes
, but it's a better solution than all of the IFs that was just posted... ---John Holmes... > -Original Message- > From: Naintara Jain [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 5:47 PM > To: Ricardo Fitzgerald > Cc: Php-General@Lists. Php. Net &

RE: [PHP] User Authentication

2002-06-04 Thread John Holmes
Sessions use cookies as it is...so what do you really want to do...what do you want to protect? ---John Holmes... > -Original Message- > From: Jule Slootbeek [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 9:49 PM > To: php-general > Subject: [PHP] User Authenti

RE: [PHP] Modifying the sort order of a query

2002-06-05 Thread John Holmes
those numbers in your query. SELECT * FROM table WHERE ... AND ID IN($display_ids) ORDER BY <> Hopefully PG supports IN(). My $0.02, I'm sure there are other ways...or maybe this isn't even what you're looking for. :) ---John Holmes... > On Thu, 6 Jun 2002, Bogdan

  1   2   3   4   5   6   7   8   9   >