RE: [PHP] closing window after submit
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, e-mail: [EMAIL PROTECTED]
[PHP] Parse error: Needs T_VARIABLE or $
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 c:\server\wwwroot\contributors.php on line 70 (note: line 70 is the first liine of the code snippet above) Now, this shouldn't be a problem. There is no problem with the parens, and I don't see anything wrong with the code. Can someone help me out with this? This is happening in another script (when I use the empty() function) and it is really weird... --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]
RE: [PHP] php / apache
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 administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP Menu.
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 commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] RE: Events Listings
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 administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP crashing IIS 5 on Wnidows 2K
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 can, change from IIS to Apache and use the Apache module version of PHP. OK, cool. :) I *think* I'm using the ISAPI version. Unfortunately, I don't have much control over the server situation for this particular site... --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]
RE: [PHP] Expand/parse variables in file
$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, either escape the $a, or use single-quotes. --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]
RE: [PHP] Passing an array to a C program from a php script??
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, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Enter to BR
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
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 function and nav libraries into each and every page, which turns out to maybe 10 includes. Theoretically, yes, it would put a hit on the server because PHP uses the file system so much, but it shouldn't crash it. Is this possibly the reason it is crashing? --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] Connecting to a remote MSSQL database via ODBC and setting up the MSSQL extension
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 extensions for PHP, I would have to have teh MSSQL libraries. What exactly does this mean? When I uncomment the MSSQL extension in php.ini, it still says taht I don't have the MSSQL functions (probably because I don't have these libraries). How do I get these libraries, or is this not even the problem? On another note, how does one connect to a remote DB over ODBC? I've looked at the syntax (and what varous people have told me), and nothing seems to make sense as to where to put the host IP and where to put where the DB name... I'm fine connecting to the same computer that the script is on, but the syntax to remotely connect via ODBC just doesn't seem to make any sense with me (BTW, this problem connecting over ODBC has nothing to do with my MSSQL problem; that I can connect remotely over). --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]
RE: [PHP] php not working
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 Action stuff. If you did: Action application/x-httpd-php4 /php4/php.exe then you should use: AddType application/x-httpd-php4 .php but if you did: Action application/x-httpd-php /php4/php.exe then you should use: AddType application/x-httpd-php .php That might work, it might not. --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]
RE: [PHP] Program execution functions doesn´t work in my system
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 -- 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]
RE: [PHP] $PHP_SELF name space?
$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 anyway). You've got to do: class xCrumbs { function Render(){ global $PHP_SELF; echo $PHP_SELF; } } $crumbs = new xCrumbs(); $crumbs-Render(); --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]
RE: [PHP] Percentages
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 list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Variable variable names...
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 you were asking... You've got to use the { and } around the variables you're using to make teh variable variable. --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]
RE: [PHP] Is it possible to have the parameters fo a function be exited HTML?
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 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] PEAR
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 developed. --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] Is it possible to have the parameters fo a function be exited HTML?
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 it output the following HTML? snip TABLE TR TD A HREF=HTTP://WWW.PHP.NET;PHP.NET/A /TD /TR /TABLE /snip I know it's not a very useful use of strtoupper()... :) But I am curious about whether it is possible to have the parameters to a function in exited HTML. Is it possible? --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]
RE: [PHP] SQL statement for clearing a table
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 PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Which is more expensive: concatenation or embedding?
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 my variablke $x is '.$x.\n; ? Now, which is more expensive? Is it more expensive to concatenate them, or to evaluate the whole string since it would be in double-quotes? I see lots of people do things in double-quotes, but it would seem to me that single-quoted strings concatenated with variables would be less expensive because you are only evaluating the variables. --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]