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,
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
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
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
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
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
$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,
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,
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]
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
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
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
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_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
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
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
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
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
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
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
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
21 matches
Mail list logo