RE: [PHP] closing window after submit

2001-06-30 Thread Jason Lustig
use onsubmit = somefunction(); in the form tag, and make the somefunction() function close the window. --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,

[PHP] Parse error: Needs T_VARIABLE or $

2001-06-30 Thread Jason Lustig
This is really weird. Very, very, very weird. I have the following code in a script: if (!empty(trim($rowData[3]))) { $tdStr.= trim($rowData[3]); } Now, when I run it, I get the following error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in

RE: [PHP] php / apache

2001-06-30 Thread Jason Lustig
Why would you want to do that? I don't think it's really possible... unless you do something wacky with Apache... --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

RE: [PHP] PHP Menu.

2001-06-28 Thread Jason Lustig
You would have to use javascript to do that... PHP is server-side, not client-side. You could create the javascript with PHP, but the PHP can't make the menu pop out and stuff... --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: [PHP] RE: Events Listings

2001-06-27 Thread Jason Lustig
If you don't have access to a database, why not put all the data in arrays and then use the array sorting functions? --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

RE: [PHP] PHP crashing IIS 5 on Wnidows 2K

2001-06-27 Thread Jason Lustig
Assuming that you are using the ISAPI version of PHP, it is probably crashing because that version of PHP is not very stable. You should upgrade to 4.0.6 which contains improvements in that area, but it is still not perfect. If you find 4.0.6 unstable either change from ISAPI to CGI or if you

RE: [PHP] Expand/parse variables in file

2001-06-26 Thread Jason Lustig
$a = whatever; $b = abc $a def; echo $b; which results in abc whatever def ??? What am I missing? $b = abc $a def; That gets parsed because it's in double-quotes. Since $a is a variable, it inputs whatever $a is, in this case Whatever. So it ends up printnig out abc whatever def. To fix it,

RE: [PHP] Passing an array to a C program from a php script??

2001-06-26 Thread Jason Lustig
Why not make a separate .txt file which is read by the PHP script to make its variable with file(), and have the C file read it with ifstream to make up its variable? --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: [PHP] Enter to BR

2001-06-26 Thread Jason Lustig
try nl2br() --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] PHP crashing IIS 5 on Wnidows 2K

2001-06-26 Thread Jason Lustig
I have PHP 4.04pl1 set up on a IIS 5 server on Windows 2k. However, it keeps on crashing the server -- not all the time, but sometimes it does, sometimes it doesn't. And I have no idea whatsoever what is causing it. I *think* that it has to do with my include()s. I end up including all my

[PHP] Connecting to a remote MSSQL database via ODBC and setting up the MSSQL extension

2001-06-24 Thread Jason Lustig
I am connecting to a remote MSSQL database from my dev box (windows/apache/php4.06). However, my dev box doesn't have MSSQL installed on it (or else I wouldn't have to connect remotely -- I could copy the DB file to the comp and then use it in MSSQL, connecting locally). To use the MSSQL

RE: [PHP] php not working

2001-06-24 Thread Jason Lustig
I've added the lines: AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps to my httpd.conf file Maybe try adding: AddType application/x-httpd-php4 .php instead of: AddType application/x-httpd-php .php It depends on how you did the

RE: [PHP] Program execution functions doesn´t work in my system

2001-06-24 Thread Jason Lustig
I need to run some external programs from a PHP script. How could I do that? You might be able to use them through (D)COM objects, since you're on an NT server. I'm not sure about the passthrough() functions and stuff on NT, though... I've never really used them (or had reason to). --Jason --

RE: [PHP] $PHP_SELF name space?

2001-06-24 Thread Jason Lustig
$PHP_SELF is a global variable. You're trying to call it from inside a function, which won't work unless you declare it as global to the function (unless you have some thing in the php.ini file set that I don't remember off the top of my head what it's called which will make all that stuff global

RE: [PHP] Percentages

2001-06-24 Thread Jason Lustig
How 'bout using this hack: function formatPercent ($decimal, $round = 2) { return round($decimal*100, $round).'%'; } --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

RE: [PHP] Variable variable names...

2001-06-23 Thread Jason Lustig
There's a number of things you can do with variable variables... they're quite powerful, I like 'em a lot. :) Anyway, you can do ?php $myvar2 = 'stuff'; $othervar = 2; if (isset($myvar{$othervar})) echo $myvar{$othervar}; ? This would output snip stuff /snip I think that's what

RE: [PHP] Is it possible to have the parameters fo a function be exited HTML?

2001-06-23 Thread Jason Lustig
rant Its probably just as fast for you to test it out using what you have written here as it is for someone to give you the answer. /rant Well, that thought occurred to me just after I sent the email... but there's nothing you can do after hitting the send button, can you? --Jason -- PHP

[PHP] PEAR

2001-06-23 Thread Jason Lustig
I just installed PHP 4.06 on my setup, and noticed that there's a bunch of classes/scripts in the /pear directory. Does anyone know what the status of these scripts are, as in if they are finished quality (ie, they can be used successfully on websites)? I thought that PEAR was still being

[PHP] Is it possible to have the parameters fo a function be exited HTML?

2001-06-22 Thread Jason Lustig
Is it possible to break up the parameters of a function with ? and ?php ?? What I mean by this, for example, is this: snip ?php strtoupper( ? table tr td a href=http://www.php.net;php.net/a /td /tr /table ?php ); ? /snip With this example, will

RE: [PHP] SQL statement for clearing a table

2001-06-22 Thread Jason Lustig
This SQL statement: DELETE FROM myTable; That should work... pretty much, unless you give a WHERE statement, it will do whatever you want (UPDATE, SELECT, DELETE, etc) to every record in the table. --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

[PHP] Which is more expensive: concatenation or embedding?

2001-06-22 Thread Jason Lustig
There are two ways to get your variables into a string -- concatenation with single-quoted strings, or embedding in evaluated double-quoted strings. Which is more expensive to the server? For example: ?php $x = 10; echo This is a string and my variable \$x is $x.\n; echo 'This is a string and