is this what you're after ?
flush();
wait(5); // I think wait() is in seconds
echo "blah";
-Original Message-
From: Sebastian [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2003 2:54 PM
To: php list
Subject: [PHP] echo
hello all,
is it possible to delay an echo say by 5 seconds
try this...
for ($i = 0; $i < count($charge); $i++)
{
$c = $charge[$i];
$s = $size[$i];
$sql = "UPDATE products_to_sizes SET surcharge = '$c'
WHERE product_id = '$products_id' AND size_id = '$s'";
mysql_query($sql) or die ("Couldn't update rows".MYSQL_ERROR());
print $sql.'';
}
-Origi
oops, sorry - try this instead
sprintf/printf("%07d", $num)
-Original Message-
From: Boaz Yahav [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2003 8:23 AM
To: Martin Towell; Harry.de; [EMAIL PROTECTED]
Subject: RE: [PHP] Zero Fill -> Number Format
wouldn't thi
try this
$address2 = str_replace("'", "''", $address)
-Original Message-
From: Daniel McCullough [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 1:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] strip single quotes
I'm trying to query the database using a string pulled out of the dat
sprintf/printf("%7d", $num)
-Original Message-
From: Harry.de [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Zero Fill -> Number Format
How can I put out a Zero Fill for numbers
The result should be
$something=26;
echo $something;
So noone has any ideas at all ? Surely not ?
If my question's too vague, please let me know and I'll try to expand on
it...
-Original Message-----
From: Martin Towell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 4:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Getting linu
I've been looking for an answer to this question for ages, but have failed.
Hopefully one of you guys can help.
I'm looking for a way of finding out what the linux server's country is set
to.
I notice there's setlocale(), but I want something more like getlocale(),
which there doesn't seen to be
code snippets would be helpful
-Original Message-
From: Liam Gibbs [mailto:[EMAIL PROTECTED]
Sent: Friday, March 07, 2003 5:07 PM
To: php list
Subject: Re: [PHP] Dollar signs in values
> Escape them with a backslash:
>
> $text = "The amount is \$400.-";
All that does is print \$ in
you'll have to exec() the code
$filename = "test.php";
$handle = fopen ($filename, "r");
$contents = fread ($handle, filesize ($filename));
fclose ($handle);
exec($contents);
see if that works
Martin
> -Original Message-
> From: Paul Cohen [mailto:[EMAIL PROTECTE
when I copy/pasted directly from your email and tried to execute it, I can
an error on line 5 too
I noticed that there's a space at the end of line 5, I deleted it and it
worked fine.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 9
I've been using this:
if (in_array($value, array("foo", "bar", "blah")))
{
// do something
}
but if you want to use a switch/case, I don't know any easier way.
HTH
Martin
> -Original Message-
> From: CF High [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 1:41 PM
> To: [EMAIL
check for leading/trailing spaces
if (trim($view) == "vendor")
HTH
Martin
-Original Message-
From: Peter Gumbrell [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 07, 2003 3:07 PM
To: Php-General
Subject: [PHP] problems with ==?
In the following code
$view = $HTTP_GET_VARS[view];
pri
if it's just the string after the ? then use $QUERY_STRING
can't remember which $_* variable it's under...
HTH
> -Original Message-
> From: Simon Angell [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 4:50 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] ? in URLS.
>
>
> Ok, i
Hi Martin
Post some code snippets and the resultant output for us to look at
Martin (To confuse things )
> -Original Message-
> From: martin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 21, 2003 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] getting green screen
>
>
> Hi,
> I'
argh! eval()
try this instead: $temp = ${"php_q3_$i"};
to get it directly from $HTTP_POST_VARS: $temp =
$HTTP_POST_VARS["php_q3_$i"];
simple
HTH
Martin
-Original Message-
From: Alexey Lysenkov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 6:08 AM
To: [EMAIL PROTECTED]
Subje
delivered to:
>
> php-list,emc (The name was not found at the remote site. Check that the
> name has been entered correctly.)
>
> -Original Message-
> From: Martin Towell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 10:02 PM
> To: Php-Ge
na! didn't work :)
-Original Message-
From: Roger Lewis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 4:59 PM
To: Php-General
Subject: [PHP] test
This is a test.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
_TRANSLATED"]
HTH
Martin
-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 3:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Where am I?
No, I've been looking all day. I can get the information is I run the script
from the root, but what
try doing a phpinfo() , somewhere in there it'll tell you
Martin
-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 2:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Where am I?
I'm using PHP 4.0.6. I am developing on Win98SE, and deployed on an Apach
Greg
"Andy Turegano" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Well, what do you want them to do?
>
>
> On Wed, 18 Dec 2002, Martin Towell wrote:
>
> > the only other way I know is to use: $output = `$cmd`; (ie, bac
the only other way I know is to use: $output = `$cmd`; (ie, backticks)
-Original Message-
From: Greg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 1:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php / unix functions
Hi-
Is there a built in way, besides using exec and system
>From this error
Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on line 0
It looks like you'll have to change php.ini to have session.save_path point
to a valid path. Maybe \temp\ ?
HTH
Martin
-Origina
you didn't send the code snippet for "Undefined index"
however, I think the reason you're getting these errors at home is because
you have a different error_reporting level.
HTH a bit
Martin
[snip]
//filled out info and clicked send.
Notice: Undefined index: license in c:\inetpub\wwwroo
Looks good to me, but as Peter said, see if you really are getting something
in ['img']
try print_r($row) or var_dump($row) to make sure
-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:01 AM
To: Martin Towell
Subject: RE: [P
can you post some more of your code? I think, if it's not too big, the
entire while loops
Martin
-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] select * From
Hi,
Am just a newbie at this
no, no way to disable and no variable to say a refresh happened
one way to get around it is to submit to the page that does the update, then
get that page to do a header("location...") to another page. When the user
refreshes, they'll only refresh the last page, and not the updating page.
HTH
Mar
try these: ImageCopy*()
-Original Message-
From: Eric Pierce [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 2:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] inserting preexisting image inside dynamic image
Hi there...
Just wondering... when creating a dynamic image, is
there a w
>
(B>Message-ID: <[EMAIL PROTECTED]>
(B>References: <[EMAIL PROTECTED]>
(B>
(B>"Joseph Szobody" <[EMAIL PROTECTED]> wrote:
(B>>Actually, it still won't work under Windows.
(B>> Even on a pop-up window, you can right click,
(B>> view properties, copy the page address, open
(B>> a new browse
you've got it in the subject line
http://www.php.net/manual/en/function.number-format.php
-Original Message-
From: Michael P. Carel [mailto:mikecarel@;teamglac.com]
Sent: Thursday, November 14, 2002 9:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] number format
Hi to all;
Is there any php f
you could break out into the shell and do
rm $dir/*(rm -r $dir/* if there's directories too)
(or del $dir/*.* for dos)
or use opendir, readdir, closedir to read the directory's content and use
unlink to delete the file(s)
(if $dir is not hardcoded, I can see a security hole he
what is the technical difference between using
else if
and
elseif
??
Are they interpretted the same internally?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I remember reading somewhere (can't remember where though, maybe the php.net
web site??) that if you use $this in a constructor (or any methods the
constuctor calls), then you should instantiate the object using &new
otherwise you get a copy of the object that's just been created and not the
actual
sounds like a browser caching problem to me
dunno if that helps though :/
-Original Message-
From: Robbert van Andel [mailto:robbert@;vafam.com]
Sent: Friday, November 08, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Graphics question
I have created a webpage that builds a table and
use substr($str, 0, 1000)
-Original Message-
From: Håkan [mailto:hw2k@;barrysworld.com]
Sent: Friday, November 08, 2002 12:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to limit chars?
Let's say I have a text field in my mysql database, and a where I
write whatever, and I want to limit
CAUTION: It's not reliable
you can use $HTTP_REFERER
(or, I think's it's under $_SERVER, $_SERVER["HTTP_REFERER"])
-Original Message-
From: William Holroyd [mailto:w.holroyd@;versity-cobalt.com]
Sent: Thursday, November 07, 2002 12:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Code help
I
you can refer to form elements by:
document.forms["formname"].elements["elementname"]
so you could use:
document.forms["entryform"].elements["select02[]"]
-Original Message-
From: Mack [mailto:mplescano2000@;yahoo.com]
Sent: Tuesday, November 05, 2002 12:30 AM
To: [EMAIL PROTECTED]
Subject
FYI: 'global' is two way
eg:
will work.
-Original Message-
From: Justin French [mailto:justin@;indent.com.au]
Sent: Wednesday, November 06, 2002 11:49 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] function()
Doesn't 'global' only get variables from outside the function into it OP
(
what about str_replace(",", "", $str) before you pass the value to
number_format()?
-Original Message-
From: [EMAIL PROTECTED] [mailto:ed@;home.homes2see.com]
Sent: Friday, November 01, 2002 9:37 AM
To: Jay Blanchard
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] number_format question
Tried
have a look at number_format()
-Original Message-
From: Andrew Wilson [mailto:will@;netwaynetworks.com.au]
Sent: Wednesday, October 30, 2002 3:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Decimal Places
Hay guys,
I have two variables ( integers ) that are being minused one from the other
If you need to use variables that are stored in the object, then use
$this->jk();
If you're calling bar::do_something(); then $this wont be set, so you'll
need to use foo::jk() instead.
If you're calling jk() from an object, and you don't need to use any object
attributes, then either way would
from the client end, you can't
from the server end, you can use curl.
HTH
Martin
-Original Message-
From: Chris Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 02, 2002 3:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to send POST info without a form?
I have a single php fil
This is what you're really after - quoting the index
-Original Message-
From: Pablo Oliva [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 1:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] error notice - valid code
Notice: Use of undefined constant year - assumed 'year' in
c:\ap
I was running PHP on Win95 (for local stuff) and now Win98, using OmniHTTPd
for the server. It works great. I've recently upgraded to XP Pro (I know -
it's taken me ages, but what the heck) and it's still working great.
-Original Message-
From: Philip J. Newman [mailto:[EMAIL PROTECTED]]
If you've seen a serialised variable a few times, you get to know how one is
set up and how to interpret it. If you're using serialised variables, I'd
suggest serialising a few simple ones and see what the output looks like so
that you can see when things are going amiss.
This is one way that I d
if you seed it with unix time then you'll alway be seeding with something
different
in most cases, the random numbers that are generated will be random enough
just my AU2c worth
Martin
-Original Message-
From: lallous [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 13, 2002 6:51 PM
To
it if use html but
how bout command swf_setframe(void) or swf_getframe(void) ???
-Original Message-----
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 11:02 AM
To: '[EMAIL PROTECTED]'; Milist PHP
Subject: RE: [PHP] frame
this is more of an H
> > $result = mysql_query(...);
> while( $t = mysql_fetch_row($result) ){
> $array[] = $t;
> }
>
> No. I need a 2 dimensions arrays, each line of this array, is the result
> of one row of the query and each cell of this row is a field from the
> select.
>
> Example, the query return
I'm not totally familiar with mySql, but if I remember correctly, you can
get each row (one at a time) back as an (1D) array. All you need to do is
append that array onto the end of your dataset array and, bob's your uncle,
you have a 2D array full with your dataset
HTH
Martin
-Original Mess
basing my code on yours:
$i = 0; $cols = 3;
while (list($FirstName, $LastName) = mysql_fetch_row($result))
{
if ($i % $cols == 0) echo "";
echo "$FirstName $LastName";
if ($i % $cols == $cols - 1) echo "";
$i++;
}
// clean up table...
if
set a hidden form element to be the referring page url, then use that to
redirect the user
eg:
then use: header("location: $myReferer");
remember, also, that $_SERVER['HTTP_REFERER'] is not always set, so you'll
need to cater for that
Martin
-Original Message-
From: Jiaqing Wang [mail
could you change the "<" to "<" or "%3C" or something similar?
-Original Message-
From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 1:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] XML Parser Question
I've been reading the XML parser documention, and I'm no
this is more of an HTML question. You'll probably be wanting to look at
and
-Original Message-
From: dinnie [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 12:59 PM
To: Milist PHP
Subject: [PHP] frame
hi all,
sorry for disturb all of u for a while...
there's anyone can
ld be null, "", or "foobar", it doesn't matter, $zip will = $var3
Martin
-Original Message-
From: Shane [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 10:22 AM
To: Martin Towell; [EMAIL PROTECTED]
Subject: RE: [PHP] Easy Function Question?
Martin, so
function myFunction($name, $phone, $zip=""){
echo $name.$phone.$zip
}
is the corrent format, but if you call it like this:
myFunction("name", "phone", null);
then $zip will equal null, not ""
something like this might help
function myFunction($name, $phone, $zip=""){
if (!$zip)
If I remember correctly
__FILE__ contains the current file name of the script
__LINE__ contails the current line number in the script
__PATH__ contains the path to the current script
HTH
Martin
-Original Message-
From: Alex Shi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 20
Try adding curly braces around the var name, like this:
for($i=0; $imailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 9:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Confusing array question ...
Hi, I have 1 primary array called $item containing 20 values each of whose
value is part of
it's best done in sql using "select count(*)"
but can be done in php by looping through the result set
-Original Message-
From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:58 PM
To: PHP General
Subject: [PHP] Count in PHP
I am wanting to do a count i
Have you checked the $_POST (or $HTTP_POST_VAR) variable to make sure it IS
using GET?
Martin
-Original Message-
From: Jed Verity [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 3:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] IE won't post on Windows, but will on Mac
Hello,
Hi Martin
You can also do this
HTH
Martin :)
-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 11:24 AM
To: Martin Thoma
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] How to escape " in hidden field?
Hi,
Monday, September 2, 2002, 7:59:
try this
ereg("^[a-zA-Z0-9:]*$",$string)
all your's is doing is looking for any char in $string that's a-z or A-Z or
0-9 or :
instead of all chars, from start to end, being them
-Original Message-
From: Adam Alkins [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 3:20 PM
To: PHP
t; > Ok so how do I sum up an entire column in my db?
> > For example if one row is : 1 , the next is 2, and the next is 1 - I
need
> to
> > have a total of 4 and the be able to divide by the num_rows
> >
> > The problem I ma having is the "inside" row addit
if you have each filename on a new line, then use file() to grab the
contents. It returns an array, each line is an element in the array. You can
then do what you want with the array
HTH
Martin
-Original Message-
From: stu9820 [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 1:0
just sum them up and divide by the count - making sure to deal with a count
of zero
-Original Message-
From: JohnP [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 10:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Average Number For Math Functions
Ok I looked at all the math functio
replace "xxx" with the row number for your id field
when it gets to php, the index of $cbox will be the id from the database,
just use:
foreach ($cbox as $id=>$dummy)
to loop through the array
HTH
Martin
-Original Message-
From: Brian & Shannon Windsor [mailto:[EMAIL PROTECTED]]
Sen
http://www.php.net/manual/en/function.usort.php
-Original Message-
From: Ben [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 11:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Sorting a multi-dimensional array
I have looked at array_multisort, asort, etc. NONE of them do what I n
str_repeat()
-Original Message-
From: Saci [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 1:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Replicate string or something similar
In ASP I use the expression myvar = string(254,"A")
to have a var filled with 254 characters 'A'
try this:
-> $sqlcom="select count(codigo) as cnt from comments where codigo=$id";
$resultadocom = mysql_db_query ("database",$sqlcom);
$registocom = mysql_fetch_array($resultadocom);
-> $contador = $registocom["cnt"];
print("comentarios= $contador");
the lines marked with -> are t
oops again, please ignore my last two posts :(
-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:38 PM
To: 'Pafo'; [EMAIL PROTECTED]
Subject: RE: [PHP] php string match problem
oh, just realised, one of them needs to go below
oh, just realised, one of them needs to go below the "else" line, to end the
"while" loop
-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:37 PM
To: 'Pafo'; [EMAIL PROTECTED]
Subject: RE: [PHP] php string
You've got too many closing braces...
if ($temp == $temp2) {
$ierror = "Loginnamnet är redan upptaget!" . $ierror; } <--- Here's
one
} <--- Here's
the other
} else { print "error"; } <--- And a
third
set_time_limit()
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 12:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Resetting the timeout
On Monday 19 August 2002 10:06, Mike Mannakee wrote:
> Is there any way to set the timeout (max length of
you've got a ";" after the if
IF (!$accion); {
should be
IF (!$accion) {
-Original Message-
From: ::: Flavio Bastos Amiel::> [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 4:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] anyone can help?
this is not functional and i dont k
use C and fork()
php (AFAIK) can't do parallel programming
-Original Message-
From: NoWhErEMan [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 12:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Open 10 http connections in parallel
Hello,
I had to write a script to open 10 http co
One option is the Zend Encoder
Martin
-Original Message-
From: YC Nyon [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 02, 2002 2:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Protect PHP coding
Is there any method to encrypt PHP files.
Nyon
--
PHP General Mailing List (http://www.php
To add to this - you should place critical information (like passwords, etc)
outside the document root. That way, even if the server is mis-configured,
others wont be able to easily gain access to those files
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, A
Split() chops up the string (param #2) according to param #1 (in this case,
space is the delimiter). Param #3 says, don't chop more than two bits. It
then returns an array
list() assigns $arr[0] to the first variable, $arr[1] to the second, etc.
HTH
Martin
-Original Message-
From: Manta
You'll need to find out how to convert from RGB to HSV
Then all you need to do is look at the hue and fiddle with that.
Sorry I can't be any more help than that, because I don't know what the
maths is to convert from one colour space to the other :( But this should
be a start
HTH
Martin
Can you post/send the results of doing a print_r() on the first page (the
one that's serialising) and the results of the serialize()?
-Original Message-
From: DoL [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 2:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] passing arrays between
The best way to become proficient in programming (or anything, come to that)
is with _lots_ of practice.
In the case of programming, looking at other ppl's code might help you find
new ways of thinking that you'll be able to use at a later stage.
Personally, I don't bog myself down in code from
Is this a direct copy from your code?
> echo $_GET['modo']." echo $_GET['color']." echo $_GET['size']." tags
see if that helps
Martin
-Original Message-
From: Saci [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 6:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] passing variable via
I don't think you'll be able to o this directly with PHP, unless you know
the file format of an .xls file...
You might be able to use COM somehow (??)
Might be easier for the user to save the spreadsheet out as a CSV first
Martin
-Original Message-
From: Jason Caldwell [mailto:[EMAIL
You'll have to check that the results you get back from the database
actually contains something before you echo anything out.
Another way would be something like this
$numcols = 2;
$counter = 0;
while (($results = mysql_results(...)) !== false) // haven't used mysql,
so you'll have to fix t
REGEX is short for "Regular Expressions"
It gives you a "smarter" way to manupulate strings.
The PHP manual has some good docs on reg.ex. - see section LXXXIV and LXXXVI
HTH
Martin
-Original Message-
From: Lord Loh. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 5:07 PM
To: [EM
1. Take out the @ before fopen(), this may shed some light on your problem
2. What does "/home/blurredv/data/".$username."Contact.txt" expand out to
actually be?
3. Does the script have write access to the directory/file?
-Original Message-
From: Chris Carlson [mailto:[EMAIL PROTECTED]]
S
try changing these two lines
$num_rows = mysql_num_rows($result);
$num_cols = 2;
to this
$num_cols = 2;
$num_rows = mysql_num_rows($result) / $num_cols;
this isn't the full solution, but will help you on your way...
HTH
Martin
-Original Message-
From: César Aracena [mailto:[EMAIL PRO
You'll prob. need to use the (+) to join
like this
SELECT grp.grpdescrip, grp.grp, grp.createcust, grp.auth1, grp.auth2,
usergrp.userid, users.userdescrip
FROM grp, usergrp, users
WHERE grp.grp = usergrp.grp (+)
AND usergrp.userid=users.userid (+)
ORDER BY grp.grp
-Original Message-
From
you could use: printf("%02d", ++$Num);
or if you want to put it back into $Num, use the sprintf() version
-Original Message-
From: vins [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 25, 2002 10:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Numbers with leading zero...
Hi.
I've got this
This should work
$object = new $classname;
Martin
-Original Message-
From: Michiel ten Hagen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:17 PM
To: 'Mathieu Dumoulin'
Cc: [EMAIL PROTECTED]
Subject: [PHP] RE: create object from variable class.
Thx for quick reply
use the auto_append or auto_prepend directives in the php.ini file
-Original Message-
From: Dave at Sinewaves.net [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 1:48 PM
To: PHPlist
Subject: [PHP] Banner Ad Serving...
Is there any way of automatically adding a certain bit of c
Try this:
function do_mod_10($num)
{
// The Luhn formula works right to left, so reverse the number.
$num = strrev($num);
$total = 0;
for ($i = 0, $j = 1; $i < strlen($num); $i++, $j=3-$j)
{
$digit = $num[$i] * $j;
if ($digit > 9) $digit -= 9;
$total +=
I'm thinking that you need to remove the:
$contents = fread($filename, 100);
line. This is probably making the file pointer point to the end of the file.
-Original Message-
From: Jason Soza [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:17 PM
To: David Robley; [EMAIL PRO
I think the proper way of sending an ampersand is to use &
-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Passing Special Characters In url
Hi,
I am having problems passing variables in a url specifica
cally, the
first time, without data in the field...it works fine and the is not
displayed, but when I add data back into the field, nothing changes...its
like it does not recognize that something is back in the field. I did a
commit on the db each time, and cleared the browser cache, etc.
Mark
using header() should work if you don't output anything before it. If you
can restructure your code so that you can remove any output until after the
header(), then that'd be the way to go.
You said the meta refresh didn't work - did you get the syntax right? Since
I don't use it much, it's one o
what about
if (strlen($result["FLRPLAN_3"]) > 0)
-Original Message-
From: markbm [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 2:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Problem with Not displaying HTML if data not found
I am trying to develop a page that, in certain pla
As Demitrious said, use mysql to do it.
But if you want to use php, just use substr(), since all the numbers are
there, there's no point converting to unix time, just to convert it back
again... unless you're going to do some maths of it
-Original Message-
From: Demitrious S. Kelly [mail
I remember from a previous post, the dot operator will create a temporary
string in memory, and then echo that out. The comma operator will just
output as it goes - ie. it doesn't create a temporary string.
As for Lee Doolan's reply:
echo "{$obj->strName[$i]}";
interesting - never thought of d
$string = str_replace(" ", ",", $string);
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 4:57 PM
To: php-general
Subject: [PHP] separated string by comas
I have a string that is separated by spaces like this
$string="test test1 test2 t
either use curl, and set to option to return the results to you to on
or use ob_start(), ob_get_contents(), etc
-Original Message-
From: Dominic [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 4:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] automatic credit card processing
Hi all
I
Doesn't look like anyone has replied to you on the php-general mailing list.
Have a look at this page
http://www.wotsit.org/search.asp?s=graphics
some of the docs there might help you
HTH
Martin
-Original Message-
From: Georgie Casey [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 200
101 - 200 of 701 matches
Mail list logo