RE: [PHP] Will return break loop?

2002-09-11 Thread SHEETS,JASON (Non-HP-Boise,ex1)
I tested this on PHP 4.2.3 and in my case return does break a while loop. Jason -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 3:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Will return break loop? Really quick question. Will return

RE: [PHP] Strore Data in File

2002-09-10 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Example (not tested) $fp = fopen('file.csv', 'r'); // open file for reading while ($data = fgetcsv ($fp, 1000, ,)) { // read each line of file if ($data[1] == $key) { // determine if key matches the current row $name = $data[1]; // assign information to variables

RE: [PHP] Re: sessions: what to do when browser won't accept cookies?

2002-08-16 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Good idea but remember some people turn off javascript and cookies :) Make your site as accessible as you can, using Jerry's suggestion is a good idea and then accept some people will be bent on not being able to use your site by disabling as much functionality in their browsers as they can or

RE: [PHP] include opens source, but it shouldn't

2002-08-15 Thread SHEETS,JASON (Non-HP-Boise,ex1)
It will probably behave the same way include does, which is correct behavior. $file=include(whatever) is telling php to store the result from include in the $file variable, not storing a command in it. You could do $file='include()', and then you would wind up with a variable with whatever text

RE: [PHP] How program automatic 'filler forms' robots?

2002-05-15 Thread SHEETS,JASON (Non-HP-Boise,ex1)
You need to tell PHP to input the value and you should be using 's example: input type=text name=driver length=20 value=?php echo $_GET['driver']; ? This example assumes you are using at least PHP 4.1, also you may use $_REQUEST instead of $_GET if you are going to be using both GET and POST

RE: [PHP] Yahoo/Cobalt servers/PHP

2002-05-13 Thread SHEETS,JASON (Non-HP-Boise,ex1)
It is not necessary for MySQL Server to run on the same server as your web server, if the client is compiled you can connect to any MySQL server even if it is not on the local machine. Many hosts run seperate database servers on their LAN that you can connect to from your host, or they may have

RE: RE: [PHP] Genus who came up with Self Destruct Code Copy Pro tection

2002-05-13 Thread SHEETS,JASON (Non-HP-Boise,ex1)
I've watched this thread now I'll comment because it applies to many other things. Yes even if you take some steps to protect your code it may still be distributed, but it WILL be distributed if you don't. Think about security, as a sysadmin I can't just not apply security updates, you apply

RE: [PHP] passing PhP parameter to JavaScript function

2002-05-02 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Prior to submittal the PHP variable $maxa has no value. PHP is a server side language, not a client side language. If you want to use the value of a form in javascript use the javascript objects to access the value of the field. Jason -Original Message- From: ZILBER,LEONID

RE: [PHP] apps that need register globals 'on' and others require 'off' on same server

2002-04-30 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Chapter 3 in the PHP manual covers setting PHP configuration directives via the .htaccess file. I use this to enable register globals where needed so that I can keep it off for the scripts that do not depend on them. Jason -Original Message- From: Jeff Bearer [mailto:[EMAIL PROTECTED]]

RE: [PHP] Secure MySQL connections in PHP with 'stunnel'

2002-04-29 Thread SHEETS,JASON (Non-HP-Boise,ex1)
You may also look at SSH port forwarding, this allows you to create an encrypted tunnel between the two machines, then you connect to the local port, the data gets encrypted sent across the wire and decrypted at the destination. Look at -L in your ssh man or search google for ssh tunneling

RE: [PHP] create textfile if not existing?

2002-04-29 Thread SHEETS,JASON (Non-HP-Boise,ex1)
If I understand you properly this code will do what you want ?php // data to write to file $contents = 'your data goes here'; // filename base $filename = 'name'; $startnum = '1'; // get new filename until the filename does not exist while

RE: [PHP] Form validation

