RE: [PHP] str_replace

2002-10-31 Thread Thoenen, Peter Mr. EPS
try $file = preg_replace(/[[:punct:][:space:]]/,'',$file); PEter -Original Message- From: rick [mailto:rick;somers.net] Sent: Friday, November 01, 2002 00:22 To: [EMAIL PROTECTED] Subject: [PHP] str_replace How could this be written better? Is there a way to do it all in 1

RE: [PHP] Trouble with switch statements

2002-10-26 Thread Thoenen, Peter Mr. EPS
switch($_GET['select']){ case 1: .. -Peter -Original Message- From: Edward Kehoe [mailto:emkehoe;learn.senecac.on.ca] Sent: Friday, October 25, 2002 19:47 To: [EMAIL PROTECTED] Subject: [PHP] Trouble with switch statements Ok...I just recently installed Apache1 and

RE: [PHP] Replace illegal filename chars???

2002-10-24 Thread Thoenen, Peter Mr. EPS
close but preg_replace(/[^[:print:]]/,'',$str); is what you want. The below would work but typo'ed ... ereg_replce should be ereg_replace Also..that is just A-Za-z0-9 ... many OS's allow punctation also...[:print:] will cover this. Now only if php supported [:control:] and [:graph:] :)

RE: [PHP] Fatal error: Maximum execution time of 30 seconds exceeded

2002-10-13 Thread Thoenen, Peter Mr. EPS
In you php.ini, find max_execution_time = 360 and up it. -Peter -Original Message- From: scott [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 13, 2002 20:06 To: [EMAIL PROTECTED] Subject: [PHP] Fatal error: Maximum execution time of 30 seconds exceeded Hello Trying to

[PHP] global variable preference for self

2002-10-13 Thread Thoenen, Peter Mr. EPS
Anybody have reason for using $_SERVER['PHP_SELF'] -v- $_SERVER['URL'] ? They both seem to always be the same in every instance I have seen so curious is their is a preferance for one or the other and if there is a case where PHP_SELF!=URL Cheers, -Peter ##

RE: [PHP] is there an alternative to this code?

2002-10-07 Thread Thoenen, Peter Mr. EPS
What you want is: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head titleFoo/title /head body form method=POST action=?php echo $_SERVER['PHP_SELF']? div style=width: 15%; float: left;

RE: [PHP] preg help ?

2002-09-28 Thread Thoenen, Peter Mr. EPS
/INPUT TYPE=HIDDEN NAME=SPIDERSESSION VALUE=([^]*)/ should work ... prob. a better way to do this but its functional :) -Peter -Original Message- From: :B nerdy [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 29, 2002 02:05 To: [EMAIL PROTECTED] Subject: [PHP] preg help ?

RE: [PHP] Posting a value to one form to another

2002-09-28 Thread Thoenen, Peter Mr. EPS
You are using method GET correct? This will not work for POST's on any platform that I know of. Browser default behavior for clicks are GET. You could create a custom browser to POST all clicks..but wouldn't work very well :) Only reason I am asking is Posting a value ...though Posting might

[PHP] error with php and pdflib

2002-09-22 Thread Thoenen, Peter Mr. EPS
Hello everybody, Getting the following error when trying to generate a pdf file. Fatal error: PDFlib error: function 'PDF_set_info' must not be called in 'object' scope in E:\php\pdf.php on line 6 From what I can tell (google and php manual online) this error is caused when your webserver (IIS

RE: [PHP] Reg Exp issue

2002-09-20 Thread Thoenen, Peter Mr. EPS
Not that familiar with MySQL's flavor of RegEx (and the documentation seems to be extremely bad ... or at least I can't seem to find any with casually searching) but have you tried escaping the RegEx special characters? eg REGEXP ('ok\/2.0 \(hah 3\.0; BAM oh 5\.1; \.hi CLR 1\.0\.4725\)');

[PHP] mysql_query w/ JOIN results giving unexpected results w/ PHP (not regular SQL though)

2002-09-18 Thread Thoenen, Peter Mr. EPS
Hello everybody, Having an issue where I am getting unexpected results with a simple query and at a lost to explain why. At the end is my code. The problem I believe though I have narrowed down to the following statement. 1. When I run SELECT accounts.id, accounts.action, people.last,

[PHP] turn off a warning with $GET_['var'];

2002-09-01 Thread Thoenen, Peter Mr. EPS
Hello, trying to figure a way to turn off the following warning. doesn't seem to work neither does switch (isset($_GET['status'])){ Notice: Undefined index: status in E:\php\tt\index.php on line 6 switch ($_GET['status']){ scenario is this var is set in every instance but the first GET

[PHP] Strange session id problem - code is issuing a new one randomly

2002-08-14 Thread Thoenen, Peter Mr. EPS
# START CODE SNIPPET ... COMMENTS BELOW (and yes I am not a db guru by anymeans, might be easier ways to do this) ?php session_start(); $tsid=session_id(); echo $tsig; # debug $date=date(ymdHi); $connect=mysql_pconnect('localhost', 'user', 'pass'); mysql_select_db('db',