Fw: [PHP] Implement PHP within a string

2002-07-25 Thread Kevin Stone
Sure. You want the eval() function. Can be a little tricky but you'll get it. http://www.php.net/manual/en/function.eval.php -Kevin - Original Message - From: Joshua E Minnie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 25, 2002 12:54 PM Subject: [PHP] Implement PHP

Re: [PHP] printing results from mysql fetch array

2002-07-25 Thread Kevin Stone
Well yah.. I mean you can move the array pointer by simply looping through the array 16 times. But why not simply take care of this in your SELECT statement? SELECT .. blah blah blah.. ORDER BY firstname DESC LIMIT 16, 1 Returns one row starting with the 16th row ordered by the firstname in

Re: [PHP] Help with msql_fetch_array()

2002-07-24 Thread Kevin Stone
Try using mysql_query(); instead of mysql_db_query(); The SQL query is the first parameter in this function. The second parameter is a pointer connecting to the mysql server. The pointer is generated by mysql_connect() and you'll also need to select the database with mysql_select_db(). But

Re: [PHP] Help with msql_fetch_array()

2002-07-24 Thread Kevin Stone
You beat me too the punch and I think you explained it better than me, but just one minor little thing to note. Where you said.. if ( $result = mysql_query($sql)) This is not a valid way to check if the query has returned anything. mysql_query() returns FALSE on error. So if there was no

Re: [PHP] Help with msql_fetch_array()

2002-07-24 Thread Kevin Stone
That should definitely be working. Only thing I can think of is that you're database name isn't correct. You're certain news is the full name of the database.. I mean it's not news_com or something like that? The $link must be valid becuase the script isn't ending with Couldn't make

Re: [PHP] parsing