2002-04-25 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Take a look at www.hotscripts.com They probably have PHP form validiation and I know they have javascript form validation. Jason -Original Message- From: Tarjei Huse [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 1:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Form validation

RE: [PHP] PHP editor for windows

2002-04-22 Thread SHEETS,JASON (Non-HP-Boise,ex1)
I like ActiveState Komodo, it isn't free (I didn't find anything free that did what I needed) but they do have a non commericial license and a trial period. http://www.activestate.com. Jason -Original Message- From: Lauri Vain [mailto:[EMAIL PROTECTED]] Sent: Monday, April 22, 2002

RE: [PHP] function returning true or errors

2002-04-18 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Rather than using true and false you can use 1, 0 it saves key strokes, reduces script size, etc Also use ' instead of if you don't need it evaluated by PHP. if (custom_function) { print 'Custom Function succeeded!'; } else { print 'There was a problem!'; } One thing I've

RE: [PHP] form posting to a fake page

2002-04-17 Thread SHEETS,JASON (Non-HP-Boise,ex1)
I assume form works correctly if you go directly to your index page. You need to show us the html code for your form. Make sure your action= is set properly. If you are using PHP you need to show relevant code. Please be more specific about your domain, www.mydomain.com/mypage.html does not

RE: [PHP] Would this work? (mod_rewrite)

2002-04-17 Thread SHEETS,JASON (Non-HP-Boise,ex1)
You actually want RewriteEngine on RewriteBase / RewriteRule *$ index.php Jason -Original Message- From: [ rswfire ] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 4:20 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Would this work? (mod_rewrite) This

RE: [PHP] Would this work? (mod_rewrite)

2002-04-17 Thread SHEETS,JASON (Non-HP-Boise,ex1)
And I fall victim to my own stupidity/cache again. You actually want RewriteEngine on RewriteBase / RewriteRule ^$ index.php This works for me on my domain, you can check it out by going to http://demo.shadotechdesigns.com and http://bug.shadonet.com Jason -Original Message- From: [

RE: [PHP] Question

2002-04-08 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Rather than executing a system utility you can just use the built in PHP functions. gethostbyaddr() - resolves an IP address into a hostname gethostbyname() - resolves hostname into an IP address More information is available in the PHP manual, you can access it online at

RE: [PHP] counter for HIGH traffic site

2002-04-08 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Make sure you are locking the file if you do this, With a high amount of traffic text based counters don't usually work too well because you have to deal with contention, what if two users view a page at the same time, you will run into a corrupt or inaccurate number. If you do file locking do

RE: [PHP] configuration problem?

2002-04-04 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Have you tried using virtual() ? virtual() is an Apache-specific function which is equivalent to !--#include virtual...-- in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for

RE: [PHP] closing a security hole on user accounts possible? - confirming accounts - history function

2002-04-03 Thread SHEETS,JASON (Non-HP-Boise,ex1)
You could assign a randomly generated confirmation code to the link for example http://yoursitel.com/membershipconfirm.php?user=jsheetsconfirmid=1238D7adfd a Then when the user hits that link have membershipconfirm.php check the database, confirm the user and the confirmid, if it matches remove

RE: [PHP] register session

2002-04-03 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Make sure you have session_start() before any output is sent to the browser, also look for whitespace at the top of your file, sometimes a blank line or a space can cause this error. The reason you get this error is session_start() needs to add information to the headers but because they have

RE: [PHP] Database-Driven Web Site.

2002-03-29 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Hi Sean, I'd suggest looking at some of the PHP and database tutorials available, for the database you most likely would be interested in learning about MySQL, at least at first. There are a lot of good resources on the PHP website at http://www.php.net and good MySQL documentation available at

RE: [PHP] ping

2002-03-27 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Hi Chris, Have a look at http://www.hotscripts.com/PHP/Scripts_and_Programs/Networking_Tools/Ping/ There are 3 ping scripts there. Jason -Original Message- From: Chris Grigor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 8:48 AM To: Php-General-List (E-mail) Subject:

