Fw: [PHP] uh, oh errors?

2002-05-16 Thread Kevin Stone
Don't feel bad about this. This is something that messes a lot of people up. The browser knows where your headers end and where content begins by adding blank line between the headers and the rest of the page. ALL headers must come before any content is printed to the page. PHP will give you

Re: [PHP] uh, oh errors?

2002-05-16 Thread Kevin Stone
. - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: PHP-general [EMAIL PROTECTED] Sent: Thursday, May 16, 2002 11:23 AM Subject: Fw: [PHP] uh, oh errors? Don't feel bad about this. This is something that messes a lot of people up. The browser knows where your headers end and where

Re: [PHP] Making Multiple Pages

2002-05-16 Thread Kevin Stone
$query = SELECT * FROM mytable LIMIT $i, 20; Where 20 is the number of rows to retrieve and $i is the starting row. By incrementing $i + 20 you can do next, prev buttons, or parse the total number of rows into page links (prev - 1, 2, 3, 4, 5, 6.. 10.. 20 - next). Search www.mysql.com for more

Re: [PHP] Making Multiple Pages

2002-05-16 Thread Kevin Stone
. -Kevin - Original Message - From: Jason Soza [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, May 16, 2002 1:15 PM Subject: Re: [PHP] Making Multiple Pages Great! I think that's the SQL function I needed. Now for the PHP part - I'm a bit fo

Re: [PHP] refreshing PHP on onClick

2002-05-16 Thread Kevin Stone
I'm not certain I understand your situation. If you're trying to keep state between each new input then I would recommend PHP sessions to store your variables. Could you elaborate more what you're trying to do? -Kevin - Original Message - From: Leotta, Natalie (NCI/IMS) [EMAIL

Re: [PHP] BUG?: for loop using chars

2002-05-16 Thread Kevin Stone
No, no bug. I believe you would end up with something like that if the for loop is evaluating the letters numerically (either as ASCII values or some other value). The examples below would be the proper way of printing a range of letters... $letters = range('a', 'z'); for ($i=0;

Re: [PHP] fopen failing to connect

2002-05-15 Thread Kevin Stone
Jennifer, works just fine here.. - $fp = fopen(http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfe ed,r); if ($fp !== FALSE) echo The file exists!; else echo The file does not exist; - This prints The file exists! so it may be something else in your

Re: [PHP] Destroying a session!!!

2002-05-14 Thread Kevin Stone
The cookie that stores the session id will live until the browser window is closed. You can apply a different lifetime to the cookie by using session_set_cookie_params() but I doubt that'll do what you want. Just use the session_id() function to change the session id manually when you register

Re: [PHP] Destroying a session!!!

2002-05-14 Thread Kevin Stone
- From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 14, 2002 1:43 PM Subject: Re: [PHP] Destroying a session!!! The cookie that stores the session id will live until the browser window is closed. You can apply a different lifetime to the cookie by using

Fw: [PHP] session problems...

2002-05-13 Thread Kevin Stone
Manual = http://www.php.net/manual/en/ref.session.php The function session_start(); must be executed prior to any headers sent on any script you wish to call the session variables into. Typically you would simply put session_start(); as the first line of each page. So..

Re: [PHP] eregi(mail)

2002-05-10 Thread Kevin Stone
it was useful in some tiny miniscule sort of way. :) -- Kevin Stone [EMAIL PROTECTED] - Original Message - From: Analysis Solutions [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 10:59 AM Subject: Re: [PHP] eregi(mail) Hi Liam: On Fri, May 10, 2002 at 09

Re: [PHP] eregi(mail)

2002-05-10 Thread Kevin Stone
format is irrelevant. -Kevin - Original Message - From: Miguel Cruz [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED] Cc: PHP-general [EMAIL PROTECTED] Sent: Friday, May 10, 2002 12:30 PM Subject: Re: [PHP] eregi(mail) On Fri, 10 May 2002, Kevin Stone wrote: I had always been suspicious

Re: [PHP] Re: how to send spaces in the url

2002-05-09 Thread Kevin Stone
LOL! A standard!? In Javascript!? You must be joking. :-) Nope. But it's not difficult. You simply have to access the url string with 'document.location.href', parse out the values individually and replace the space placeholders. Can't remember what the exact javascript function would be..

Re: [PHP] register_globals in php4

2002-05-09 Thread Kevin Stone
- Original Message - From: Miguel Cruz [EMAIL PROTECTED] To: Patrick Hsieh [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 11:52 AM Subject: Re: [PHP] register_globals in php4 On Fri, 10 May 2002, Patrick Hsieh wrote: php4.1 recommends to set register_globals=off

Re: [PHP] pass. vars. betn. javascript and php

2002-05-06 Thread Kevin Stone
Unless you're doing HTML as a halfway between Javascript and PHP, you cannot do a POST method (obviously). But you can always pass values in the URL string. Access the URL string in Javascript with document.location.search. Access the URL string in PHP with $HTTP_GET_VARS or $_GET. You can

Re: [PHP] Grabbing ALL $_POST var at once.

2002-05-06 Thread Kevin Stone
Do you simply need to view all of the values passed through the form? In that case try something like.. foreach ($_POST as $name = $value) { echo $name. : .$value.br; } -Kevin - Original Message - From: David J Jackson [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED] Cc:

Re: [PHP] phpMyAdmin

2002-05-03 Thread Kevin Stone
Could be something like.. Field: keynum Type: BIGINT Length/Values: (blank) Attributes: (blank) Null: NOT NULL Default: (blank) Extra: AUTO_INCREMENT Primary: CHECKED Index: CHECKED Unique: CHECKED Field: username Type: VARCHAR Length/Values: 20 Attributes: (blank) Null: NOT NULL Default:

Re: [PHP] mssql_prev_result()???

2002-05-03 Thread Kevin Stone
You can navigate through records with Next and Previous buttons by using LIMIT in your query statment. ? // index.php if (!isset($i))$i=0; // Retrieve 1 rows starting at row $i $query = SELECT * FROM mytable LIMIT $i,1; $result =

Re: [PHP] phpMyAdmin

2002-05-03 Thread Kevin Stone
: UNSIGNED Null: NOT NULL Default: (blank) Extra: AUTO_INCREMENT Primary: SELECTED Index: UN-SELECTED Unique: UN-SELECTED Mike Kevin Stone wrote: Could be something like.. Field: keynum Type: BIGINT Length/Values: (blank) Attributes: (blank) Null: NOT NULL Default

Re: [PHP] phpMyAdmin

2002-05-03 Thread Kevin Stone
It's difficult to know exactly what you need, Rodrigo. There is no simple answer to your question. You haven't posted any code so I'm assuming you're either new to PHP, or coding in general. In either case I would highly recommend searching www.php.net. Read the documentation and examples.

Re: [PHP] I-worm/Klez and a GIF query/question

2002-05-03 Thread Kevin Stone
Then copy the GIFs into a PNG file and display that. Still using GIFs (cuz that's what the guy wants) but displaying PNG. - Original Message - From: Stuart Dallas [EMAIL PROTECTED] To: Maciej Uhlig [EMAIL PROTECTED]; r [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, May 03, 2002 2:01

Re: [PHP] passing vars. betn. php and javascript

2002-04-26 Thread Kevin Stone
This sounds susspiciously like a Javascript question to me. :) I wrote a PHP/Javascript system a while back that prints out an event calendar on a client page. The Javascript is copypaste so you can have the calendar show up on any web page anywhere in the world. It works like this.. The

Re: [PHP] good php editor for the mac

2002-04-26 Thread Kevin Stone
I'm told, BBEdit for MacOSX is solid, although I haven't used it. I used to work in BBEdit on OS9. It was the best PERL editors I've ever used. The Mac's seamless integration with the interpretor is something that I really miss. But at the time the Mac did not support PHP so I was forced to

Re: [PHP] passing vars. betn. php and javascript

2002-04-26 Thread Kevin Stone
Okay I'm beginning to understand. I don't think you have to use Javascript in this situation you jsut have to be a little clever about how you build your URL string. You can send an array through the URL by splitting up each value like this.. $url =

Re: [PHP] Question on the ~= Operator ...

2002-04-26 Thread Kevin Stone
Bitwise NOT ~$a; Bits set in $a are not set in the result, and vice versa. -Kevin - Original Message - From: Red Wingate [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 26, 2002 3:51 PM Subject: [PHP] Question on the ~= Operator ... Hi there, I actually wanna know if

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Kevin Stone
Just looking at the manual here and it explains quite specifically that array_search() is meant to be used with associative arrays, not indexed arrays. I think the best way to do what you want is to do is to set up a loop and test each index against eregi(); If true then you know your index.

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Kevin Stone
the associative array array_search() returns 'foo' and using the indexed array it returns '2'. So it works with both array types and does not require an array starting at index 1. Live and learn. :) -Kevin - Original Message - From: Ford, Mike [LSS] [EMAIL PROTECTED] To: 'Kevin Stone' [EMAIL

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Kevin Stone
Well this seems to work for me just fine. ? $fruit = array('apple','banana','cranberry'); $findme = array('banana', 'cranberry', 'apple'); for ($i=0; $icount($findme); $i++) { $result = array_search($findme[$i], $fruit); if ($result !== false) { print Key ($result) was found for value

Re: [PHP] using html select as array

2002-04-25 Thread Kevin Stone
You can't know the input type through PHP. You could use Javascript to determine the input type and pass that along with the array. However it may be easier just to store the text field as a separate variable, and knowing this, parse it into your languages array after both inputs have been

Re: [PHP] Array function to delete

2002-04-25 Thread Kevin Stone
About all I would suggest is that you eliminate the unecessary function calls substr and explode to optimize your code. I doubt prebuilt PHP functions will help you here. This is perfectly valid method for deleting elements in an array and it's about as fast as you're ever going to get. :) ?

Re: [PHP] passing array as hidden field

2002-04-24 Thread Kevin Stone
Concept is solid, method is wrong. Understand that name=layer[] is but one index in the array. To produce an array with multiple indicies you must create a separate input for each value. Example.. foreach ($layer as $lay) { echo input type='hidden' name='layer[]' value=$lay;

Re: [PHP] bulletin board algorithm in php - how to write one?

2002-04-24 Thread Kevin Stone
Plain english eh? Oookay... :) Well it's pretty obvious you'll want to store the data somehow. I'd recommend using a MySQL database. For a simple forum script you'll want to have two tables in your database. A Thread table and a Post table. The Thread table will store (threadid, username,

Re: [PHP] What's wrong with the PHPSESSID?????

2002-04-23 Thread Kevin Stone
If what you say is true then clearly the variables are being parsed correctly. And you say that it is working on other pages. So it is unlikely that the error has anything to do with PHP its self. My guess is that you have some sort of syntax error on that one page. -Kevin - Original

Fw: [PHP] upload a file from a pc

2002-04-23 Thread Kevin Stone
Nope it's a bit more involved than a simple command. The easiest way would be to download a script from PHPBUILDER.COM or ZEND.COM. Many free scripts available and easy to install. Of course if you want to learn how to do this start in the php manual at PHP.NET. Good luck, Kevin -

Re: [PHP] header redirection

2002-04-19 Thread Kevin Stone
Headers will be created whenever information is outuputted to the browser. In this case when you include the .html file into your php script the browser is going to create all the headers it will ever know for that page. Obviously this does you no good if you want to add headers later. Ways

Fw: [PHP] Re: Using one submit button

2002-04-17 Thread Kevin Stone
- I picked up your question soon after you submited it then my internet went down so I wasn't able to send it. Looks like it's been answered by someone else since then but here you go anyway. I didn't want to feel as though I'd wasted my time. :D -kevin - Looks like

Re: [PHP] Re: Using one submit button

2002-04-17 Thread Kevin Stone
=2CENTERinput=\hidden\ name=\id[$i]\ value=\$id\input type=\text\ value=\\ name=\price[$i]\ size='8' MAXLENGTH='8'BR/a/CENTER/font/TD; Jennifer Kevin Stone [EMAIL PROTECTED] wrote in message 004301c1e633$e1e20090$6601a8c0@kevin">news:004301c1e633$e1e20090$6601a8c0@kevin... - I p

Re: [PHP] Problem grabbing value of session

2002-04-16 Thread Kevin Stone
I think the problem is one of scope.. though I have never tried starting a session inside a function so I really don't know how it operates. But if you do something like.. // function is_valid($user, $privs) { // validate user.. if ($valid) {return TRUE;} } if

Re: [PHP] How to sort by 3rd row in an 2d-Array

2002-04-12 Thread Kevin Stone
This is a terribly inneficient way of handling your situation but I believe it would work. // First we're going to make a list of all company values for($i=0; $icount($myarray); $i++) { $company_values[] = $myarray[$i][company]; } // Then we're going to order the array using a standard

[PHP] Manipulate the address field in the browser?

2002-04-09 Thread Kevin Stone
Here's a crazy question. Say I have a script (such as a bulliten board script) that is run by many clients (other websites) off of one location on my web account. Think of it as a service of some kind. Is there anyway to trick the browser into displaying the client's domain rather than my

Re: [PHP] Manipulate the address field in the browser?

2002-04-09 Thread Kevin Stone
: Maxim Maletsky [EMAIL PROTECTED] To: 'Kevin Stone' [EMAIL PROTECTED]; 'PHP-general' [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 3:55 PM Subject: RE: [PHP] Manipulate the address field in the browser? Use include(). Except, for the fact that, this will be: include(http://www.yourBB.com

RE: [PHP] Assigning unique form names...

2002-04-08 Thread Kevin Stone
Try select name=files[] The square brackets will allow you to capture selections from multiple lists in an indexed array, $files. Hope that does what you need. -Kevin The square brackets will allow you to capture the variable $file_name -Original Message- From: Jas [mailto:[EMAIL

Re: [PHP] Assigning unique form names...

2002-04-08 Thread Kevin Stone
I thought I'd already answered this question but maybe you missed it. No you cannot create an array based on 12 forms. But you CAN create an array based on 12 form inputs. For example.. form method=post action=script.php select name=files[] option value=image1.jpgimage1.jpg/option option

Re: [PHP] HELP! Errors!

2002-04-08 Thread Kevin Stone
Bad file descriptor = invliad pointer = your file doesn't exist. - Original Message - From: Georgie Casey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 08, 2002 1:27 PM Subject: [PHP] HELP! Errors! my host returns this err message when i try to open a page on another

Re: [PHP] Image Question

2002-04-08 Thread Kevin Stone
Could it be you're unwittingly converting the graphic into 8bit color? That's certainly what it looks like. I've read that older versions of PHP and GD library don't always translate color depth. I don't have much experience programming graphics in PHP but I thought I'd offer up this

RE: [PHP] PHP books

2002-04-05 Thread Kevin Stone
Ditto on that one Adam. PHP And MySQL Web Development comes highly recommended. Big book lots of content. Real world working examples. Very well written. You will break the binding on this book I guarantee it. ;) -Kevin -Original Message- From: Adam Alkins [mailto:[EMAIL PROTECTED]]

RE: [PHP] PHP Clock

2002-04-05 Thread Kevin Stone
If you want a real time clock you're going to have to do it in Javascript. If you just want the page to display the current time/date then look up the date() function on php.net -Original Message- From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:53 PM

RE: [PHP] configuration problem?

2002-04-04 Thread Kevin Stone
I believe include() will only work if the CGI script is written in PHP. You should be able to extract the results of a foreign script by running passthru() or system(). For example if I wanted to print out a listing of all the files in a directory. ? // Command to print out my public html

RE: [PHP] configuration problem?

2002-04-04 Thread Kevin Stone
-Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 12:53 PM To: Kevin Stone; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? thanks for the response. i have no problem executing a simple perl script using passthru() or system

RE: [PHP] PHP FAQ (again)

2002-04-03 Thread Kevin Stone
I wholeheartedly disagree. I belong to an emailing list that requires specific headers and it is a pain. It costs me nothing to ignore a post. But it costs me 5 minutes to format my headers correctly. You really want to reduce frivolous posts on this list? Do as I said before. Send an

RE: [PHP] A Calendar type thingy

2002-03-29 Thread Kevin Stone
Perhaps simply store a standard English date as the index for a single table (ie. 032902 or 03/29/02) along with a `time` and `comments` field. Use PHP's extensive library of built-in date/time functions to translate the date to timestamp and vice versa. --- CREATE TABLE

RE: [PHP] Can you find the parse error?

2002-03-29 Thread Kevin Stone
I have found it safer to use backticks on all of my table and field names. I doubt that's the problem but it's a good practice and something to try anyway. INSERT INTO `tblUserInfo` (`UserID`, `Complex`, `Contact`,.. etc.. By the way what are those complicated looking '.$var.' for? You should

RE: [PHP] Loading Images

2002-03-28 Thread Kevin Stone
, which (for me) prevents me from selecting text + images from below. Although I don't know how reliable this is. Justin French - http://indent.com.au http://soundpimps.com - on 27/03/02 10:16 AM, Kevin Stone ([EMAIL PROTECTED]) wrote: It is quite

[PHP] Help sending a Plain Text email Attatchment

2002-03-28 Thread Kevin Stone
will be greatly appreciated. -- Kevin Stone [EMAIL PROTECTED] //-- - // Generate a boundary string $semi_rand = md5(time()); $mime_boundary = ==Multipart_Boundary_x{$semi_rand}x

RE: [PHP] best way to read a file

2002-03-28 Thread Kevin Stone
Actually if you have output buffering active then the easiest hassle free way to read a file into a variable is like this.. ? ob_start(); readfile($url, 1); $file = ob_get_contents(); ob_end_clean(); echo $file; ? Pretty cool eh? Hope that helps. -- Kevin Stone [EMAIL PROTECTED

RE: [PHP] Loading Images

2002-03-26 Thread Kevin Stone
It is quite easy to store images in a database and display them on the screen. You can find tutorials about this online (sorry I don't have any direct links). There are also numerous FREE scripts pre-written that you can integrate into your site, or use to learn how to do this yourself. There

[PHP] mail() function returns TRUE but no email is sent

2002-03-25 Thread Kevin Stone
Anyone run into this problem before? I've got a simple email parser that I've set up for our clients to access from their websites. It just uses the simple mail() function to send the parsed HTML to their account. The mail() function is returning TRUE but the email no email is being received.

RE: [PHP] Weird error...

2002-03-22 Thread Kevin Stone
I notice you're incrementing the row offset. You shouldn't use mysql_result() to extract multiple fields like that. It will be much faster using mysql_fetch_array() once and then extracting any data you need from the resulting associative array as many times as you need. Mysql_result() is

RE: [PHP] Weird error...

2002-03-22 Thread Kevin Stone
DOH!!! I didn't mean to email the first part of my response below. I wrote it and then realized that I was mistaken. I thought I'd erased it. It is perfectly valid to do what you want with mysql_result(); :) -Kevin -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED

RE: [PHP] FAQ

2002-03-22 Thread Kevin Stone
Too often novices are expected to know how to find this information by mental telepathy because they either don't know the keywords to search for or don't realize that certain common resources exist. If the list administrators would simply compile a short email containing FAQ and RESOURCE links

RE: [PHP] PHP/mySQL hosting

2002-03-21 Thread Kevin Stone
Pickings are slim but you can have a look here: http://www.alt-php-faq.org/links.html See hosting. Good luck. -Kevin -Original Message- From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 12:17 PM To: PHP Subject: [PHP] PHP/mySQL hosting Does anyone

RE: [PHP] echo and Session Variables

2002-03-21 Thread Kevin Stone
The single quotes in $_SESSION['myvar'] are not necessary. You're reading an associative array in which a string is acting as a pointer to the index. Example.. $myarray = array ('myvar' = 'myvalue'); echo $myarray[myvar]; // prints out 'myvalue' -Kevin -Original Message- From: David

RE: [PHP] Calling a javascript function?

2002-03-21 Thread Kevin Stone
We recently went into lengthy discussion about this. No there is no a way to call a Javascript function from PHP. But you CAN send a Javascript the input it needs to decide which function to use. You can either have the PHP script generate the Javascript dynamically. Or if you need to run a

RE: [PHP] Re: Calling a javascript function?

2002-03-21 Thread Kevin Stone
In this case you're talking about building the Javascript dynamically. Example.. --- html head script language=javascript function echoPHPOut(out) { document.write(out); } /script /head ?php $true = true; if ($true) { $out = 'blah blah';

RE: [PHP] Calling Javascript-function from php-script ...

2002-03-20 Thread Kevin Stone
script. -Kevin -Original Message- From: Alexander Skwar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 4:27 PM To: Kevin Stone Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Calling Javascript-function from php-script ... »Kevin Stone« sagte am 2002-03-19 um 14:11:42 -0700 : Not entirely

RE: [PHP] Calling Javascript-function from php-script ...

2002-03-20 Thread Kevin Stone
scripts, because we could be talking about any two interpreted languages). *phew* Are we done yet? I really need to get back to work. LOL :D -Kevin -Original Message- From: Andrew Lopucki [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 10:51 AM To: Kevin Stone; [EMAIL PROTECTED

RE: [PHP] Multipage form

2002-03-20 Thread Kevin Stone
I find sessions to be the best solution in these situations. I like to compile the problem into a single multi-dimensional array of pages and form inputs such as.. $forms = array ( 'contact' = array ($company, $name, $email, $addr, $phone), 'creditcard' = array ($full_name, $num, $type,

RE: [PHP] Sessions

2002-03-20 Thread Kevin Stone
on line 10? Curious, you don't even have 10 lines there. Do you have lines above the PHP tag ?. The ? Must start the first character on the first line of the page otherwise the browser will interpret it as either Content-type: text/plain or Content-type: text/html and give you a headers

RE: [PHP] Fwd: html form select list selected

2002-03-20 Thread Kevin Stone
The contents of $display are a string so you must have quotes aroud it in the comparison statement. if ($display == 'false') // should work. Alternatively you could do. select name=display option value=0True option value=1False /select Now the contents of $display is an integer which will can

RE: [PHP] something weird is going on...

2002-03-20 Thread Kevin Stone
Could be a browser cache issue. Open just the image in the browser (http://kulchitski.com/problem/images/bottomcell_bg.gif) and hit Ctrl+Refresh. Go back to the page and see if it doesn't show up. Attractive looking page by the way. :) -Kevin -Original Message- From: Vlad Kulchitski

RE: [PHP] [Newman] updating a mysql record if IP # is the same.

2002-03-20 Thread Kevin Stone
A number of problems. First and foremost you're extracting multiple rows from the database table are you not? Therefore you must increment through them in some way. I like to embed my mysql_fetch_xxx() functions in a while() loop. --- while ($row =

RE: [PHP] Assignment operator proposal

2002-03-20 Thread Kevin Stone
There seems to be a parse error in your code. The words Python and enthusiast can not exist together in the same substr. This will result in the LMAO error you've been receiving. :) -Kevin -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20,

RE: [PHP] Calling Javascript-function from php-script ...

2002-03-19 Thread Kevin Stone
Not entirely true. Javascript is directly linked to HTML and HTML is directly linked to PHP so you can have PHP talk to Javascript through HTML. So here's a very simple example of a Javascript and PHP script (on separate servers) talking to one other...

[PHP] Return the column names of MySQL table?

2002-03-19 Thread Kevin Stone
Forgive me for the off topic question. This is a MySQL question.. has nothing to do with PHP directly. However I was not able to find an answer in the MySQL documentation, on Usenet, or the MySQL mailing list archives. Also MySQL.com's mail manager is on the fritz so I can't even subscribe to

RE: [PHP] Re: Return the column names of MySQL table?

2002-03-19 Thread Kevin Stone
data to increment through. The function returns this and only this. Am I using it wrong? Thanks, Kevin -Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 4:02 PM To: Geoff Hankerson Cc: Kevin Stone; [EMAIL PROTECTED] Subject: [PHP] Re

RE: [PHP] Mac Classic and PHP...

2002-03-18 Thread Kevin Stone
Unfortunately PHP was never developed for MacOS 9 so there is no option there. The only option is to switch to MacOSX (which I highly recommend) or migrate to XP (which is a mess but works). -Kevin -Original Message- From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]] Sent: Monday, March

[PHP] Increment a value in a MySQL database with one query?

2002-03-16 Thread Kevin Stone
Is there a MySQL function that I can use to increment the integer value of a row entry with one query? Here's the combined PHP and SQL in psuedo code form... UPDATE mytable SET myval++ Something like that. So I dont have to pull the value from the database, increment it, then post it back to

RE: [PHP] Execute php script inside an HTML page???

2002-03-12 Thread Kevin Stone
If you only have a web account you can download the .htaccess file from your home directory and add the following lines. Whether this will work or not may depend on your host. AddType application/x-httpd-php .html AddType application/x-httpd-php .htm -Original Message- From: Lic.

[PHP] Auto POST with redirect?

2002-03-12 Thread Kevin Stone
What I'm trying to do is create a multi-user information gathering system similar to Moreover.com's news gathering system (just much simpler and not as dynamic). A JavaScript auto submits to a remote PHP script. The PHP script grabs the info from the database then generates its own JavaScript

RE: [PHP] using ahref tag in $msg variable

2002-03-11 Thread Kevin Stone
If you want to use HTML tags in your email you can add to $mailheaders .= Content-type: text/html\n; -Kevin -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 12:46 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] using ahref tag in $msg variable On

RE: [PHP] Re: User accounts

2002-03-07 Thread Kevin Stone
I understand your confusion. The thing is that empty() and ! are two completely different arguments. if(empty($var)) is looking for: $var = ''; if(!$var) is looking for: $var = false; or $var = 0; If $var is set to anything other than 0 or false then the ASCII value of the string is (by

RE: [PHP] Verify script location...

2002-03-05 Thread Kevin Stone
It's not possible to include() a remote file so there may be little point to this. However maybe you want to keep users on your system from including the file in their scripts. In that case I suppose you could set $PHP_SELF (of the main script) to a temporary variable for checking in the

RE: [PHP] Form element names as array

2002-03-04 Thread Kevin Stone
One suggestion may be to use two radio buttons in place of one check box so the true and false values are sent regardless of which is chosen. -Kevin -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 3:28 PM To: 'Chris Boget'; PHP General

Re: [PHP] case insenstive

2002-03-04 Thread Kevin Stone
Use strtolower() or strtoupper() to change the case of a string. And yes doing the same thing twice in the same statement is overkill! :) if((substr(strtolower($author), 0, 1) == a) || (substr(strtolower($author), 0, 1) == a)){} - Original Message - From: jtjohnston [EMAIL PROTECTED]

RE: [PHP] passing array of variables in a query string

2002-03-01 Thread Kevin Stone
To form an array of values in the GET string append brackets to the end of each variable name... http://www.archipro.com/test.php?state[]=ABstate[]=BC for($i=0; $icount($state); $i++) { echo $state . br; } Result: AB BC Hope this helps. :) -Kevin -Original Message- From:

RE: [PHP] REG_ECTYPE warning and eregi??

2002-02-27 Thread Kevin Stone
I didn't get a REG_ECTYPE warning but I did get a REG_PAREN type warning. The curly bracket '}' near the '$' should be an close parentheses ')'. :) -Kevin -Original Message- From: Pax [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:33 PM To: [EMAIL PROTECTED]

RE: [PHP] Prepending string to TOP of files?

2002-02-26 Thread Kevin Stone
I don't think there is a way to do it automatically. Just read the file into a variable, prepend the new line string, and rewrite the file. -Original Message- From: Nick Richardson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 3:41 PM To: PHP General Subject: [PHP]

[PHP] Search Engine risk using $HTTP_HOST?

2002-02-26 Thread Kevin Stone
/index.html)} ? Just making sure! :-) Thanks, Kevin Stone [EMAIL PROTECTED]

RE: [PHP] Using sessions

2002-02-25 Thread Kevin Stone
Just a guess but would using session_register(myvar); instead of registering directly to the global list make any difference? -Original Message- From: Joel Alexandre [mailto:[EMAIL PROTECTED]] Sent: Monday, February 25, 2002 9:39 AM To: Lista de PHP Subject: [PHP] Using sessions i'm

RE: [PHP] PRE-formated text into DATABASE

2002-02-22 Thread Kevin Stone
The function, nl2br() swaps end-line characters for HTML br tags. This is usually adequate for this situation. Though the default end-line character (\n or \r) can differ between operating systems, I have yet to experience a major problem. -Kevin -Original Message- From: Dani

RE: [PHP] Creating a global variable for all PHP pages?

2002-02-21 Thread Kevin Stone
I don't know why you would need to do this in the PHP installation. I just create a globals.php file (call it what you like) that contains all of my multi-script variables. Then I include the file into each script as needed. The file contains CSS pointers, database functions, and anything else

RE: [PHP] question

2002-02-20 Thread Kevin Stone
I'm not sure from your question whether or you understand that the PHP printer functions only work with printers connected directly to the server. They're not for client side printing. And there are no equivalent functions for non-Windows platforms. However I do recall coming across a

RE: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-15 Thread Kevin Stone
Thanks for proving the point. It's like I said. No one is willing to explain what symbolic links are. -Kevin -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 8:41 AM To: Kevin Stone Subject: Re: [PHP] Anyway to open a PHP file

[PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Kevin Stone
. This is obviously rare question because I can't find any references on this list or on Usenet. Is there a trick to this? Or is it simply not possible. Much Thanks, Kevin Stone [EMAIL PROTECTED]

RE: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Kevin Stone
Message- From: SHEETS,JASON (Non-HP-Boise,ex1) [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 1:38 PM To: 'Kevin Stone' Subject: RE: [PHP] Anyway to open a PHP file and view its code in the browser? Rename the file you want to display as PHP code to .phps (php source

RE: [PHP] Anyway to open a PHP file and view its code in thebrowser?

2002-02-14 Thread Kevin Stone
/textarea; ? -- This works.. pa href=peekaboo.php?script=myscript.phpView Source for Myscript.php/a This doesn't work.. pa href=peekaboo.php?script=http://www.mydomain/myscript.php;View Source for Myscript.php/a Thanks for your help. It's always the little things that'll get ya. :) -- Kevin Stone

RE: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Kevin Stone
[EMAIL PROTECTED] then do a symbolic link On Thursday 14 February 2002 22:34, Kevin Stone wrote: I'm glad you posted this. It's great to know. Unfortunately it's not what I need to do. I'm uploading and updating my scripts all the time. So I need to offer code views of *active* scripts

RE: [PHP] PHP not parsed in HTML

2002-02-12 Thread Kevin Stone
solution or one specific to their servers. But it works well and is search engine friendly. I don't see any degradation in speed as a result of it. -- Kevin Stone [EMAIL PROTECTED] www.helpelf.com -Original Message- From: SpyProductions Support Team [mailto:[EMAIL PROTECTED]] Sent: Tuesday

[PHP] Limiting use on public scripts.

2002-02-12 Thread Kevin Stone
, links, tutorials, books.. any information will be appreciated. Thanks! -- Kevin Stone [EMAIL PROTECTED] www.helpelf.com http://www.helpelf.com/

RE: [PHP] Formatting a MYSQL time

2002-02-07 Thread Kevin Stone
= mktime($hour, $min, $sec, $month, $day, $year); Hope this helps some. -- Kevin Stone [EMAIL PROTECTED] www.helpelf.com -Original Message- From: Frank Miller [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 10:21 AM To: [EMAIL PROTECTED] Subject: [PHP] Formatting a MYSQL time

<    1   2   3   4   5   6   >