2002-07-23 Thread Kevin Stone
I just benched it. If there is a difference in performance then it is too small to detect with microseconds. I'd say there's no need to parse the vars by hand unless the syntax requires it. -Kevin - Original Message - From: Dave at Sinewaves.net [EMAIL PROTECTED] To: PHPlist [EMAIL

Re: [PHP] Re: parsing

2002-07-23 Thread Kevin Stone
Lee, yes you're right. Using single quotes to denote a litteral string does speed things up a bit. My bench sped up by about .08 seconds over 10,000 echos. That's about 5 pages worth of text. Is .08 seconds worth worrying about? I'm gonna go out a limb here and say.. no. :) -Kevin -

Fw: [PHP] Getting the day if given a date

2002-07-23 Thread Kevin Stone
A combination of the strtotime() function and date() or getdate() functions should do what you want.. http://www.php.net/manual/en/function.strtotime.php -Kevin - Original Message - From: Cirkit Braker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 6:24 PM Subject:

Re: [PHP] Comma question

2002-07-22 Thread Kevin Stone
Curly braces {} are sometimes required for PHP to properly parse variables within quoted strings. Good example might be defining variable-variables within a quoted string ${$myvarvar}. However I do not believe that curly braces are required in this particular string. As for the comma I

Re: [PHP] Check for Associative Array

2002-07-18 Thread Kevin Stone
foreach ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { //... } Is this what you need? http://www.php.net/manual/en/function.mysql-fetch-array.php -Kevin - Original Message - From: Henning Sittler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 18, 2002 10:57 AM

Re: [PHP] Refreshing session variables

2002-07-18 Thread Kevin Stone
I think you're missing some fundamental concepts of sessions here. You must think of the session as a file that you're going to include into the script (becuase.. that's litteraly what it is). But instead of using include() you're going to use session_start(); ? session_start(); if

Fw: [PHP] Someone Help please

2002-07-17 Thread Kevin Stone
Parse all lines of a txt file into an array.. $ary = explode(\n, $results); -Kevin - Original Message - From: Chris Crane [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 17, 2002 11:16 AM Subject: [PHP] Someone Help please I am getting data froma website for stock

Re: [PHP] sorting and searching an Array

2002-07-17 Thread Kevin Stone
Instead of an indexed array build an associative array and sort with one of the built-in PHP functions.. $myary = array ( 'mrgouldian' = '[EMAIL PROTECTED]', 'myname'= '[EMAIL PROTECTED]'); ksort($myary); -Kevin - Original Message - From: [EMAIL PROTECTED] To: php-general [EMAIL

Fw: [PHP] Timer

2002-07-16 Thread Kevin Stone
Store a timestamp in a file. When the bot is activated retrieve the old timestamp and calculate the difference between then and how. Store that value in another file or database. Update the file with a fresh timestamp. -Kevin - Original Message - From: Thomas omega Henning [EMAIL

Re: [PHP] cleaning HTML TAGS (headed)

2002-07-15 Thread Kevin Stone
Sorry.. I screwed up my preg_match string. It should have $file as the second parameter and also included an 'i' after the closing delimeter for a case-insensitive search. preg_match('/title(.*)\/title/i', $file, $result); - Original Message - From: Kevin Stone [EMAIL PROTECTED

Re: [PHP] Online Document

2002-07-15 Thread Kevin Stone
I would recommend applying a simple templating system to the file. Anything that needs to be extracted out of the page for navigation purposes will be enclosed in special characters such as a chapter title.. [:chapter = CHAPTER 2: Beating a Dead Horse:]. A very simple script parses the file and

Re: [PHP] PHP codes and variables

2002-07-12 Thread Kevin Stone
Or use implode instead of join makes skips the step of extracting the index.. $file = implode ('', file (afile.html)); If you'll be sending more output than just one file then another favorite method is this.. ob_start(); readfile(file1.txt); readfile(file2.html); $output = ob_get_contents();

[PHP] How do I send files with HTTP socket post (PostToHost)

2002-07-12 Thread Kevin Stone
how to send files using fsocketopen() and POST method? Much thanks! Kevin Stone Helpelf, Inc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP codes and variables

2002-07-12 Thread Kevin Stone
that are defined in the page that's calling it. J. Alden Gillespy (DJ Rage) Broadcasting on Test Pattern Radio Shock Rock! Every Sunday 5-8pm edt (21-0 gmt) http://www.thetestpattern.com - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: PHP-general [EMAIL PROTECTED] Sent: Friday

Re: [PHP] Re: Table Making

2002-07-11 Thread Kevin Stone
Well I guess I'd better get my 2 cents in. :) There is a natural progression to HTML tables so why fight it? I think the cleanest way to do this would be to reorder the array instead of trying to come up with a clever way to build the table. Set the number of table rows you want then use

Re: [PHP] Re: Development Tools

2002-07-10 Thread Kevin Stone
Matt, you're little behind on the times. Most of the Homesite 5.0 editor has already been integrated into DreamweaverMX. They even have a Homesite mode which is what I use. :) There are many benefits to DreamweaverMX. The FTP functionality in is completely seamless and works very well.

Re: [PHP] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

2002-07-09 Thread Kevin Stone
You don't have to live with this. If you're running outlook/outlook express select one of erik's emails.. go to Message-Block Sender. It'll delete every file he has sent and send any new incoming to the deleted items folder. Be done with it. :) -Kevin - Original Message - From: Paul

Re: [PHP] PHP code optimization

2002-07-09 Thread Kevin Stone
I'm just guessing but I would think there would be no difference. The only way I think there would be a differnce is if you did many many echo statements as opposed to one echo or one ?output block? becuase it would have to parse that many more instances of the function. Again.. just a guess.

Re: [PHP] Ben

2002-07-09 Thread Kevin Stone
First time Ben don't worry about it. This list is actually very adult much more so than others I've belonged to. But you just can't prevent things like this on an unmoderated list. It'll be over soon. Hope you stick around. :) -Kevin - Original Message - From: Ben Ramsey [EMAIL

Re: [PHP] Trying to locate an image file name from another site

2002-07-09 Thread Kevin Stone
If the filename is in fact a timestamp then you can find it using a brute force method. All you need is a for() loop and fopen(). Start your search at midnight the previous night and add one second to the timestamp each itteration. If the fopen() function returns something other than FALSE

Re: [PHP] dumb

2002-07-09 Thread Kevin Stone
Thank you brendan my point from the beginning. Outlook users Message-Block Sender. Takes you two seconds. -Kevin - Original Message - From: Brendan P. Caulfield [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 2:53 PM Subject: [PHP] dumb this is dumb. can

Re: [PHP] isset

2002-07-09 Thread Kevin Stone
form method=post input type=submit name=submit /form if (isset($_POST['submit'])){} // or // if (isset($HTTP_POST_VARS['submit'])) If register globals is ON you can access the variable directly.. if (isset($submit)) {} Otherwise you can extract the post array before testing the variable..

Re: [PHP] isset

2002-07-09 Thread Kevin Stone
Look at that we get an easy question and 50 people reply. Today has just been our day for spam. *LOL* :) -Kevin - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Preston Wade [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 4:37 PM Subject: Re: [PHP] isset

Re: [PHP] Editing Word Documents

2002-07-08 Thread Kevin Stone
Of course you can open and edit any file in PHP you just need to know the file format. But I highly doubt there is any method using PHP that will allow you to prompt the opening of a file into an external application. Editing of the file would have to be done in memory, or manually in the

Re: [PHP] UNSETing Session Variables

2002-07-08 Thread Kevin Stone
unsset($_SESSION['choice']); // .. or .. // session_unregister('choice'); -Kevin - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 08, 2002 11:54 AM Subject: [PHP] UNSETing Session Variables I am having a slight problem unseting some session

Fw: [PHP] Checking for a successful login and setting a global flag.

2002-07-08 Thread Kevin Stone
Simply put you can not protect HTML pages through your login system. You must have some kind of continuous login/check at the top of each page. Give the page the .php extension so it can parse and execute the check. If you're using Cookies that's perfect.. you can just check for the existance

[PHP] Executing WinZip command line not working.

2002-07-08 Thread Kevin Stone
I'm trying to executing winzip command line via the system() function. I know it can be done but I'm recieving a Warning: Unable to fork error every time. The server is running the latest PHP v4.21. ? // // extract command structure.. //

Re: [PHP] Checking for a successful login and setting a global flag.

2002-07-08 Thread Kevin Stone
] To: Kevin Stone [EMAIL PROTECTED] Sent: Monday, July 08, 2002 12:21 PM Subject: Re: [PHP] Checking for a successful login and setting a global flag. Hi Kevin, Firstly, thanks for your answer. I am infact only protecting my php pages. I don't really care that the user can bring up a form

Re: [PHP] UNSETing Session Variables

2002-07-08 Thread Kevin Stone
We're going to need to see some of your code to help you further. -Kevin - Original Message - From: [EMAIL PROTECTED] To: Kevin Stone ; [EMAIL PROTECTED] Sent: Monday, July 08, 2002 12:15 PM Subject: Re: [PHP] UNSETing Session Variables I tried to enter the comand

Re: [PHP] storing data from multi-line text boxes into mysql

2002-07-08 Thread Kevin Stone
nl2br(); http://www.php.net/manual/en/function.nl2br.php Switch beween Unix and HTML line breaks. -Kevin - Original Message - From: Phil Schwarzmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 08, 2002 1:29 PM Subject: [PHP] storing data from multi-line text boxes into

Re: [PHP] UNSETing Session Variables

2002-07-08 Thread Kevin Stone
$_SESSION['currentbid'] isn't available until you do session_start(); session_start(); unset($_SESSION['currentbid']); Or is this what does connect.inc contains? -Kevin - Original Message - From: [EMAIL PROTECTED] To: Kevin Stone Cc: [EMAIL PROTECTED] Sent: Monday, July

Re: [PHP] UNSETing Session Variables

2002-07-08 Thread Kevin Stone
('myvar'); // or // $_SESSION['myvar'] = $myvar; ? page 2 - ? session_start(); unset($_SESSION['myvar']; // or // session_unregister('myvar'); ? - Original Message - From: [EMAIL PROTECTED] To: Kevin Stone Cc: [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Monday, July 08

Re: [PHP] storing an array in mysql - what's the best data type?

2002-07-08 Thread Kevin Stone
You can store arrays as strings with.. $str = serialize($ary); .. and turn a serialized string back into an array with.. $ary = unserialize($str); The string can be stored in either a TEXT or TINYTEXT field. Is this what you wanted to know? I had trouble following your code after

[PHP] Error: Unable to fork (PHP 4.21)

2002-07-07 Thread Kevin Stone
I've searched the entire archives and google for a solution to this. There are plenty of references to the Unable to fork error.. most having to do with a bug in PHP 4.02. I writing the script for a remote Windows server running PHP 4.21 so the bug shouldn't be a problem.. I can only assume I

Re: [PHP] Re: SESSION newbie question ***STILL UNRESOLVED***

2002-07-03 Thread Kevin Stone
You must understand that although it's all the same script each frame is its own HTML page and Session vars will not be called into a frame unless you specify it. So.. if ($QUERY_STRING == 2.html) { session_start(); // call session vars into this frame. // .. blah blah blah.. } Also

Re: [PHP] Solution to register_globals=off existing code???

2002-07-03 Thread Kevin Stone
Or just use extract($HTTP_POST_VARS); Same thing. :) -Kevin - Original Message - From: PHPCoder [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Wednesday, July 03, 2002 12:24 PM Subject: [PHP] Solution to register_globals=off existing code??? Hi Already posted a

Fw: [PHP] $_SESSION

2002-07-02 Thread Kevin Stone
Unless you have your php.ini file configured differently, simply adding session_start(); at the top of each page will make the session available without having to pass the SID through the URL string. Not that there is anything wrong or insecure by passing the session id through the URL string.

Re: [PHP] Test if URL is alive before including a remote JS

2002-07-02 Thread Kevin Stone
Or just fopen() would work fine. -Kevin - Original Message - From: Verdon Vaillancourt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 02, 2002 1:37 PM Subject: [PHP] Test if URL is alive before including a remote JS Hi :) Given I have some content embedded on my page by

Re: [PHP] Test if URL is alive before including a remote JS

2002-07-02 Thread Kevin Stone
It's good programming ediquite but not required. All fclose does is destroy the handle which will be lost when the script terminates.. same difference. -Kevin - Original Message - From: Verdon Vaillancourt [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent

Fw: [PHP] Have you seen this host?

2002-07-02 Thread Kevin Stone
I suppose you haven't looked around much. Those features are fairly typical. Besides what really matters is that the host has what you need at the lowest price. I spend $10/mo for 350MB space, 20GB/mo transfer, PHP, 10 MySQL dbs, anon FTP, CGI/Perl, SSL, SSI, SSH login, unlimited email, and

Re: [PHP] RegEx question

2002-07-02 Thread Kevin Stone
Actually for a job like this look to substr() to extract the last three chars as a string and compare them in an if() statment. http://www.php.net/manual/en/function.substr.php -Kevin - Original Message - From: David Busby [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent:

Re: [PHP] $_POST into a formatted string, help!

2002-07-02 Thread Kevin Stone
Oh man I hope you don't shoot yourself when you realize how easy this is.. foreach ($_POST as $key = $val) { $str .= $key=$val; } Then just crop the first char off and there you go. -Kevin - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 02,

Re: [PHP] mySQL time = year 2038 [HELP]

2002-07-01 Thread Kevin Stone
Perhaps the problem is in your translation. NOW() records a timestamp that is formated by MMDDHHMMSS. If you are translating this in PHP a function designed to take in a UNIX timestamp (that is Unix Epoch time , the number of seconds from some date 30 years ago) you will recieve a rather

Re: [PHP] uploading a file - here is the error message...

2002-07-01 Thread Kevin Stone
That's always possible. Unless you have access to your temp directory you will not be able to update the permissions. At this point I would email your host and ask them about the situation. Good luck. -Kevin - Original Message - From: Phil Schwarzmann [EMAIL PROTECTED] To: [EMAIL

Re: [PHP] session_is_registered = secure?

2002-06-24 Thread Kevin Stone
I don't know of any exploit that can start a session remotely. Only thing I can recommend is that you modify the default session id to prevent local hackers from hijacking your sessions (assuming you're on an ISP and not running your own server). Also you should consider testing those variables

Re: [PHP] real time php

2002-06-24 Thread Kevin Stone
Look into javascript location method or meta tags to performed timed refreshes of the browser window. Do a search on Google. You will find dozens of references to both techniques. -Kevin - Original Message - From: adi [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Monday,

Re: [PHP] Insert with one button

2002-06-24 Thread Kevin Stone
In your HTML each one of those select fields needs a unique name.. they can't all be called D1. No wonder you're having trouble. After that you can print_r($_POST) to see what you're getting back from the form and adjust your script to match. Good luck. -Kevin - Original Message -

Fw: [PHP] Image aliasing

2002-06-24 Thread Kevin Stone
I seriously doubt it. Windows is going to resize all images the same crappy way. The fact is that Microsoft's graphics routines are abysmal. Anyone who's ever scaled an image in Preview and then seen the same thing done on a Mac knows what I'm talking about. All you can do is resize the image

Re: [PHP] getting anchor tags

2002-06-21 Thread Kevin Stone
PHP.net has some good examples if you search under the regex functions. Or you might use something like the function below. I wrote this in a search engine spider. It will return a list of local html links found on the given page. The way I used this in my spider was to build a master list of

Fw: [PHP] Architecture problem? Google want index files exept the main page.

2002-06-20 Thread Kevin Stone
It took me a few minutes to figure out where the /profiles link was on your hompage. You understand that the only way a spider can read the content on your webpage is to fopen() and parse the contents. Google's software cannot explore your dynamic content like a human can. If the random

Re: [PHP] Ascii Value

2002-06-18 Thread Kevin Stone
The functions you want are ORD() and CHR(). Search for them in the manual. -Kevin - Original Message - From: James Drabb [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 12:57 PM Subject: [PHP] Ascii Value Hey *, In C I can cast a char 'j'

Fw: [PHP] Session wierdness

2002-06-18 Thread Kevin Stone
I have experience similar flakiness using sessions but in every case discovered that it was my code that was at fault. In fact this happened to me recently while I was programming a fairly complex login script. I'd do print_r($_SESSION) at the top of every page after session_start(); See if

Re: [PHP] disable ability to download image?

2002-06-18 Thread Kevin Stone
No, and no. Once served to the browser the image resides on the user's computer. They can do whatever they want with it. The only thing you can do is use Javascript to disable the user's right mouse button. However the only effect this will have is to piss of your Windows clients, and your

Re: [PHP] variables not being passed from form ??

2002-06-18 Thread Kevin Stone
I've found that errors in the HTML syntax can cause similar problems. Check your HTML for missing or out of place quotes. -Kevin - Original Message - From: Anthony 'Crash' Ciarochi [EMAIL PROTECTED] To: Anthony 'Crash' Ciarochi [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, June

Re: [PHP] table porblem in netscape!!

2002-06-18 Thread Kevin Stone
Need's whitespace.. tdnbsp;/td td#160;/td - Original Message - From: Anil Garg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 3:34 PM Subject: [PHP] table porblem in netscape!! I have made a table as shown below.. But when i open it in netscape in shows some

Re: [PHP] Question about global variables

2002-06-14 Thread Kevin Stone
I don't think this is possible to setup a global way you're thinking, but I do believe that you can still accomplish the effect you're looking for. First of all, exactly what kind of information will you be storing in the array? You say it needs to be empty the 'first time in'. Does that mean

Re: [PHP] Chaching issues

2002-06-13 Thread Kevin Stone
Yes it is possible. A good suggestion is to tell the browser not to cache PHP output by sending the following headers.. header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); header('Expires: 0'); You can also set these headers via META tags in your HTML. You'll have

Re: [PHP] GD Questions: Please help.

2002-06-13 Thread Kevin Stone
Shane, absolutely you can mix HTML and dynamically generated images. You'll actually call the image in passively via an img tag like this... img src=getimage.php getimage.php will echo the appropriate image header (Content-type: image/png or whatever) plus your image grabbing/generating code

Re: Re[2]: [PHP] sessions help

2002-06-13 Thread Kevin Stone
Your problem is here.. return ($_SESSION['node'] = $node_id); I do not believe that you can both set and return a varaible on the same line. FYI, the variable which you're returning in this function is global.. so there's no reason to return it anyway. Just fill the index and

Re: [PHP] Code Improvement

2002-06-13 Thread Kevin Stone
Though your code isn't the cleanest I've seen I don't think there is anything inherently wrong with your proceedure. You're just displaying a LOT of information. And more importantly you're displaying this in a browser with HTML tables. I'd put a timer on your code to see how much time the

Re: Re[3]: [PHP] sessions help

2002-06-13 Thread Kevin Stone
Hmm. Okay. Replace $_SESSION with $HTTP_SESSION_VARS and see if that works. -Kevin - Original Message - From: Leston Drake [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 13, 2002 4:07 PM Subject: Re[3]: [PHP] sessions help I've stripped the code down to barest bones to

Re: [PHP] Emptying a Single Array Value

2002-06-12 Thread Kevin Stone
$nums = array ('one', 'two', 'three'); $nums = remove_array_element($nums, 1); function remove_array_element($array, $index) { unset($array[$i]); // Unset selected index return array_values($array); // Return reindexed array } P.S. The empty() function returns true or false depending

Re: [PHP] Question about tag ??

2002-06-11 Thread Kevin Stone
The only way to execute code stored in a varaible (string) is to send it to the eval() function. Assuming you're not doing this then you're perfectly safe. Learn more about the eval function.. http://www.php.net/manual/en/function.eval.php -Kevin - Original Message - From: Nightshade

Re: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Kevin Stone
Doug, it seems to work fine here. So long as the remote server has PHP installed (which it looks like they do) then include() should work the same as a local file. Could it be a configuration issue perhaps? Test: http://www.helpelf.com/test/test.php Code: http://www.helpelf.com/test/test.phps

Re: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Kevin Stone
Doh! Sorry, Natalie not Doug, and I'm glad to see you got it working. -Kevin - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Doug DeVries [EMAIL PROTECTED]; Leotta, Natalie (NCI/IMS) [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 11:59 AM Subject: Re

Fw: [PHP] Array into database

2002-06-11 Thread Kevin Stone
Not directly no. You can serialize the array and store it in a single text field. Or, if this array contrains data that you'll be retrieving often then you can construct a table and store each array element in a new row. -Kevin - Original Message - From: Leon Mergen [EMAIL PROTECTED]

Fw: [PHP] Array into database

2002-06-11 Thread Kevin Stone
Yes I believe serialize will work with any array. When you extract it from the database simply do $array = unserialize($str) to rebuild the array. -Kevin - Original Message - From: Leon Mergen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 3:59 PM Subject: Re:

Re: [PHP] multi-line textfields don't post

2002-06-10 Thread Kevin Stone
By multi-line text field do you mean a textarea field? Could be you're not using it right. Remeber this construct *requires* the closing tag. The vlaue goes between the two tags. textarea name=text cols=15 rows=5/textarea ? echo $_POST['text']; ? - Original Message - From: Phil

Fw: [PHP] Help with header function

2002-06-10 Thread Kevin Stone
What kind of an error are you recieving? Could it be you're sending output prior to the header function? The alternative solution would be to include(file_exists.php); then exit. -Kevin - Original Message - From: Shane Kelly [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June

Fw: [PHP] Help with header function

2002-06-10 Thread Kevin Stone
The only thing I can think of is that you have a syntax error in the header. -Kevin - Original Message - From: Shane Kelly [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 10, 2002 1:43 PM Subject: Re: [PHP] Help with header function I don't get an error message...but the

Re: [PHP] Help with header function

2002-06-10 Thread Kevin Stone
there is a syntax error within his header text.. just not the one you thought it was. Why do I get the feeling I'm playing that mind bender game where you have to guess the right combination within so many turns? LOL -Kevin - Original Message - From: Lazor, Ed [EMAIL PROTECTED] To: 'Kevin

Fw: [PHP] [PLEASE HELP] Passing variable to new page.

2002-06-06 Thread Kevin Stone
Question.. why are you opening up a full sized new window with the javascript popup script? I susspect the problem has something to do with the javascript, although I'm not going to take the time to test it myself. You can open a new page in an HTML link by setting target=new. You shouldn't

Re: [PHP] Download Page?

2002-06-06 Thread Kevin Stone
Common question becuase of it's somewhat unintuitive nature, but it is very simple. Do a search for keywords header and Content-disposition. That should reveal what you want. Good luck. -Kevin - Original Message - From: Nick Richardson [EMAIL PROTECTED] To: PHP General [EMAIL

Re: [PHP] PHP as HTML

2002-06-04 Thread Kevin Stone
AddType application/x-httpd-php .html AddType application/x-httpd-php .htm - Original Message - From: Tom Ray [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 2:41 PM Subject: [PHP] PHP as HTML Hey there- I'm trying to use an .htaccess file to parse .php files as

Re: [PHP] Include and memory

2002-06-03 Thread Kevin Stone
No offense but what you just said made absolutely no sense. There is no way to perform an operation on a computer without allocating memory for that operation. Unlike other lower level prgramming languages (ie. C/C++) PHP automatically allocates the necessary amount of memory for whatever

Fw: [PHP] keep alive refresh

2002-06-03 Thread Kevin Stone
It would help to know exactly what information you are gathering and for what reason are you storing it. -Kevin - Original Message - From: Mauro [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 03, 2002 2:35 PM Subject: [PHP] keep alive refresh Hello, I looked for some old

Re: [PHP] Running a script to check something before submitting a form. Can this be done?

2002-05-31 Thread Kevin Stone
I wouldn't use header() in this case, unless you plan to create an ungodly looking URL to pass with it.. All you really need to do is point the form to a PHP script that validates the information. Then at the end of that script either include() the form hander if it's valid, or print an error

Re: [PHP] Multiple File Uploads and me....

2002-05-30 Thread Kevin Stone
Actually there is a tiny bit of information in the manual about handling multiple uploads here.. http://www.php.net/manual/en/features.file-upload.multiple.php -Kevin - Original Message - From: Nick Patsaros [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 30, 2002 1:17 PM

Fw: [PHP] javascript

2002-05-29 Thread Kevin Stone
Instead of all those echo statments use the concatonation operator (.) to combine variables and quoted strings. It'll make your code much easier to read. After I cleaned up your code it worked perfectly. Looks like you may be missing a semi-colin there on line #1 of your javascript code.

Re: [PHP] Intermediate Searching... screen.

2002-05-28 Thread Kevin Stone
Search screens are a tricky prospect and none seem to work very well. However you could try one of the following techniques... Instead of the submit button initiating a search it initiates another script that displays the 'searching...' message and only after it has outputted that to the screen

Re: [PHP] comment followed by ? fails to parse

2002-05-28 Thread Kevin Stone
I've run into this before as well. Pain in the ass when you want to put example code in your header. It's gotta be a deisgn flaw. // literal.. legal $tmp = '?'; // reg ex.. legal ereg('?', $tmp); // Comment.. illegal. Why? Makes no sense. /*?*/ -Kevin - Original Message - From:

Re: [PHP] comment followed by ? fails to parse

2002-05-28 Thread Kevin Stone
OH NO IT WON'T.It'll comment out the ? and parse the ? and give you a parse error. ? /*?comment here?*/ echo hello; ? - Original Message - From: Ed Gorski [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED]; Jonathan Rosenberg [EMAIL PROTECTED]; Johnson Kirk [EMAIL PROTECTED

Re: [PHP] comment followed by ? fails to parse

2002-05-28 Thread Kevin Stone
Exactly.. it doesn't seem to make any sense. Esspecially since it's such as absolutely incredibly undeniably easy thing to check for. :) If the code doesn't end with an uncommented ? then just parse the code as text. That's what it does anyway so why catch commented code at all? -

Re: [PHP] comment followed by ? fails to parse

2002-05-28 Thread Kevin Stone
Hrm.. that's possible. I'm running v4.12 -Kevin - Original Message - From: Ed Gorski [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 3:01 PM Subject: Re: [PHP] comment followed by ? fails to parse What version of php are you using

Re: [PHP] comment followed by ? fails to parse

2002-05-28 Thread Kevin Stone
hello world; ? -Kevin - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 3:14 PM Subject: Re: [PHP] comment followed by ? fails to parse On Wednesday 29 May 2002 05:03, Kevin Stone wrote: Hrm.. that's possible. I'm running v4.12

[PHP] eregi() against a binary file?

2002-05-28 Thread Kevin Stone
I'm trying to match file names associated with a 3DS file (a 3DS file is a common 3D file format). The file is binary by nature but as you can clearly see in the dump below the filenames themselves are stored as plain text. So I should be able to do a simple eregi() on the file and discover if

Re: [PHP] NewBie-UPLOADING IMAGE

2002-05-25 Thread Kevin Stone
This is a rather broad question you're asking. I would suggest starting at the online documentation on www.php.net. Handeling file uploads: http://www.php.net/manual/en/features.file-upload.php Post back here if you have any trouble understanding any of this stuff. -Kevin - Original

[PHP] Extract ZIP archives

2002-05-25 Thread Kevin Stone
. Much Thanks, Kevin Stone [EMAIL PROTECTED] or [EMAIL PROTECTED]

Re: [PHP] Include (Newbie question)

2002-05-25 Thread Kevin Stone
No, not exactly. The idea behind the include() function in PHP is to append and execute code to the currently running script. This is great for organizing your code into more easier to manage chunks. PHP will attempt to parse and execute the included file as a PHP file regardless of the file

Re: [PHP] listing the files in the directory

2002-05-24 Thread Kevin Stone
Michael, I wrote this function for a project that I'm working on. It returns an indexed array of local links found on a given page. It returns false if the url is not a valid file. If you want it to return all links regardless of prefix or file extension then just return $arrayoflinks[1]

Fw: [PHP] gmtime?

2002-05-24 Thread Kevin Stone
I don't know what gmtime() is supposed to do. But is gmmktime() similar? http://www.php.net/manual/en/function.gmmktime.php -Kevin - Original Message - From: Jens Lehmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 24, 2002 12:51 PM Subject: [PHP] gmtime? Any reasons

Re: [PHP] matching two form fields function?

2002-05-23 Thread Kevin Stone
Tis a tad easier than that. function match_str($str1, $str2) { if ($str1 == $str2) return true; else return false; } // If the fields don't match exit with error. if (!match_str($field1, $field2)) { echo The fields must match.; exit; } -Kevin - Original

[PHP] MySQL INSERT concatonating one of my values for seemingly no reason...

2002-05-22 Thread Kevin Stone
exact values (just look at the $query echo statements above for more proof). I can not understand why the 'pages' value is being concatonated when inserted from the array. Any help? Or are you just as baffled as me. Much thanks, Kevin Stone [EMAIL PROTECTED]

Re: [PHP] MySQL INSERT concatonating one of my values for seemingly no reason...

2002-05-22 Thread Kevin Stone
and a direct comparison to an identical string (without type casting) returns true. $keyword = (string)$index[$i]['word']; $pagelist = (string)$index[$i]['pages']; -Kevin - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: PHP-general [EMAIL PROTECTED] Sent: Wednesday, May 22

Re: [PHP] mysql error

2002-05-17 Thread Kevin Stone
The mysql_select_db() function is going to return a handle. You need to capture that handle and use it as the second parameter in your mysql_query() function. Although this is not required in certain cases where the server automatically knows which database to work with, chances are thats whats

<    1   2   3   4   5   6   >