RE: [PHP] Please help

2002-03-26 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Hi Denis, You need to give some more information, what database are you using, how is your database table layed out? If you are using MySQL you need to use the mysql_ functions, you can find out more about these in the PHP manual. If you need some help getting started with PHP there are some

RE: [PHP] [Newman] Help Needed with a redir script.

2002-03-26 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Not sure on the 404 part, you might look at CURL. For the DNS part you could do if (!gethostbyname(server1.dydns.org)) { header (Location server2.dycns.org); } This function is in the PHP manual. Jason -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP] semi-OT: moving PWS to Apache on NT

2002-03-25 Thread SHEETS,JASON (Non-HP-Boise,ex1)
I'm currently running the SAPI module for apache on Windows NT and 2000, works fine. You can configure apache to only bind to the 127.0.0.1 IP address, this will prevent requests being served over the network. Jason -Original Message- From: Steve Clay [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP] calculation based on checkbox

2002-03-22 Thread SHEETS,JASON (Non-HP-Boise,ex1)
If your checkbox name was cbox setup as input type=checkbox name=cbox value=true you could check for it like this ?php // if you have PHP 4.1+ use this code if ($_REQUEST['cbox'] == 'true') { // do code } ? You could also just check to make sure that the box variable is set rather than

RE: [PHP] sessions not so secure..solution?

2002-03-19 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Looking through the php.ini file brought me to the following setting: ; Check HTTP Referer to invalidate externally stored URLs containing ids. ;session.referer_check I looked in the manual and found this explanation: session.referer_check contains the substring you want to check each HTTP

RE: [PHP] require() vs include()

2002-03-14 Thread SHEETS,JASON (Non-HP-Boise,ex1)
They are much the same, both include a file. To quote the PHP manual require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error. In other words, don't hesitate to use require() if you want a missing

RE: [PHP] Re: setcookie problem: Cannot add header information - headers already sent by

2002-03-13 Thread SHEETS,JASON (Non-HP-Boise,ex1)
You can't send use setcookie after headers have been sent to the browser, you can have white space in a php block because this is not sent to the browser. The exception is if you have output buffering enabled. Jason From: qartis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 5:14

RE: [PHP] How many files can be in one directory?

2002-02-26 Thread SHEETS,JASON (Non-HP-Boise,ex1)
On a Unix or Unix-like operating systems you should be able to do a df -i to get a report on how many inodes are being used and the number remaining. The output differs slightly from os to os but the base information should be there. Example output from FreeBSD 4.5 follows Filesystem 1K-blocks

RE: [PHP] Help with showing tables in DB

2002-02-26 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Hi Ron, Look at the mysql_list_tables function, it looks like it will provide what you are are looking for. http://www.php.net/manual/en/function.mysql-list-tables.php is the link to the manual Jason -Original Message- From: Ron Clark [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

RE: [PHP] Miliseconds with PHP4

2002-02-22 Thread SHEETS,JASON (Non-HP-Boise,ex1)
I was looking for the same type of information a few weeks ago, I eventually found what I was looking for in the phpbb system. Here is the code that they used. //put right after your first opening PHP tag $mtime = microtime(); // page creation timers $mtime = explode( ,$mtime);

FW: [PHP] PHP_SELF Undefined

2002-02-18 Thread SHEETS,JASON (Non-HP-Boise,ex1)
You probably do not have register globals set to on, this is often times set to off for security purposes. Instead you can use $_GET, $_POST, $SERVEr, etc, these are documented on the PHP website. Also instead of echoing all that HTML from PHP you should consider jumping out of PHP and then use

RE: [PHP] problem with working with dates

2002-02-15 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Change it to == 1 if($current_month == 1) Jason -Original Message- From: Jacob Walker [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:44 AM To: [EMAIL PROTECTED] Subject: [PHP] problem with working with dates I'm sorry to bother the newsgroup with this, but I've been