Re: [PHP-DB] Renaming all pages to .php

2003-06-19 Thread Joshua Stein
 I'd like to get some feedback from this forum. Do you agree that a page 
 without php functions or server side includes can be put online with either 
 a .htm or .php function? If I never add a php function to a page with a 
 .php extension, could that cause some kind of problems?

it won't cause any problems.  you'll have the very small overhead of
having to run every static page through php's parser, but if you're
going to have php in these pages in the future it doesn't really
matter.

 Also, I'm thinking of naming all my pages index and sticking them inside 
 folders. That way, visitors can reach a page by typing in 
 www.geobop.com/birds/ , whether the full URL is 
 www.geobop.com/birds/index.htm or www.geobop.com/birds/index.php  Is this a 
 good plan, or do you see any problems?

again, no problems.  just make sure your web server is setup to
search for index.php as a directory index page.


   -j.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] how do I use same page for submit and results?

2003-02-06 Thread Joshua Stein
 But now I'm not using anything that I can check except for the
 button click. Any ideas how to do this?

assign a name to the button and check for that.

input type=submit name=action value=Show List

...

if ($_REQUEST[action] == Show List) {
   /* form was submitted */
   ...
} else {
   /* form hasn't been submitted, show it */
   ...
}


   -j.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] How do I change ?

2002-12-09 Thread Joshua Stein
 How do I strip  from a string?  Actually, I need to change it to a legal
 char so I can send it via the URL.
 
  $url4 = str_replace(/, ., $url4);

$url4 = str_replace(\, ., $url4);


   -j.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] database update question

2002-11-15 Thread Joshua Stein
 Is there a way to change all the entries from .pdf to .zip without
 writing an update statement for each individual row?

UPDATE table_name SET col_name = LEFT(col_name, LEN(col_name) - 4) +
'.zip' WHERE col_name LIKE '%.pdf'


   -j.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] PHP tags in a MySQL echo

2002-04-09 Thread Joshua Stein

 Is there any way to work around this and get it to treat all the echoed rows
 as PHP not just only text?

Wrap the print around an eval():

   print(eval($string));


   -j.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php