Re: [PHP] smtp

2002-05-21 Thread 1LT John W. Holmes
- Original Message - From: Steve Buehler [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 2:34 PM Subject: [PHP] smtp I am trying to use the smtp class from phpguru.org with a mysql database using PHP. My question is this. I understand that I can send out

Re: [PHP] printer_open

2002-05-21 Thread 1LT John W. Holmes
Restart your web server when you make changes to php.ini. Also, note that these functions are for the printer on the server, i.e. where the code is running. ---John Holmes... - Original Message - From: Sqlcoders.com Programming Dept [EMAIL PROTECTED] To: php general [EMAIL PROTECTED]

Re: [PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread 1LT John W. Holmes
Use PHP to write a META-REFRESH to the file that's going to be downloaded, or a php file that controls the download. Basically, you show them an HTML page that says the download will begin, the META tag refreshes after X seconds to the actual file, and the download box pops up. ---John Holmes...

Re: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread 1LT John W. Holmes
I imagine he would want to un-encrypt his files at some point and MD5 is a one-way method and not an encryption technique at all... ---John Holmes... - Original Message - From: Javier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 4:43 PM Subject: [PHP] Re: Mcrypt:

Re: [PHP] Whats Function like response.redirect

2002-05-22 Thread 1LT John W. Holmes
header(Location: http://www.detik.com;); www.php.net/header Read the manual page... ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 5:12 AM Subject: [PHP] Whats Function like response.redirect what function in PHP

Re: [PHP] voting using text files

2002-05-22 Thread 1LT John W. Holmes
Use file locking, so only one instance of the script is writing to the file at a time... www.php.net/flock ---John Holmes... - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Wednesday, May 22, 2002 9:38 AM Subject: [PHP] voting using text

Re: [PHP] read from flatfile and convert

2002-05-22 Thread 1LT John W. Holmes
How is the text file organized? Is it one testimonial per line? or is there some other kind of seperator? This should be easy. Use file() to read in the file, then do an insert for each line. one little loop will load the whole file for you. how large of a file is it? ---John Holmes... -

Re: [PHP] Help .. deprecated messages

2002-05-22 Thread 1LT John W. Holmes
It's just a warning, not an error. It's probably always been there, but your error reporting was set to a level that didn't display it. Turn your error reporting level up in php.ini. it's set lower in PHP 4.1+ than it has been in the past. Best fix is to of course not use the mysql_db_query()

Re: [PHP] voting using text files

2002-05-22 Thread 1LT John W. Holmes
A good structure would be to have one file for each possible answer and each file contains the number of votes it has recieved. Then: -- Open file for the chosen option as read only -- Read the value in the file -- Close the file -- Increase the value by one using ++ -- Open the file

Re: [PHP] session.save_path

2002-05-22 Thread 1LT John W. Holmes
You have to set the session.save_path to a path on your machine that PHP can write session files to. You can make a temp folder in your C: drive and then set the path to c:/temp or c:\\temp or create and set it to any other folder you want. Make sure (if you're using NTFS) that user

Re: [PHP] Problem : track_vars stopped working.

2002-05-22 Thread 1LT John W. Holmes
Maybe you should read about what you're installing before you install it. Register_globals is off in PHP 4.1+ by default, so your variables aren't created. You can use $_GET[text] to get the variable, though. Or you can turn on register_globals in your php.ini and face the security consequences

Re: [PHP] W2K SP2, PHP 4.2.1, IIS 5

2002-05-22 Thread 1LT John W. Holmes
If all that fails, there's always: Have you tried a hammer? I like the 369 rule. Drop it from 3 feet, if it still doesn't work, drop it from 6 feet, and if it still isn't working, drop it from 9 feet. If none of that works then trash it. WARNING: Don't use this rule for children. ---John

Re: [PHP] fputs() pblm how write on a new line each time ?

2002-05-22 Thread 1LT John W. Holmes
Use \n for newline. \r\n for Windows. fputs($fp,value\n); ---John Holmes... - Original Message - From: arnaud gonzales [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Wednesday, May 22, 2002 3:56 PM Subject: [PHP] fputs() pblm how write on a new line each time ? Hi all, I'

Re: [PHP] tmpfile() errors?

2002-05-22 Thread 1LT John W. Holmes
You're not even trying to open a file. You're trying to open a Resource, which makes me think that fopen() is being called twice or something. You obviously have something very wrong. Can you show the code around these lines where you're trying to open the file? All of the errors are because of

Re: [PHP] Date/Time...

2002-05-23 Thread 1LT John W. Holmes
Really only a mysql issue. To get the number of days between now and the oldest row in the table, use this query SELECT TO_DAYS(NOW()) - TO_DAYS(MIN(date_column)) AS Num_Days FROM table; To erase all rows that are older than $X days, use this query: DELETE FROM table WHERE date_column NOW()

Re: [PHP] php/mysql join query help

2002-05-23 Thread 1LT John W. Holmes
It's generally a bad idea to store delimited data in a single column in a database. It kind of goes against what a database is there for. A better layout would be to have your second table contain a row for each of the delimited values. So if you have '1,2,3,4' in your database now, the better

Re: [PHP] Array question - Please help

2002-05-23 Thread 1LT John W. Holmes
Write your results to a file and create a mail from the file once a day and send it to yourself with cron, or use a database to hold the results if one is available. Instead of making a mail message with your loop, write information back to the file. Format your file like this: url, pass, fail,

Re: [PHP] output problem

2002-05-23 Thread 1LT John W. Holmes
Don't do that, it's inefficient. You've got the right query, you just have to assign the column an alias to use it the way you are. SELECT COUNT(user) AS count_user FROM _request WHERE date='$date' AND status = 'open' Then, after fetching the object from the result set, use $line-count_user

Re: [PHP] please help!!

2002-05-25 Thread 1LT John W. Holmes
Saturday, May 25, 2002, 9:13:02 AM, you wrote: JN Hi Hi, JN php + apache + win2000 JN or JN php + IIS + win2000 JN I don't know why my setting do not allow me to POST or GET variable which submit in html form JN Please help!!! JN Jolly Turn on register_globals or use the $_GET[],

Re: [PHP] hosting

2002-05-25 Thread 1LT John W. Holmes
anybody know of a hosting service that can be setup in a few minutes and i mean a few minutes that's all i got I know of a great one...umm, just give me a few minutes to remember the name. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] 4.2.1 Vars

2002-05-25 Thread 1LT John W. Holmes
Do you know what the security problems are? Do you realise that having register_globals on or off isn't the security problem, it's how you write your code? If you're not going to change any of your code, just turn on register_globals. Changing your code to _POST or _GET and doing nothing else

Re: [PHP] 4.2.1 Vars

2002-05-25 Thread 1LT John W. Holmes
- From: Kurth Bemis (List Monkey) [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, May 25, 2002 4:07 PM Subject: Re: [PHP] 4.2.1 Vars At 04:00 PM 5/25/2002 -0400, 1LT John W. Holmes wrote: Actually - i don't understand what the docs at PHP

Re: [PHP] NewBie-UPLOADING IMAGE

2002-05-25 Thread 1LT John W. Holmes
Try the RTFM() function. It will do exactly what you want. http://www.php.net/manual/en/features.file-upload.php ---John Homes... - Original Message - From: Dani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 25, 2002 6:57 PM Subject: [PHP] NewBie-UPLOADING IMAGE Hi,

Re: [PHP] UPLOADING IMAGE

2002-05-25 Thread 1LT John W. Holmes
Give a destination file name, not just the directory. You don't have to unlink($file), it's done automatically when the script ends. ---John Holmes... - Original Message - From: Dani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 25, 2002 7:58 PM Subject: [PHP] UPLOADING

Re: [PHP] UPLOADING IMAGE

2002-05-25 Thread 1LT John W. Holmes
it. ---John Holmes... - Original Message - From: Dani [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, May 25, 2002 8:24 PM Subject: Re: [PHP] UPLOADING IMAGE I have tried to use the filename but it's still not working. here is the whole code

Re: [PHP] onchange read file, php JS

2002-05-28 Thread 1LT John W. Holmes
You have to put the variable into a hidden form element or tack it onto a URL in order to pass it to the PHP page. ---John Holmes... - Original Message - From: Mihaela Dupret [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 6:51 AM Subject: [PHP] onchange read file,

Re: [PHP] function return

2002-05-28 Thread 1LT John W. Holmes
Return an array function whatever($var1, $var2) { // do whatever $ret[0] = $var1 + $var2; $ret[1] = $var1 - $var2; $ret['something'] = ($var1/$var2) * 100; return $ret; } $value = whatever(5,4); echo $value[0]; echo $value['something']; ---John Holmes... - Original Message

Re: [PHP] Dates

2002-05-28 Thread 1LT John W. Holmes
PHP way: Use strtotime() to get a unix timestamp for each one. subtract smaller from larger and divide by number of seconds in a day. MySQL way: I assume these dates come from a database. Use a query like this: SELECT TO_DAYS(column_one) - TO_DAYS(column_two) AS Difference FROM table WHERE

Re: [PHP] 'ucfirst' function for text area strings?

2002-05-28 Thread 1LT John W. Holmes
Put a text box for each sentence. ---John Holmes... - Original Message - From: Miguel Cruz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 2:19 PM Subject: Re: [PHP] 'ucfirst' function for text area strings? On Tue, 28 May 2002, Andre Dubuc wrote: Is there a way

Re: [PHP] PHP doubt

2002-05-29 Thread 1LT John W. Holmes
// connected to the database successfully and running this query: { mysql_query.etc $r=select max(cno)+1 from customer; insert into customer values($r,'$name'); } print(Your customer number is: $r); what do you think? And will this return the correct values if 2 people submitted

Re: [PHP] Parse Error(newbie)

2002-05-29 Thread 1LT John W. Holmes
Look for errors in the line above this one. PHP doesn't know what SQL is...it's just a string to PHP. ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 9:03 AM Subject: [PHP] Parse Error(newbie) I get a

Re: [PHP] HTML Checkboxes and PHP variables

2002-05-29 Thread 1LT John W. Holmes
If you name the form elements as arrays, then yeah, they are pretty much the same. input type=checkbox name=foo[] value=oneOne input type=checkbox name=foo[] value=twoTwo input type=checkbox name=foo[] value=threeThree When submitted, $foo will be an array containing the values that were

Re: [PHP] Advantages of php

2002-05-29 Thread 1LT John W. Holmes
Hmm...point number 1 would be time management, for you! Maybe you should've started researching this more than a day before hand. As far as POST vs. GET, there's hardly a difference. POST data is sent in the headers, GET data is sent in the URL. Either one can easily be created by the user, so

Re: [PHP] HTML Checkboxes and PHP variables

2002-05-29 Thread 1LT John W. Holmes
What version of PHP are you using? Is register_globals on or off? Try $_GET['foo'] as the array name, instead of $foo, or $_POST['foo'], depending on the method of your form. ---John Holmes... - Original Message - From: Michael Hall [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL

Re: [PHP] php3 / php4 vars - Submitted form doesn't work

2002-05-29 Thread 1LT John W. Holmes
Not really. You still pass variables through GET, POST, or COOKIE data. How you access the value is different based on your configuration and the PHP version. It's different for different versions of PHP4, too. Do you have a specific question or problem? ---John Holmes... - Original Message

Re: [PHP] php3 / php4 vars - Submitted form doesn't work

2002-05-29 Thread 1LT John W. Holmes
a variable $foo that contains the user input. This is probably how you were doing it before. With a new installation of PHP4, register_globals defaults to off, however. ---John Holmes... - Original Message - From: Nicolas Costes [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED] Cc

Re: [PHP] mail() function

2002-05-29 Thread 1LT John W. Holmes
Yes. - Original Message - From: Phil Schwarzmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 10:57 AM Subject: [PHP] mail() function I want to write a simple script that sends an e-mail message using PHP. I'm assuming that my web-host has the mail

Re: [PHP] How to create this login page in a good way?

2002-05-29 Thread 1LT John W. Holmes
Hello, Hello! I'm sitting here trying to create a loginpage, but it doesn't look very nice. So now I'ld use some help to decide whether the following solution is possible to create... I want to create a little script which will be included on every page and do the following: 1 does the

Re: [PHP] xcopy inside of exec()

2002-05-29 Thread 1LT John W. Holmes
Try escaping your backslashes. exec('cmd /c xcopy c:\\source c:\\target'); ---John Holmes... - Original Message - From: Adrian Christen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 12:11 PM Subject: [PHP] xcopy inside of exec() Hi! I'm traying tu use the

Re: [PHP] Warning: Cannot add header information - headers already sent by

2002-05-29 Thread 1LT John W. Holmes
You can't send anything to the browser before you send a header or cookie. Apparently, lagi.php has sent something, though, on line 4. Fix that and you will be fine. ---John Holmes... - Original Message - From: Anton Heryato [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May

Re: [PHP] ******************* Secure product download *******************

2002-05-29 Thread 1LT John W. Holmes
session_start(); if(!isset($_SESSION[did_pay])) { header(Location: http://www.example.com/pay_first.php;); } //show download code Obviously you set $_SESSION['did_pay'] to a value once they, umm, pay. ---John Holmes... - Original Message - From: Ron Stagg [EMAIL PROTECTED] To:

Re: [PHP] Warning: Cannot add header information - headers already sent by

2002-05-29 Thread 1LT John W. Holmes
1:htmlheadtitle:PHp/title/head 2:body 3:h1hahahahha/h1 Maybe it's just me, but those 3 lines look like they are sending something to the browser so, which one in line 4 have send anything first please help me to fixed regards anton ---John Holmes... -- PHP General Mailing List

Re: [PHP] ******************* Secure product download *******************

2002-05-29 Thread 1LT John W. Holmes
Ummno they can't. pay_first.php is what you send them to if they don't have a correct session. If the session is correct, show the download page. Notice the ! in front of isset(). ---John Holmes... - Original Message - From: Ron Stagg [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL

Re: [PHP] Month Values in UNIX timestamps and workaround(Newbie)

2002-05-30 Thread 1LT John W. Holmes
What are you trying to accomplish over all? ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 11:37 PM Subject: [PHP] Month Values in UNIX timestamps and workaround(Newbie) I began to write a function that

Re: [PHP] fdup Pipes?

2002-05-30 Thread 1LT John W. Holmes
Yes, I realized this after I sent my reply. And, please try hard to forgive those of us who do not use the real software approved by you the other gods. We beg your forgiveness, oh lord. You are forgiven, my child. ---John Holmes... -Original Message- From: Rasmus Lerdorf

Re: [PHP] Posting to a form - When user hits BACK button all the data isgone

2002-05-30 Thread 1LT John W. Holmes
One way is to use a GET method instead of POST. ---John Holmes... - Original Message - From: Phil Schwarzmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 30, 2002 2:43 PM Subject: [PHP] Posting to a form - When user hits BACK button all the data isgone When a user is

Re: [PHP] Help with example session class (second request)

2002-05-30 Thread 1LT John W. Holmes
Call session_start() on your second page... ---John Holmes... - Original Message - From: Daevid Vincent [EMAIL PROTECTED] To: PHP general mailing list [EMAIL PROTECTED] Sent: Thursday, May 30, 2002 3:10 PM Subject: [PHP] Help with example session class (second request) Sorry for

Re: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread 1LT John W. Holmes
You can use $_SERVER['QUERY_STRING'] if register_globals is off. ---John Holmes... - Original Message - From: Leotta, Natalie (NCI/IMS) [EMAIL PROTECTED] To: '1LT John W. Holmes' [EMAIL PROTECTED]; Igor Portnoy [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, May

Re: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread 1LT John W. Holmes
You probably still have register globals off still and your URL variables aren't being accessed correctly. Use $_GET['page'] or $HTTP_GET_VARS['page'], or turn on register_globals... ---John Holmes... - Original Message - From: Igor Portnoy [EMAIL PROTECTED] To: [EMAIL PROTECTED];

Re: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread 1LT John W. Holmes
as far as accessing GET, POST, COOKIE, etc data is concerned. Hope that helps. Let me know if there are any other questions. ---John Holmes... - Original Message - From: Leotta, Natalie (NCI/IMS) [EMAIL PROTECTED] To: '1LT John W. Holmes' [EMAIL PROTECTED]; Igor Portnoy [EMAIL PROTECTED

Re: [PHP] PHP Decisions and Issues

2002-05-31 Thread 1LT John W. Holmes
Start doing some research and testing. Can PHP and MySQL do that? Sure. Are there better solutions? Sure. Too many factors go into decisions like this that's it not a simple email question and answer. For one, MySQL only supports transactions if you use InnoDB tables. How reliable are they? I

Re: [PHP] Previous Next Navigation

2002-06-03 Thread 1LT John W. Holmes
So you think it's more efficient and faster to load a 3 - 5 thousand row table into an array in memory and pass that around to all of your scripts (through sessions?), rather than just passing a $page variable and doing a query to return 30 rows on each page?? If you pass a $Page variable, you

Re: [PHP] Previous Next Navigation

2002-06-03 Thread 1LT John W. Holmes
Okay...glad to see someone put some thought into it instead of just wanting to do it because queries are bad!. Also, the speed of the query doesn't depend on the connection speed at all. So, to solve your problem, load it into a session array. session_start(); $result = mysql_query(...);

Re: [PHP] time question.

2002-07-26 Thread 1LT John W. Holmes
How do I compare time in php? Eg. If I have a mysql time field I retrieve stored in $result[0][0] how do I say : if (($result[0][0] $result[0][0] plus ten minutes) ($result[0][0] '00:00:00')){ MySQL and PHP timestamps are in different formats. MySQL uses MMDDHHMMSS and PHP uses a

Re: [PHP] Re: PostgreSQL

2002-07-29 Thread 1LT John W. Holmes
I don't *think* PostgreSQL runs under Windows, really... You can maybe install the CygWin stuff (a Linux emulator under Windows) and get that to work, but: Can anyone confirm that PG will run under CygWin? Will it communicate with PHP running on Windows, too? I'm just looking for a way to

Re: [PHP] Brain Fart- table formatting help

2002-07-29 Thread 1LT John W. Holmes
So only increase $i when $row-show_title is true. if($row-show_title) { $i++; } $bgcolor = ($i 1) ? '#FF' : '#CC'; ---John Holmes... - Original Message - From: Brian V Bonini [EMAIL PROTECTED] To: Jay Blanchard [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 29, 2002

Re: [PHP] Stopping Multiple Entries in mySQL DB

2002-07-29 Thread 1LT John W. Holmes
Ok i cant actully do this. I have many multiple entries already in the table which i do not wish to delete. And it won't alter table with these multiple entries. So what i need is a PHP Engineered solution, where my PHP code would check for existing entries and deny entry So do it...

Re: [PHP] Dates and Date()

2002-07-29 Thread 1LT John W. Holmes
Ok here is what I did. $Hist_Time = gmstrftime('%m:%d:%Y', strtotime(-10 days)); Now I am wondering if there is a way to look for only the last day business days and be returned in an array? What have you tried? How much longer do we have to hold your hand? Not to be too rude or anything,

Re: [PHP] Dates and Date()

2002-07-29 Thread 1LT John W. Holmes
- From: 1LT John W. Holmes [EMAIL PROTECTED] To: Christopher J. Crane [EMAIL PROTECTED]; Andrey Hristov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 7:12 PM Subject: Re: [PHP] Dates and Date() Ok here is what I did. $Hist_Time = gmstrftime('%m:%d:%Y

Re: [PHP] Help Please

2002-07-29 Thread 1LT John W. Holmes
Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header

Re: [PHP] Help Please

2002-07-29 Thread 1LT John W. Holmes
Show us the first 6 lines of processing.php. ---John Holmes... - Original Message - From: Varsha Agarwal [EMAIL PROTECTED] To: Dennis Moore [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 29, 2002 4:27 PM Subject: Re: [PHP] Help Please Hi, I did not find any print or echo

Re: [PHP] Sorting Output

2002-07-30 Thread 1LT John W. Holmes
How are you displaying it? Show us some code... ---John Holmes... - Original Message - From: Brian V Bonini [EMAIL PROTECTED] To: PHP Lists [EMAIL PROTECTED] Sent: Tuesday, July 30, 2002 11:52 AM Subject: [PHP] Sorting Output I have a db with the following fields: id | month |

Re: [PHP] Serialised Data DBs

2002-07-30 Thread 1LT John W. Holmes
Yes, it'd be really smart to. If any of the data in the serialized string has a ' or in it, it could break your query. Or the user being able to enter a ' or into the data could open you to SQL attacks. You want to do addslashes() on the result of serialize(), not the content going into it,

Re: [PHP] select multiple

2002-07-31 Thread 1LT John W. Holmes
Use implode to make the array into a string and insert that. Depends on your database structure exactly how you'd do it... www.php.net/implode ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 31, 2002 8:56 AM Subject: [PHP]

Re: [PHP] text area with quotes

2002-07-31 Thread 1LT John W. Holmes
www.php.net/stripslashes ---John Holmes... - Original Message - From: Nathan Kline [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 31, 2002 3:50 PM Subject: [PHP] text area with quotes this seems so obvious yet it is giving me problems. I have a text area in a form

Re: [PHP] Printing a PHP Class

2002-07-31 Thread 1LT John W. Holmes
Use is_array() to see if it's an array. If it is, then loop through it and display the contents... ---John Holmes... - Original Message - From: Marty McGowan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 31, 2002 4:15 PM Subject: [PHP] Printing a PHP Class PHPers, In

Re: [PHP] Printing a PHP Class

2002-07-31 Thread 1LT John W. Holmes
Maybe code will help... My problem is: when printing the Class Variables using the standard approach: = function print_vars($obj) { $arr = get_object_vars($obj); while (list($prop, $val) = each($arr)) { echo $prop\t$val\n; } } = Try this: function

Re: [PHP] News to toolbar (ticker)

2002-08-01 Thread 1LT John W. Holmes
It just pulls up a PHP page...what's the big deal? Make up a PHP page that pulls the newest post out, displays it, and refreshes itself ever minute or so... It looks extremely annoying to me. Why would to want that on your toolbar? Just open up IE with the same page. ---John Holmes...

Re: [PHP] News to toolbar (ticker)

2002-08-01 Thread 1LT John W. Holmes
the latest post, format it, and display it on the page... Do you still need help? Maybe you should get more specific as to what you want... ---John Holmes... - Original Message - From: Jeff Lewis [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED] Sent: Thursday, August 01, 2002 8:34 AM

Re: [PHP] Best way to save?

2002-08-01 Thread 1LT John W. Holmes
You can wrap some output buffering around your PHP script. Then flush the buffer at the end to a variable and write it to a .html file. Full details in the manual, I'm sure... ---John Holmes... - Original Message - From: Shane [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday,

Re: [PHP] decrypting values in MYSQL

2002-08-01 Thread 1LT John W. Holmes
This was just discussed. Either you reset the password a new one, and email them the new password... or, you send them a web page to change their email address. If they don't want to change it, they don't have to. Along the same lines, you can email them a code to enter somewhere to change

Re: Re[2]: [PHP] Need help to choose hosting!

2002-08-01 Thread 1LT John W. Holmes
Why not get your own box? Then you can have whatever you want. I think you can get them from rackshack.com for $99. ---John Holmes... - Original Message - From: Mantas Kriauciunas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 02, 2002 3:00 AM Subject: Re[2]: [PHP] Need

Re: [PHP] Can somebody explain this scripts to me?

2002-08-02 Thread 1LT John W. Holmes
On Friday 02 August 2002 14:58, L.Jacquiline wrote: I have attached. Looks like someone trying to steal stuff off of CNN. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] StripSlashes Problem

2002-08-02 Thread 1LT John W. Holmes
I use the following php code to build a dynamic table retrieving values from a MySQL databases that have been inserted with slashes added - echo td width='100'input name='descr' type='text' size='45' maxlength='20' readonly value='.StripSlashes(mysql_result($badgedetails, $i,

Re: [PHP] StripSlashes Problem

2002-08-02 Thread 1LT John W. Holmes
If magic_quotes_gpc is ON, then the data is getting addslashes() automatically on a form submission. If you are doing it again, that's where the problem is. ---John Holmes... - Original Message - From: Mark Colvin [EMAIL PROTECTED] To: '1LT John W. Holmes' [EMAIL PROTECTED] Cc: Php (E

Re: [PHP] Join - problem

2002-09-18 Thread 1LT John W. Holmes
Don't include the ; in your query, for one thing. ---John Holmes... - Original Message - From: John Wards [EMAIL PROTECTED] To: Henning [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 18, 2002 11:26 AM Subject: Re: [PHP] Join - problem not having the time to look

Re: [PHP] Time Stamp

2002-09-18 Thread 1LT John W. Holmes
MySQL syntax is MMDDHHMMSS or -MM-DD HH:MM:SS ---John Holmes... - Original Message - From: Chuck Payne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 18, 2002 11:25 AM Subject: [PHP] Time Stamp Hi, I have a form that I am using to update a mysql table

Re: [PHP] PHP source code

2002-09-19 Thread 1LT John W. Holmes
Hi, Is there any way to read php source code? I didn't think so until I heard about people you have done that... Kind regards, Oliver I tend to read it left to right, but to each his own ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] about $_post

2002-09-19 Thread 1LT John W. Holmes
$_POST[ID] Since there are no quotes around the variable name ID and no dollar sign in front of it, PHP will look for a constant named ID and if one is not found it will blow chow. Depending on your error_reporting() level whether this warning is reported or not. Better to not use this

Re: [PHP] In a shared environment...

2002-09-19 Thread 1LT John W. Holmes
Relative newbie here, and I am just coming to grips with something that I think is a very bad thing... Please tell me I am wrong. When using PHP, it is the Apache user that actually performs things, and therefore needs permissions. For example, if I want to write data to a file, I have to

Re: [PHP] How long do sessions last

2002-09-23 Thread 1LT John W. Holmes
If I use sessions (not session cookies) by issuing a session_start() and then log in to an area of my web site, I understand that the session will last until either I close my browser or issue a session_unset() followed by a session_destroy(). If I log in and walk away from my PC, will the

Re: [PHP] 0 byte session files.

2002-09-23 Thread 1LT John W. Holmes
I ran into a problem with sessions on sourceforge, which uses load balancing. What's probably happening for you is that each server is looking in it's own /tmp directory for the sessions. So, a user logs on from a page on Server A, which creates a good session file on Server A for the user. Now,

Re: [PHP] How do i assign Integers only and not real numbers?

2002-09-23 Thread 1LT John W. Holmes
If you end up using floor(), watch for floating point errors. You could expect your division to come out to a whole number, say 12, but be represented by 11.999 in the computer. So that'll floor() to 11. You can add a fluff to your division to counteract this: $years = floor($years +

Re: [PHP] Problem uploading a file (bug in PHP 4.2.3 !?) worked with 4.2.2

2002-09-23 Thread 1LT John W. Holmes
What are the settings for upload_tmp_dir and file_uploads in the php.ini on the windows box? Does the Apache user have permission to write to that directory if it's valid? ---John Holmes... - Original Message - From: Jose Fandos [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday,

Re: [PHP] Echoing HTML in PHP as CGI

2002-09-26 Thread 1LT John W. Holmes
The module and CGI will work the same. Just put your PHP where you need it within the HTML. ---John Holmes... - Original Message - From: Reuben D. Budiardja [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 26, 2002 3:27 PM Subject: [PHP] Echoing HTML in PHP as CGI Hi

Re: [PHP] Whimper, help :)

2002-12-04 Thread 1LT John W. Holmes
[snip] As far as I can see, *none* of these produce an identical query string to your hard-coded version -- they *all* have the double-quotes around the search string missing! The double quotes are in $search, that's why. And the stripslashes is there more than likely because of

Re: [PHP] Regular Expresion Work on IP address

2002-12-04 Thread 1LT John W. Holmes
Now I am continuing on with the same script and I need to check for valid IP address form. Currently I have: $ip=255.255.255.0; if (preg_match (/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/, $ip)) { print Good Ip; } else { print Bad Ip; } This does work kinda. It checks

Re: [PHP] passing form variables with the same name

2002-12-05 Thread 1LT John W. Holmes
I'd love to use an array, but I don't think you can pass an array value from a form and have it work on the update script - e.g. input name=Resource[0]... Ah, but you can... You can use exactly what you just wrote and have $_POST['Resource'][0] in your processing script. Loop through that

Re: [PHP] sessions

2002-12-05 Thread 1LT John W. Holmes
i have one script (index.php) which displays information (menu items) based on result from function check_valid_user(). This function checks if there is session_is_registered(valid_user). second script is for login.it saves into session session_register(valid_user).then it reloads

Re: [PHP] Looping Addition

2002-12-05 Thread 1LT John W. Holmes
One more question... If I then wanted to do this for the other operations (such as multiplication, division, etc), how would I do that? Assuming you've figured out how to do an array... You'll have to loop through the values like in the code that others posted. foreach($_POST['number'] as

[PHP] Script not working from one computer

2002-12-05 Thread 1LT John W. Holmes
I know, PHP is executed server side, so it shouldn't matter about the computer, but... I've got a basic log in script that takes username and password and does the typical SELECT to find a match. If it's good, it sets some session variables and redirects to a main page, otherwise redirects back

Re: [PHP] Newline charactes causing problems

2002-12-05 Thread 1LT John W. Holmes
Or $notes = preg_replace(/(\r)?\n/, ,$_POST['notes']); in case it's the \r that's actually messing you up and not the \n? ---John Holmes... - Original Message - From: John Wards [EMAIL PROTECTED] To: Joshua E Minnie [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, December 05, 2002

Re: [PHP] Sesion Vars get reseted

2002-12-05 Thread 1LT John W. Holmes
- Original Message - I'm having a trouble with session vars, that i suspect that is related to garbage collection system. I start a session and make and continuos use of it, but sudently the session vars are reseted, the time when this ocurs is variable, always after passing the time of

[PHP] Re: code for my question about sessions ;) sorry

2002-12-05 Thread 1LT John W. Holmes
[snip] function login($username) { global $valid_user; $valid_user = $username; session_register(valid_user); } It _should_ work. My only guess is that maybe because you're registering something inside of a function, it's messing up, even though the variable is global. I don't do it

Re: [PHP] Sesion Vars get reseted

2002-12-05 Thread 1LT John W. Holmes
filesystem or any other fs where atime tracking is not available. ---John Holmes... - Original Message - From: Miguel López Dinaweb Dpto. Programación [EMAIL PROTECTED] To: '1LT John W. Holmes' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, December 05, 2002 11:41 AM Subject: RE

Re: [PHP] Session and redirecting

2002-12-05 Thread 1LT John W. Holmes
I'm having some problems with sessions on this project I am doing for this one class. I know what I am doing with sessions on a certain level, as I use them with ASP and JSP apps. I notice that when I do session_start() the session SID or PHPSESSID doesnt appear until you refresh that page

Re: [PHP] Repeating Decimals

2002-12-05 Thread 1LT John W. Holmes
This is another PHP mathematical question. How can I display a bar over a number (overline) if it's a repeating decimal? When the user types in 1 by 3, they get 0.. I want it to display as 0.3 with the 3 overlined. How can I do this keeping in mind that not all numbers will be

Re: [PHP] Looping Addition

2002-12-05 Thread 1LT John W. Holmes
But then, if the user entered 5 - 6, it should be -1 but it'd return positive one... Is there another way? Come on, man... this is addition and subtraction. You can't figure it out? You simply need the absolute value of the difference. So taking Stephen's example below.. $total = 0;

Re: [PHP] Output of MySQl sorted query to text or Word file.

2002-12-06 Thread 1LT John W. Holmes
What do I need to use to create real linefeeds or new lines when viewing under windows? [snip] $newline = \n; Use \r\n for Windows. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] redirect URL

2002-12-06 Thread 1LT John W. Holmes
I don't can redirect my page to new url please help me Carlos Alberto Pinto Hurtado I posted the answer on my web page. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   5   6   >