In case anyone wants to get a neat Pocket PHP Reference and help contribute
to the Red Cross fund for Hurricane Katrina relief:
http://www.phparch.com/rcrs
Thanks!
Marco
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 8/24/05 11:39 AM, "Pablo Gosse" <[EMAIL PROTECTED]> wrote:
> Can anyone give any insight into what might be going wrong here?
I think you just need to move your php.ini file to C:\WINDOWS... PHP is
looking for it there.
Cheers,
Marco
--
PHP General Mailing List (http://www.php.net/)
To u
On 8/17/05 11:08 AM, "Alex Gemmell" <[EMAIL PROTECTED]> wrote:
> Blimey! I'm not a regular to these lists so I certainly didn't expect
> replies from two names I recognise and respect from my years of
> trawling the internet for valuable PHP and CSS information!
:)
> The books you both recomm
Hello Alex
On 8/17/05 9:33 AM, "Alex Gemmell" <[EMAIL PROTECTED]> wrote:
> Can anyone recommend some books that describe:
> - how to plan OO projects (PHP specific would be good but isn't necessary)
http://www.amazon.com/exec/obidos/tg/detail/-/1590593804/qid=1124289801/sr=8
-4/ref=pd_bbs_4/103-
On 8/13/05 5:31 PM, "Jochem Maas" <[EMAIL PROTECTED]> wrote:
> if you haven't seen it yet and are interested in the future
> of php you might be interested in the _big_ thread on php-internals
> that starts with the message:
>
> http://www.manucorp.com/archives/internals/200508/msg00398.php
>
M
On 8/9/05 10:30 PM, "Wee Keat" <[EMAIL PROTECTED]> wrote:
> Hi Marco,
>
> Thanks for taking the time to answer my questions.
>
> Marco Tabini wrote:
>> That's been discussed a few times on the list. For example:
>>
>> http://beeblex.com/
PHP 4 requires you to use a
userland library like the one provided by PEAR:
http://pear.php.net/package/soap/redirected
Cheers,
Marco
--
Marco Tabini
President & CEO
Marco Tabini & Associates, Inc.
28 Bombay Ave.
Toronto, ON M3H 1B7
Canada
Phone: +1 (416) 630-6202
Fax: +1 (416) 630-50
erver_port as 80. Please assist.
>
>
> Thanks.
>
>
> PHPInfo:
> ---
> Apache-AdvancedExtranetServer/2.0.50
> Mandrakelinux/7.2.101mdk
> mod_ssl/2.0.50
> OpenSSL/0.9.7d
> PHP/4.3.8
>
--
Marco Tabini
President & CEO
Marco Tabini & Associates, I
hp');
>>> My question is this, I'm trying to find out
>>> how the class $CGF was initiated.There are no
>>> include or require statement before the statement.
>>> Is $CFG a global variable? If how does it get
>>> initiated?
>>> Tnaks.
>
Hey Terry--
On 8/7/05 11:03 AM, "Terry Romine" <[EMAIL PROTECTED]> wrote:
>
> Any ideas on what flag may need to be set and how to do it on a file-
> by-file basis so I am only tweaking it when testing?
>
> Terry
Does your hosting provider support .htaccess? If so, you may be able to
change th
Hey Gregory--
On 8/7/05 12:05 PM, "Gregory Machin" <[EMAIL PROTECTED]> wrote:
> Hi
> Please advise.
>
There was a thread on our forums a while back and one of my colleagues
posted a variant of the code we use for our menus, so maybe this will help
you:
http://www.phparch.com/discuss/index.php/
On 8/5/05 3:24 PM, "Jochem Maas" <[EMAIL PROTECTED]> wrote:
> SIDENOTE REGARDING BEEBLEX.COM:
>
> I just added a bookmark in firefox to beeblex.com as follows
>
> http://beeblex.com/search.php?d=ALLDB&s=%s
> and I gave it a keyword of 'beeb'
>
> now I can go to firefox and type 'beeb HTTPS' to g
On 8/5/05 2:43 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Thanks Marco!
> :)
>
> I was looking for something like this on phpinfo() but didn't found?
That's because it shows up only if you are under HTTPS! :-)
Marco
>
>
> -afan
Hello Lance--
On 8/5/05 2:18 PM, "Lance Earl" <[EMAIL PROTECTED]> wrote:
> I recently upgraded my server. It is running Ubuntu Linux with PHP and
> MySQL. My site allows people to post content to their own web oages
> through a web interface. Many of my customers compose their content on a
> word
IIRC, if you're using Apache you can check
If (isset ($_SERVER['HTTPS']))
You can also check this thread:
http://beeblex.com/lists/index.php/php.general/190410?h=%24_SERVER%5B%27HTTP
S%27%5D
--
BeebleX - The PHP Search Engine
http://beeblex.com
On 8/5/05 2:05 PM, "[EMAIL PROTECTED]" <[EMAIL PR
e running the regex.
Marco
> now if they enter more carriage returns i get the results from above.
> its no big deal, but you always have someone trying to 'break' the system.
>
> thanks, i really need to learn some regexp.
>
> Marco Tabini wrote:
>
>> Try
Try changing the
\n*
patterns to
(?:\r?\n)*
Cheers,
Marco
--
BeebleX - The PHP Search Engine
http://beeblex.com
On 8/4/05 10:39 AM, "Sebastian" <[EMAIL PROTECTED]> wrote:
>>> [quote=user]
>>> foo
>>> [/quote]
>>>
>>>
>>>
>>> more text...
--
PHP General Mailing List (http://www.php.n
Don't know much about the app you're writing, but does this do the trick for
you?
echo preg_replace ('!
(
\[quote
(?:=[^\]]*)?
\]
)# Capture the [quote=xxx] part
>
>
> Anyone willing to share knowledge or points to articles that try to implement
> event-driven programming in PHP.
>
>
>
> And yes, I know php is not event driven language but I like the approach when
> working with 3 layers patterns.
>
>
>
> Rega
On 7/21/05 8:32 AM, "Regine Velasquez" <[EMAIL PROTECTED]> wrote:
> Whenever I switch the encoding of a page to
> UTF-8, the characters ñ, ë, ì, û, á, etc.,
> automatically changes to question marks. I've
> originally set the encoding of a page to ISO-8859-1 using header () function.
>
> header (
We had a webcast on PHP and Ajax a while back--the recordings are still
available for free at http://blogs.phparch.com/mt/index.php?p=49.
Also you may want to try looking for Ajax here: http://beeblex.com/ajax
(it's a new search engine I just put online, so I thought I'd take the
opportunity for s
You can--you need to check the signature of the visiting client and
determine whether it is a spider (for example, Google indexers are called
"googlebot"s). This is in $_SERVER['HTTP_USER_AGENT']. Here's a thread on
the subject:
http://news.php.net/php.general/217460
You can also use the browscap
It can't -- that looks like some leftover debugging code to me.
Marco
On 7/9/05 10:50 AM, "Sam Smith" <[EMAIL PROTECTED]> wrote:
>
> I have some code that I barrowed that works but I don't get how it could
> possible work, obviously I don't understand how "false" works:
>
> How can this ever
On 7/3/05 1:33 AM, "Tom Rogers" <[EMAIL PROTECTED]> wrote:
> function dollars2cents($value){
> $value = sprintf("%0.2f",trim($value));
> list($a,$b) = explode('.',$value);
> if(floatval($value)<0) $b = $b*-1; //negative amount?
> return intval($a)*100 + intval($b);
> }
Have you tried
Manuel Lemos wrote:
Hello,
On 10/07/2004 09:24 AM, Marco Tabini wrote:
Finally, you will need a fast mailing mechanism. mail() is not your
only option--you can interface directly with any mailer through SMTP
or pipes, for example--but in my experience, you don't need to go any
further to
gs
significantly and can also interface directly with a fast MTA like qmail.
We use a combination of these techniques to send out tens of thousands
of notifications once every month, and never had a problem with it.
HTH,
Marco Tabini
--
php|architect
The PHP Magazine for PHP Professiona
> Is there a preg to find a "?" in a string since a "?" is used for
> calculations as I see it.
>
You just need to escape it with a backslash, e.g. \?
Good luck,
Marco
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I guess the simplest would be to use preg_match_all on
'//i'
Assuming that all your links are in that format, this will extract all the
contents of the href portion of the links in your string. There was a regex
series on our magazine that also covered more complex examples of this kind.
Cheers
That means "the current directory"
Cheers,
Marco
--
php|architect - The Magazine for PHP Professionals
Try us free at http://www.phparch.com!
Complete searchable PHP mailing list archives at
http://www.phparch.com/mailinglists
[EMAIL PROTECTED] wrote:
bit of a random thought I need answering
This may help:
http://phparch.com/issue.php?mid=9
... and it's even a free issue :)
Marco
--
php|architect - The Magazine for PHP Professionals
Try us free at http://www.phparch.com!
Complete searchable PHP mailing list archives at
http://www.phparch.com/mailinglists
Becoming Digital wrote:
Hey--
Maybe this will help:
http://www.phparch.com/mailinglists/msg.php?a=557061
Cheers,
Marco
Fredrik wrote:
Hi
I want to get the last date in a week.
Is there anybody who know how i can do this.
something like this:
function date getDateFromWeek( $week, $year){
...
...
return d
Depends on how your overall network is configured. If the server on
which PHP is running is on the same internal network as the printer,
then the short answer is yes--the way you implement it depends on which
OS your system is running. If PHP is running on Windows, there is a
subset of printing
Chris Shiflett wrote:
I currently design, develop, and maintain a suite of Web applications and
utilities that receive ten million hits a day, and my experience has shown
that the number one thing you can do to make the biggest difference is to
limit the number of times you need to hit the database
Probably because nobody wants to risk offending John--or (more likely)
because no one will admit knowing who the "other" John Holmes is ;-)
Cheers,
Marco
--
php|architect - The Magazine for PHP Professionals
Try us free at http://www.phparch.com!
Complete searchable PHP
Filip de Waard wrote:
Hi,
There are many great websites, for instance:
http://www.phpdeveloper.org
http://www.phpbuilder.com
http://www.devshed.com
http://www.phpnoise.com/
Shameless self-promotional plug of the day:
And also don't forget php|architect (http://www.phparch.com), a magazine
dedic
I'm not sure if you've considered this possibility--but can't you send
the messages to one recipient at a time? This way, the problem wouldn't
present itself, and the end result would be quite the same (with the
added bonus of not having to disclose your entire mailing list to each
recipient).
Hello Chuck--
You can use a number of PHP functions, such as shell_exec and passthru,
which will run an external app and return its result either in a
variable or directly to the output. Some more info regarding this
specific problem (and a script) here:
http://www.phparch.com/mailinglists/msg
t we can muster from the list itself will certainly help ;-)
Cheers
Marco
Richard Baskett wrote:
on 10/22/03 13:32, David T-G at [EMAIL PROTECTED] wrote:
Richard, et al --
...and then Richard Baskett said...
%
% on 10/21/03 16:40, David T-G at [EMAIL PROTECTED] wrote:
%
% > ...and
Joseph Bannon wrote:
I think it's the responsibility of whomever is holding the key (ie, the
username and password). When a user logs into my site, I put their
username and password in a cookie. I then check those cookies to allow
them access to membership only parts of the site. It is thus their
r
Actually it's more like the bank storing your money in a safe with glass
walls.
Sure the bank "stored" it, and stored it "securely" (it was behind glass
wasn't it?) but someone could easily break the glass and steal all the
money.
The argument from the customer would be "The company I put my trust
Chris Shiflett wrote:
--- Marco Tabini <[EMAIL PROTECTED]> wrote:
However, we do not share the contents of our cookies with any third
party, under any circumstances.
I'm no lawyer, but that seems like a risky statement. There are many
circumstances that can cause the contents of the
We use a standard disclaimer:
2. Use of Cookies
Like many websites, we use cookies to maintain certain information about
you while you are visiting our website. However, we do not share the
contents of our cookies with any third party, under any circumstances.
Should we allow a third party to p
Interesting thoughts... who would handle the separate list, though?
Marco
[EMAIL PROTECTED] wrote:
Marco Tabini wrote:
The problem is that the results should be mailed to the
list so that others could tell whether they satisfy the question, but
I'm afraid that would become annoying.
Perh
Robert Cummings wrote:
I think this is great but have one bit of hopefully constructive
criticism... the horizontal real estate is too small, or the font is too
large, I find the content wraps terribly :/
Cheers,
Rob.
Hi Rob--
True. Alas, it has to fit in our design, so one of the possibilities
Chris Shiflett wrote:
Perhaps Marco can try an "Ask Jeeves" type of Web app. Is that the sort of
thing you are suggesting?
So, as another feature of this mailing list archive, there could be a place
where people can ask a question, and Ask Marco will try to come up with some
suggested posts to re
- Edwin - wrote:
Sort of a PHP-AI eh? :) Hmm... I don't think that's a bad idea at all,
but...
I wonder how you'd deal with new messages/posts/questions which:
1. Real people don't even understand, and
2. Real posters don't even understand what they're asking.
Well, that's, of course, a problem
I think the idea is splendid (and new, call it DFAQ (dynamic FAQ)) but as a
different service than a mailing list. Challenging?
What did you have in mind exactly? How is the FAQ served?
Marco
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Nice work, if the list admin would add a link to this archive in the footer (or
the header) it would be even useful for new subscribers who don't know of its
existence.
Well, one of my original ideas was to have a process that would monitor
php.general for new messages and send back an e-mail to t
I always have trouble searching for stuff with theaimsgroup archive
as well.
I know what you mean. Google is a good alternative, but they still can't
tell between the word PHP and the extension PHP, so that the results
aren't always relevant...
Cheers,
Marco
--
php|architect - The Magazine f
ll help
you, as well.
Cheers,
Marco Tabini
php|architect
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hey Peter--
If the file is always local and you're using a relatively recent version
of PHP, you can use file_get_contents instead:
http://ca.php.net/file_get_contents
Cheers,
Marco
--
php|architect -- The magazine for PHP professionals
Try us free at http://www.phparch.com
Searchable PHP Ma
On Mon, 2003-07-14 at 15:03, Shawn McKenzie wrote:
> How can I evaluate a var that is from a text field of a database? Example:
>
Hi Shawn--
Have you looked at eval?
http://www.php.net/eval.
Cheers,
Marco
--
php|architect -- The Magazine for PHP Professionals
NOW AVAILABLE IN PRINT! Get y
#
> With best regards !
> Roy Daniel , ST
> IT Application Support & Development Engineer - PT BERCA
> [EMAIL PROTECTED] // [EMAIL PROTECTED]
> ICQNumber : # 103507581 // Phone Cell : 0816-1192832
> ##########
--
Marco Tabini
Pr
Which platform are you running on?
Marco
On Tue, 2003-07-01 at 13:39, Michael A Smith wrote:
> Hey,
>
> Can't figure this out... whenever I try to use any mysql functions or
> anything, I get problems. PHP throws a DNS error... what's up with that?
>
> -Michael
al diffrent versions of PHP before without problems. Has
> anyone had a similar problem ?
>
> TIA,
>
> _________
> Mauricio Cuenca
--
Marco Tabini
President
Marco Tabini & Associates, Inc.
28 Bombay Avenue
Toronto, ON M3H 1B7
Canada
Phone: (416) 630-6202
Fax:
ny images).
>
> There are a number of references that talk about this
> trick if you search on "iframe rpc javascript" in
> google:
>
> http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=iframe+rpc+javascript
>
> You will still get the clicking
ior Executive Web Developer
> Mophus.com, Inc.
>
>
> - Original Message -
> From: "Marco Tabini" <[EMAIL PROTECTED]>
> To: "Stephen" <[EMAIL PROTECTED]>
> Cc: "Jay Blanchard" <[EMAIL PROTECTED]>; "PHP List"
> <[
ickey for each conversation within the chat.
>
> 2. You can disable sounds in a themes thingie, depends on which windoze
> version you own.
>
> HTH!
>
> Jay
>
--
Marco Tabini
President
Marco Tabini & Associates, Inc.
28 Bombay Avenue
Toronto, ON M3H 1B7
Canada
Phone: (416) 630-6202
Fax: (416) 630-5057
Web: http://www.tabini.ca
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hiya Brad--
We published a news item on this a few days ago; there's a free WYSIWYG
editor that works both on IE and Mozilla 1.3 called HTMLArea.
You can find it here:
http://www.interactivetools.com/products/htmlarea/reviews.html
(our news item is at http://phparch.com/newsarchive.php?s=htmlar
You should look at E-xact (http://www.e-xact.com). They have a solution
they call "tagged transactions" that actually replaces the credit card
numbers with "tags" that are only meaningful in the context of your
merchant account. That way, you can let your customers make repeat
purchases without act
On Thu, 2003-03-06 at 23:09, Larry Brown wrote:
> Someone mentioned a facet of version 5 to be expected that I am really
> looking forward to. Does anyone know what the release target date is? I
> didnt see any mention of it on php.net.
Version 5 is still being actively developed (at least as fa
On Mon, 2003-02-17 at 21:44, Nate wrote:
> Does this mean the file was examined by the browser and it determined it was
> too large OR does it have to upload the file temporarily and then check to
> see if its too large?
>
> It sounds like browser would first examine the file before it gets upload
. With all input and
> export going through a web based system.
>
> I have all the information I need but I can't seem to find the right
> formulas to make the calculations.
>
> Thanks again,
>
> Jonathan
--
Marco Tabini
President
Marco Tabini & As
ves an IRR Calculation. Or Internal Rate of Return.
>
> Sorry, I don't think there are any accountants lurking on the list, so
> please explain what the actual calculation for an IRR should be.
>
>
> --
> Greg Donald
> http://destiney.com
--
Marco T
On Mon, 2003-02-17 at 16:44, Jonathan Pitcher wrote:
> We are getting ready to automate a process that was currently done in
> Excel to a Web page.
>
> This process involves an IRR Calculation. Or Internal Rate of Return.
>
> I have looked at PHP.net and spent the last couple hours searching for
t that
first checks the permissions and then, if the user is authorized,
outputs the file to the browser. This way, if the user is not authorized
to download a file, it will be blocked. Obviously, the files themselves
should be inaccessible to the web *except* through your scripts.
Hope it's a
On Sat, 2003-02-15 at 11:13, Michael Mulligan wrote:
> If the user knew the actual URL of the image though, wouldn't they be able
> to get around a script like this by simply typing it into their web browser?
>
> Thanks! :-)
Only if you let them. The PHP script allows to put the appropriate
check
On Sat, 2003-02-15 at 11:00, Michael Mulligan wrote:
> Hi
>
> I have a bit of a problem which might just be due to my lack of knowledge
> with Apache. Basically, what I want to do is to *not* allow users to enter
> particular URLs in their browser (namely to *.jpg and *.xml files under a
> particu
On Sat, 2003-02-15 at 09:01, Malcolm wrote:
> Hello,
>
> I've been fooling with this for a few days now.
> I'm getting a hearders already sent error.
> I know it means I've got output before the header but
> I can't figure how else to do this.
Hi Malcom--
Looks like you are outputting data ri
Don't apologize... pass the job offers around instead ;-)
My Evolution has decided that I don't have a Calendar anymore. No matter
how hard I try. *sigh*
Cheers,
Marco
On Mon, 2003-01-20 at 13:53, Ray Hunter wrote:
> I apologize everyone...evolution is going crazy...
>
> R
On Thu, 2003-01-16 at 16:10, Rodney Green wrote:
> Just curious. What is an 837?
I'm curious, too... what is it?
Not a good start, if you were hoping to get an answer eh? :-)))
Marco
--
php|architect - The Monthly Magazine for PHP Professionals
Come check us out on the web at h
On Wed, 2003-01-15 at 09:36, Leon Mergen wrote:
> Somebody correct me if I'm wrong, but from what I know is that when using
> shared it is compiled as a shared object and only loaded when needed. This
> decreases ram usage (which is good) , but increases load (which is bad) .
AFAIK, you should use
dnesday, January 08, 2003 9:32 AM
To: Bruce Levick; 'Marco Tabini'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] restrictions
In windowsxp do the following:
Start -> Run
Open: cmd
At the shell type:
telnet x.x.x.x 25< x.x.x.x being the smtp server
If you get a prompt then yo
Professionals
Come check us out on the web at http://www.phparch.com!
--- Begin Message ---
Well I can't be totally sure but I think all outgoing mail points to an
external SMTP server.
-Original Message-
From: Marco Tabini [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 9:11
Hello Bruce--
That depends on what restrictions are imposed on your box, of course.
Does your company use an SMTP-compatible mail server for your internal
mail? If so, you could use the server your mail client points to to
perform your tests.
Cheers,
Marco
--
php|architect - T
Hi Chris--
Try this:
0)
{
$kbitsout = float) $data['OctetsOut'] - $olddata['OctetsOut']) /
($data['UnixTime'] - $olddata['UnixTime'])) * 8 ) / 1000;
print str_pad ($i, 2, ' ', STR_PAD_LEFT) . ' -- ' . number_format
($kbitsout, 2) . " kbits/s\n";
Check the header() function--you want header ("Location:
http://www.xyz.com";). It has to be outputted before any other output.
Cheers,
Marco
--
php|architect - The Monthly Magazine for PHP Professionals
Come check us out on the web at http://www.phparch.com!
--- Begin Message
Nope--it's a bit more complicated than that. However, there are a number
of classes out there that can help you out with that.
Cheers,
Marco
--
php|architect - The Monthly Magazine for PHP Professionals
Come check us out on the web at http://www.phparch.com!
--- Begin Message
Chris--
On my system, the function works as expected (at least as I understand
it): myFunc receives the parameters "Hello!" and array("this"=>"that"),
which is what you pass to it in the first place. Were you expecting it
to expand $myArrayVar into individual parameters? If so, that's not how
it w
You should be able to insert a hidden field in your form and that check
against that in your PHP script to determine which (if any) of your form
was submitted:
in your script:
--- Begin Message ---
Hi all,
I have an update page that has a form in it.
However, I want to add another fo
ut on the web at http://www.phparch.com!
--- Begin Message ---
Thanks Marco,
So I would just create the .rtf file with php, then store it on the server
and attach it to the e-mail?
Thanks,
Eddie
-Original Message-
From: Marco Tabini [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2
My guess is that your best bet is creating either an HTML or RTF
documents, both of which are readable by MS Word. RTF is well documented
and it should be fairly easy to work with--you can save a template with
placeholders and simply replace them, since it's entirely text-based.
Cheers,
Marco
--
I'm not sure how MySQL works under Windows, but you should either use
double backslashes (\\) instead of single backslashes or use forward
slashes (/) instead. MySQL is trying to escape your string.
Cheers,
Marco
--
php|architect - The Magazine for PHP Professionals
The monthly mag
Hello Micah--
Yes, PHP supports multiple selections, but you need to change the name
of the control from submitID to submitID[], so that it will become an
array once inside your script.
Hope this helps!
Marco
--
php|architect - The Magazine for PHP Professionals
The monthly magazi
I don't think you can use strtotime in that case. However, assuming that
your data is properly formatted every time, you can use a simple
function like this (I'm doing it from memory, so it might not actually
work):
Hope this helps.
Cheers,
Marco
--
php|architect - The Magazine
ctable rate, with the same basic number of records added each day.
I should have said records, instead of objects. (too many sessions with
crAccess, too little time talking to real people about databases)
Now... would you spell that querys or queries?
Marco Tabini wrote:
>
> Well, then, ass
is running 260
queries on 2600 lines of code.
Marco Tabini wrote:
>
> IMHO it depends on the amount of operations you have to perform on your
> rows. If manipulating 2,600 rows takes several seconds, then either
> you're performing some really complicated data manipulation
IMHO it depends on the amount of operations you have to perform on your
rows. If manipulating 2,600 rows takes several seconds, then either
you're performing some really complicated data manipulation or your db
could use some optimization. I have an application that manipulates
~150,000 rows on a P
This is a bit crude but should work:
Note that I made a bunch of assumptions here--that the data is always
properly formatted, that there is only one record in the $data, and that
you will later manipulate the key names so that they will actually work
as database columns. Still, this way you can
Yes, but my example was geared towards trying to work through a more
generic scenario. I'll bet if you try using perl regex with callback
it'll be even faster.
Marco
--
php|architect - The magazine for PHP Professionals
The monthly worldwide magazine dedicated to PHP programmers
Co
John,
I'm not sure this will work if there is more than one space between
words.
Also, my previous example won't work if there are duplicate words
(although it's easy to make an array out of each word and solve the
problem), nor if the words are delimited by any character other than
spaces, in wh
You could use strpos--there are easier ways if you don't need the
offsets.
Example:
This is from memory, but it looks like it should work even for weird
strings like the one above.
Cheers,
Marco
--
php|architect - The magazine for PHP Professionals
The monthly worldwide magazin
In Unix you need to specify the working folder when you are launching an
executable, otherwise Bash will try to look into its search path, which
does not include the current folder. Try:
./test.php
That should work. BTW--running "test" by itself only *looks* like
hitting enter--it's really a vali
You need to use HTML mail. There's an example on how to this in the
manual.
Marco
--
php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming
Check us out on the web at http://www.phparch.com!
--- Begin Message ---
Is there
quotes do, as a general rule, that double cannot (he asks remembering
something, but not sure what)?
Marco Tabini wrote:
> I haven't followed the rest of the thread, but how about using a
> function?
>
> function getvar ($varname)
> {
> if (isset ($_POST[$
I haven't followed the rest of the thread, but how about using a
function?
function getvar ($varname)
{
if (isset ($_POST[$varname])
{
$_SESSION[$varname] = $_POST[$varname];
return $_POST[$varname];
}
elseif (isset ($_SESSION[$varnam
ED]";
$subject = "Narrowsburg Chamber of Commerce";
$mailheaders = "From: $thename\n";
$mailheaders .= "Reply to:$email\n\n";
mail($to, $subject, $msg, $mailheaders);
?>
--
php|architect - The Magazine for PHP Professionals
The monthly magazine dedica
Best guess, your local server has register_globals on and your ISP
doesn't. However, without seeing your code it's going to be difficult to
tell for sure! :-)
Marco
--
php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming
You should be able to use strtotime() to transform the datetime string
into a UNIX timestamp, which you can then format back using date().
However, this is a very circuitous way--either use SQL to format it or,
if your DBMS supports it, have it returned already as a UNIX timestamp.
The actual SQL c
I think this is happening because you're comparing apples to oranges.
Your first comparison causes an integer to be compared to a string.
Because the string "string" evaluates to the integer value 0, the
comparison succeeds. The manual recommends the use of the identical
comparison operator (===) i
1 - 100 of 263 matches
Mail list logo