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 Javascrip

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] Anywa

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

2002-02-14 Thread Kevin Stone
them? -- Kevin <[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

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

2002-02-14 Thread Kevin Stone
"; ?> -- This works.. View Source for Myscript.php This doesn't work.. http://www.mydomain/myscript.php";>View Source for Myscript.php Thanks for your help. It's always the little things that'll get ya. :) -- Kevin Stone <[EMAIL PROTECTED]> > -Ori

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

2002-02-14 Thread Kevin Stone
vin > -Original 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 fil

[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]>

[PHP] Limiting use on public scripts.

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

RE: [PHP] PHP not parsed in HTML

2002-02-12 Thread Kevin Stone
neral 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 PR

RE: [PHP] Formatting a MYSQL time

2002-02-07 Thread Kevin Stone
Ah.. much appreciated. :) > -Original Message- > From: Lars Torben Wilson [mailto:[EMAIL PROTECTED]] On Behalf Of Lars Torben > Wilson > Sent: Thursday, February 07, 2002 12:43 PM > To: Kevin Stone > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Formatting a MYSQL time

RE: [PHP] Formatting a MYSQL time

2002-02-07 Thread Kevin Stone
required. $timestamp = 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 PROTECTE

RE: [PHP] Books on PHP

2002-02-05 Thread Kevin Stone
epth. It does not go into theory or advanced topics making it a terrible book for the experienced programmer. It is also not a good function reference. But far as reference goes, I say forget the books. Nothing can beat the function search at www.php.net. -- Kevin Stone [EMAIL PROTEC

RE: [PHP] Associative arrays... help

2002-02-01 Thread Kevin Stone
s you're going to access the list arrays by title (ie $applist[URL]) then there really isn't a point in using the associative array. Just put everything into a 2D list array and access them with a double for() loop. Hope this points you in the right direction. -- Kevin Stone [EMAI

RE: [PHP] Pregenerating Script

2002-01-31 Thread Kevin Stone
t;whatever"); header("whatever"); include("header.html"); include("footer.html"); ob_flush(); Yes I believe it really is that simple. :) Will only work with the most recent versions of PHP but I hope it helps. Good luck. -- Kevin Stone [EMAIL PROTECTED]

RE: [PHP] Session Help

2002-01-30 Thread Kevin Stone
ntrol: public"); That will the trick. Actually it may work too well but at least your visitors won't get discouraged by that annoying message. -- Kevin Stone [EMAIL PROTECTED] > -Original Message- > From: Michael: Dave II, Electric Boogaloo [mailto:[EMAIL PROTECTED]] > S

RE: [PHP] Getting an include file into a string after PHP evaluates the vars?

2002-01-30 Thread Kevin Stone
evaluates the tags within the HTML template. I must say this is a very cool set of functions. Thanks for the tip! -- Kevin Stone [EMAIL PROTECTED] > -Original Message- > From: Jim Lucas [php] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 29, 2002 6:42 PM > T

RE: [PHP] Re: Getting an include file into a string after PHP evaluates the vars?

2002-01-30 Thread Kevin Stone
ob_get_contents() appears to be exactly what I needed. Thanks for putting me on the right track! :) -- Kevin Stone [EMAIL PROTECTED] www.helpelf.com > -Original Message- > From: CC Zona [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 29, 2002 6:49 PM > To: [EMA

[PHP] Getting an include file into a string after PHP evaluates the vars?

2002-01-29 Thread Kevin Stone
t of the template is HTML with some Javascript of course eval() won't work on the string. Did I paint myself into a corner here? Or is there a way out that I just don't see. Thanks, Kevin Stone [EMAIL PROTECTED] www.helpelf.com -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] does this work?

2002-01-10 Thread Kevin Stone
Hmm I believe that the mysql_query() function requires quotes around the query statement even it it is being passed as a variable.. mysql_query("$tempsql", $db); -Kevin > It seems that I have a "parse error" somewhere in the following code > (since that's the only code in my script, it's a test

Re: [PHP] Form Question

2002-01-10 Thread Kevin Stone
IE5.5 actualy has a bug that will not cache certain form fields under certain conditions. There are other situations in which a browser won't cache the information at all. So it's best to do this within the script by either printing the form from within the script its self, or include() the HTML

Re: [PHP] global generation

2002-01-07 Thread Kevin Stone
Wait until after the for loop has completed. for ($i=0; $i< $num_results; $i++) { $variable[$i]; } global $variable; > I need to call a generated variable global w/i a function but the > following doesn't work: > > for ($i=0; $i < $num_results; $i++) > { > global $variable[$i]; > } > > I am tr

Re: [PHP] problem reading sessions

2002-01-04 Thread Kevin Stone
I'll add if you do not have register_globals set then you can access the variable by its long name, $HTTP_SESSION_VARS["blah"]. -Kevin > Is register_globals set to 'on' in php.ini? It needs to be for this coding > style to work. > > Kirk > > > -Original Message- > > From: Alastair [mail

Re: [PHP] pass variable from php script to another php script

2002-01-04 Thread Kevin Stone
It all depends on how you're calling the script. Obviously these variables are not system globals. So if the mail.php script is being accessed separately from the upload.php script they will not share variables. However if you include("mail.php"); from within upload.php, then it automaticaly inh

Re: [PHP] find all the numeric positions of a character that appears in a string multiple times

2002-01-03 Thread Kevin Stone
SPLIT to the rescue! Split tears up your string into lists (arrays) which you can cycle through and extract normaly. So this is going to look like hell but here we go... http://foo.bar>test"; $str_list1 = split ('<', $str); // Note: $str_list1 now == array ("a href=http://foo.bar>", "b>test",

Re: [PHP] array_multisort?

2002-01-02 Thread Kevin Stone
Unless your problem is more extensive than what you're explaining here, there's no reason to do any kind of sort. Simply reorder the list yourself so that whatever ends up in $title is reordered to the first index of your $shop list... $product = array ($id, $title, $price); $shop = array ($prod

Re: [PHP] easy quickie..

2002-01-02 Thread Kevin Stone
Seb, I tend to agree that some webmasters would do better if they did less and tried not to be so "helpful" to the user. But custom back buttons can be very useful when used in presentations such as page by page instructions and slideshows without having to hardcode the HTML which (if you forgive

Re: [PHP] Need another verse

2001-12-20 Thread Kevin Stone
Okay you need to interject some emotion into your song... try something like... Now PERL's been sending emails, She sais she's feeling jealousy, Because I have a new friend, PHP -Kevin - Original Message - From: "bill" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December

Re: [PHP] Re: Returning html code-PROB SOLVED

2001-12-17 Thread Kevin Stone
Ahh.. I was about to reply but nevermind. The two functions you're talking about are addslashes() and stripslashes(). Yes those are very handy. :) > > > > Does anyone know of an easy way to store html code in a mysql database, > and > > then retreive it, in such a way that it can display the

Re: [PHP] Miscount

2001-12-14 Thread Kevin Stone
I do not know if this will solve your problem but you should enclose each logical query segment with parenthesies... $shot_counts = "SELECT COUNT(*) FROM statistik WHERE (shooter='$shooter_login' && shot_one = '$t') || (shooter='$shooter_login' && shot_two = '$t') || (shooter='$shooter_login' &&

Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-14 Thread Kevin Stone
GET string. This var refers to the next start row in your database. header("location:http://www.mydomain.com/myscript.php?row=$row";). Include an if() statement somewhere in there to break from the loop when you've reached the end of your database. Doable? -Kevin Stone > On Thu

Re: [PHP] FW: A little O T: <-- Can I make a better looking file box?

2001-12-12 Thread Kevin Stone
Of course won't browse the file hierarchy. The truth of the matter is Brandon that it can not be done by conventional means. This is something I investigated a long time ago. There's a whole conversation about this on Deja.com. The only good suggestion is to use some combination of CSS to hid

Re: [PHP] Single/Double Quotes

2001-12-12 Thread Kevin Stone
I see your question has already been answered, but I'll add a tip that works well for me. Whenever I want to perform an SQL query that involves PHP variables I will write the query string to its own variable instead of directly into the function. Then use that variable in the query function...

Re: [PHP] Help creating an image repository/library.

2001-12-12 Thread Kevin Stone
hanks! -Kevin > Can you chown the directory to the same user as the web server runs as > (ie. nobody)? At that point, you will be able to upload into that > directory while retaining the directory permission of 755. > > > > -Original Message- > From: Kevin Stone [mai

Re: [PHP] Help with mysql query

2001-12-11 Thread Kevin Stone
Daniel, Try this. Still sort of a brute force method but just 10 query strings instead of 50 but nothing MySQL is going to balk at. Then you an print out the results stored in the $num_vals list using a similar for loop. -Kevin Stone - Original Message - From: "Daniel

Re: [PHP] Help creating an image repository/library.

2001-12-11 Thread Kevin Stone
ry. I can not display an uploaded image along with HTML when I have to fread() the file to the screen. **pant pant** There will be thousands of images (4000 - 5000 when complete) and it has been advised to me not to save them in a MySQL database as it can significantly reduce search times. Is this

Re: [PHP] Date

2001-12-11 Thread Kevin Stone
our_file_path)); I don't know exactly what the stat() funciton returns, but the above method works for me. Does anyone have any input for my questions? -Kevin Stone > Why is this: > > $modified = stat("header.php"); > echo "Last Modified: ".date("F j, Y

[PHP] Help creating an image repository/library.

2001-12-11 Thread Kevin Stone
on there is no way I can align the images with the corresponding database info. And inline frames are not supported by all browsers. *sigh* I am being blocked on all ends and I need a solution fast. Any help will be **GREATLY** appreciated. -Kevin Stone -- PHP General Mailing List (htt

Re: [PHP] Date formatting

2001-12-11 Thread Kevin Stone
tract the results as ussual... mysql_fetch_row() or mysql_fetch_array() or whatever you would use. Let me know if this works becuase I've not tried it before. Seems like it should work though. Good luck. :-) -Kevin Stone - Original Message - From: "phantom" <[EMAIL PR

Re: [PHP] replacing Carriage Return

2001-12-11 Thread Kevin Stone
Could be "\r"? I'm not sure about this becuase I haven't tried it. I know that \r is used as the return character in other OSs. -Kevin Stone - Original Message - From: "phantom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesda

[PHP] Get Hours/Mins/Secs between two timestamps?

2001-12-11 Thread Kevin Stone
Sorry if this sounds like an extremely amature question. :) Is there a function in PHP that will output the difference between two timestamps (hours/mins/secs), similar in the way that getdate() extracts the date of a timestamp? Thank you. -Kevin Stone

<    1   2   3   4   5   6