|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 16 Sep 2003 14:29:01 -0000 Issue 2300
php-general-digest-help
lists.php.net
Date: Tue Sep 16 2003 - 09:29:01 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 16 Sep 2003 14:29:01 -0000 Issue 2300
Topics (messages 162694 through 162752):
Re: PHP|Con insane pricing
162694 by: Jeremy Johnstone
162695 by: Cody Phanekham
162696 by: John W. Holmes
162697 by: Jeremy Johnstone
162698 by: Robert Cummings
162699 by: andu
162700 by: Dan Anderson
162707 by: - Edwin -
162712 by: Jeremy Brand, B.S.
162713 by: John Coggeshall
162717 by: Jeremy Johnstone
162730 by: Jay Blanchard
162741 by: Dan Joseph
162743 by: Dan Joseph
162746 by: Robert Cummings
162747 by: Dan Joseph
MySql temporary tables
162701 by: andu
162702 by: Jackson Miller
162703 by: andu
Re: Japanese on a page
162704 by: - Edwin -
[Newbie Guide] For the benefit of new members
162705 by: tech.leatherlink.net
Re: abreviating echo commands
162706 by: - Edwin -
162708 by: Eugene Lee
Strange error
162709 by: Sid
162711 by: Martin Towell
162715 by: Sid
162719 by: rush
162729 by: John W. Holmes
Using 'print <<<END'
162710 by: Rudi Starcevic
162714 by: Duncan Hill
162724 by: - Edwin -
162725 by: Rudi Starcevic
Protecting a file via PHP.
162716 by: Steve Jackson
162723 by: - Edwin -
162728 by: Steve Jackson
after postgres upgrade - ERROR: current transaction is aborted
162718 by: Abdul-Wahid Paterson
Timeout and fsockopen
162720 by: uros.gruber.sir-mag.com
Re: Language filter
162721 by: rush
Re: How to comment out chunk of html/php mixed code?
162722 by: rush
Re: Yikes! Strange Occurrence of ! in mail
162726 by: Naintara Jain
IP adress problem
162727 by: Webmaster
162744 by: Jason Sheets
Re: Using a jpGraph image in an FPDF pdf output...-SOLVED
162731 by: Jay Blanchard
162732 by: Marek Kilimajer
162733 by: Jay Blanchard
162736 by: Marek Kilimajer
162738 by: Jay Blanchard
162745 by: Marek Kilimajer
cvs and shell_exec
162734 by: Jurgens du Toit
162748 by: Jurgens du Toit
Re: multiple FORMS on same page problem.
162735 by: Golawala, Moiz M (IndSys, GE Interlogix)
Getting part of a string...Was protecting a file via php
162737 by: Steve Jackson
162739 by: Jon Haworth
162742 by: Jurgens du Toit
$_SELF[PHP_SELF] not working anymore
162740 by: Maria Garcia Suarez
162750 by: Maria Garcia Suarez
162751 by: Javier Tacon
Re: MS-SQL 2000 weird problem
162749 by: Martin Greco
Re: Novice in eCommerce
162752 by: Karen Lubrecht
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Actually the $495 is the conference fee only... It does not include the
$160 a night for the hotel room (price of the hotel the conference is
at), or food, or transportation. That is just your ticket into the
conference. Factor in everything else, and your easily up to
$1500-$2000. Using the average salary which was posted in this thread,
that is about a months pay after taxes for an average programmer.
Jeremy
On Mon, 2003-09-15 at 17:12, Dan Anderson wrote:
> > The pricing seems insane, and geared towards people with lots of
> > spare money...
> ::snip::
> > but I'm not going to shell out $495 (the cheapest non-student
>
> If you consider the average salary for a computer programmer is probably
> $40k - $50k (at least in the US) this is not insane. (Heck, it's less
> then a weeks pay -- even with the plane tickets). I assume this covers
> hotel rooms (pricey), food (pricey), speakers (very pricey), etc.
>
> -Dan
attached mail follows:
> -----Original Message-----
> From: Jeremy Brand, B.S. [mailto:jeremy
nirvani.net]
> actually add value by being there, not only in supporting my
> friends who are doing speaking at the conference,
maybe ask your friends that are speaking at the conference if they can sneak you in? or get you a discount?
*************************************************************************************
This e-mail, including any attachments to it, may contain confidential and/or personal information.
If you have received this e-mail in error, you must not copy, distribute, or disclose it, use or take any action
based on the information contained within it.
Please notify the sender immediately by return e-mail of the error and then delete the original e-mail.
The information contained within this e-mail may be solely the opinion of the sender and may not necessarily
reflect the position, beliefs or opinions of Salmat on any issue.
This email has been swept for the presence of computer viruses known to Salmat's anti-virus systems.
For more information, visit our website at www.salmat.com.au.
*************************************************************************************
attached mail follows:
Jeremy Johnstone wrote:
> Actually the $495 is the conference fee only... It does not include the
> $160 a night for the hotel room (price of the hotel the conference is
> at), or food, or transportation. That is just your ticket into the
> conference. Factor in everything else, and your easily up to
> $1500-$2000. Using the average salary which was posted in this thread,
> that is about a months pay after taxes for an average programmer.
What are you talking about? You sleep in your car and have a hot plate
running off the cigarette lighter to make Raman noodles! Bring extra
spray deodorant.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
attached mail follows:
Let me also say, that I fully think their price is fair. It's right in
line with most other conferences (if not cheaper). I was just clarifying
that the $495 price is not all inclusive. I wish I would be able to
attend, but unfortunately money is tight right now for me, and I can't
afford it. I most likely will be speaking at the next one (assuming they
accept my submission when it comes time) and money won't be an issue.
Jeremy
P.S. - In regards to the email below, if you did that you would have to
factor in extra gas money, and $10 a day for WIFI access from the hotel.
On Mon, 2003-09-15 at 21:23, John W. Holmes wrote:
> Jeremy Johnstone wrote:
>
> > Actually the $495 is the conference fee only... It does not include the
> > $160 a night for the hotel room (price of the hotel the conference is
> > at), or food, or transportation. That is just your ticket into the
> > conference. Factor in everything else, and your easily up to
> > $1500-$2000. Using the average salary which was posted in this thread,
> > that is about a months pay after taxes for an average programmer.
>
> What are you talking about? You sleep in your car and have a hot plate
> running off the cigarette lighter to make Raman noodles! Bring extra
> spray deodorant.
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com
attached mail follows:
I've been hearing a lot lately about online donations. People setting up
paypal or whatnot accounts to have people donate for new boobies, new
clothes, new whatever. Maybe you could set up a paypal donation fund for
people to help pay your way there. Now admittedly it's not going to be
all the rave like chipping in for a new set of boobies, but hey, who
knows, maybe you'll get to go to the conference AND get a new set of
boobies.
Cheers,
Rob.
Ps. This message has been brought to you by a tongue in a cheek.
On Mon, 2003-09-15 at 21:22, Jeremy Brand, B.S. wrote:
>
> If anyone has any comments other than justifying the price of the
> conference, like a friends of php list I can get on so I can
> attend it would be greatly appreciated. I feel like I would
> actually add value by being there, not only in supporting my
> friends who are doing speaking at the conference, but also in
> helping to evangelize php and help newbies with questions/fud/etc.
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
attached mail follows:
On Mon, 15 Sep 2003 18:22:05 -0700
"Jeremy Brand, B.S." <jeremy
nirvani.net> wrote:
> Thanks to everyone for their responses, though I still have not
> found a way to get to the conference at a reasonable price (what I
> consider reasonable).
>
> If anyone has any comments other than justifying the price of the
> conference, like a friends of php list I can get on so I can
> attend it would be greatly appreciated. I feel like I would
> actually add value by being there, not only in supporting my
> friends who are doing speaking at the conference, but also in
> helping to evangelize php and help newbies with questions/fud/etc.
These gatherings are most likely for people sponsored by their employers, don't
imagine participants come out of it $500 smarter then they went in. If it makes
you feel good to hang out for 5 minutes with "the big guys" then borrow money and
go, if learning is your goal, a good book and mostly practice will get you there.
I used to read about these RedHat certification 2-3 days sessions for around
$2000, does anyone in his/hers right mind believe he/she can become a Linux system
administrator in 3 days?
>
> Thanks.
> Jeremy
>
>
> Jeremy Brand, B.S. wrote:
> > Does anyone know a way to attend the PHP|con west as an observer in
> > Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?
> >
> > The pricing seems insane, and geared towards people with lots of spare
> > money...
> >
> > I would love to hear specifically the Advanced track on Oct. 23 (Michael
> > Radwin, Sterling, Thies, George Schlossnagle and JimW), but I'm not going
> > to shell out $495 (the cheapest non-student rate) for it.
> >
> > Thanks,
> > Jeremy
> >
>
>
> --
> "Prediction is very difficult, especially of the future."
> Niels Bohr
> http://www.nirvani.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
Andu
attached mail follows:
> These gatherings are most likely for people sponsored by their employers, don't
> imagine participants come out of it $500 smarter then they went in. If it makes
Well I suppose that depends on exactly what you are looking to get out
of it. Conferences can be many things. For instance, you have an
opportunity to meet people and network (with possible employers,
clients, partners, and the like). Also, you can learn A LOT in three
days. And for some people a classroom learning style is better then a
book. And for us vulcans a book is all we need. It's all about the
individual.
-Dan
attached mail follows:
Hi,
"John W. Holmes" <holmes072000
charter.net> wrote:
> Jeremy Brand, B.S. wrote:
> > Thanks to everyone for their responses, though I still have not found a
> > way to get to the conference at a reasonable price (what I consider
> > reasonable).
> >
> > If anyone has any comments other than justifying the price of the
> > conference, like a friends of php list I can get on so I can attend it
> > would be greatly appreciated.
>
> I know this guy that can get you in. 1/2 price, cash up front. What size
> cardboard box could you fit in?
Would this still work even if "safe_mode" is on?
:)
- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
attached mail follows:
Thanks again to all who at least had a mature answer.
Cheers :)
Jeremy
Jeremy Brand, B.S. wrote:
> Does anyone know a way to attend the PHP|con west as an observer in
> Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?
>
> The pricing seems insane, and geared towards people with lots of spare
> money...
>
> I would love to hear specifically the Advanced track on Oct. 23 (Michael
> Radwin, Sterlin, Thies, George Schlossnagle and JimW), but I'm not going
> to shell out $495 (the cheapest non-student rate) for it.
>
> Thanks,
> Jeremy
>
--
"Prediction is very difficult, especially of the future."
Niels Bohr
http://www.nirvani.net
attached mail follows:
> These gatherings are most likely for people sponsored by their employers, don't
> imagine participants come out of it $500 smarter then they went in. If it makes
> you feel good to hang out for 5 minutes with "the big guys" then borrow money and
> go, if learning is your goal, a good book and mostly practice will get you there.
Consider that many of these "good books" you speak of are written by
people whom are speaking at the conference :)
John
--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall http://www.coggeshall.org/
john at coggeshall dot org
The PHP Developer's Handbook
The definitive PHP5 developer's guide http://www.php-handbook.com/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
attached mail follows:
I apologize I couldn't help more, but if I knew a solution to your
problem I would be going to!
;-)
Jeremy
On Tue, 2003-09-16 at 02:17, Jeremy Brand, B.S. wrote:
> Thanks again to all who at least had a mature answer.
>
> Cheers :)
> Jeremy
>
>
> Jeremy Brand, B.S. wrote:
> > Does anyone know a way to attend the PHP|con west as an observer in
> > Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?
> >
> > The pricing seems insane, and geared towards people with lots of spare
> > money...
> >
> > I would love to hear specifically the Advanced track on Oct. 23 (Michael
> > Radwin, Sterlin, Thies, George Schlossnagle and JimW), but I'm not going
> > to shell out $495 (the cheapest non-student rate) for it.
> >
> > Thanks,
> > Jeremy
> >
>
>
> --
> "Prediction is very difficult, especially of the future."
> Niels Bohr
> http://www.nirvani.net
attached mail follows:
[snip]
... a lot ...
[/snip]
As someone who has put together conferences before and has/is/will be
attempting to do a conference like this in the future I can say that for
day pricing it may be slightly high, but just slightly. A conference is
an expensive thing, usually offset by sponsors to a degree (if you can
get them). You have facilities, meals, 'talent', printing, equipment
rental, etc. If your cost is $50k then you need 100 participants at $500
to break even.
I have fished a PHP event in Texas around for some time now, and have
about 30 folks who are interested in attending. I have done as much as I
can to keep the costs low so that the attendance fees can be kept low.
But the $50k a year programmer (who loses $10 or more of that to taxes)
with a family can ill afford to spend more than a couple of hundred
bucks all together attend. Most companies now are tighening their
budgets and not paying for these kinds of things.
The unfortunate side of this is that many do not get introduced to new
items, techniques, products, methods, etc. not to mention the two or
three days of being with folks who are in the same professional peer
group.
My .02
attached mail follows:
Hi,
I know a couple people who put together a Con once. It wasn't a large one,
it only took up one hotel conference room, and the budget was kept low. The
least he could sell tickets for was $250-$300 (somewhere in there) each.
That was without him turning a profit.
Now, take into account a con like this one wtih keynote speakers (most
likely paid), a large staff, a larger room (and probably multiple rooms),
more food, more drinks, more advertising, and $495. That really isn't that
bad. Expensive yet, but you have to ask yourself if the value is worth it
for you.
-Dan Joseph
> -----Original Message-----
> From: Chris Sherwood [mailto:csherwood
nortialearning.com]
> Sent: Monday, September 15, 2003 6:19 PM
> To: Dan Anderson; php-general
lists.php.net
> Subject: Re: [PHP] PHP|Con insane pricing
>
>
>
> Yea its not bad if you dont have a life outside of programming and/or
> computers
>
> if you have kids or other responsibilities then all of a sudden
> 500$ becomes
> a very large issue as thats a months groceries or what not...
>
> heh yea the average salary is 50K but then when the government
> takes 40% (if
> your canadian) that is not a whole lot
>
>
> > > The pricing seems insane, and geared towards people with lots of
> > > spare money...
> > ::snip::
> > > but I'm not going to shell out $495 (the cheapest non-student
> >
> > If you consider the average salary for a computer programmer is probably
> > $40k - $50k (at least in the US) this is not insane. (Heck, it's less
> > then a weeks pay -- even with the plane tickets). I assume this covers
> > hotel rooms (pricey), food (pricey), speakers (very pricey), etc.
> >
> > -Dan
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Hi,
> > at least I dont live in a police state.
I sure do.. Its a joke too..
> I hate the patriot act.
You don't like illegal search and seizures? What's wrong with you? :)
-Dan Joseph
attached mail follows:
I don't know, the Ottawa Linux Symposium runs in Ottawa Canada each
year. They usually run about 5 days and rent multiple rooms. The cost to
non-students (this year): $325 CAD ($217 USD). That's less than half the
price of PHP|Con.
Cheers,
Rob.
On Tue, 2003-09-16 at 09:31, Dan Joseph wrote:
> Hi,
>
> I know a couple people who put together a Con once. It wasn't a large one,
> it only took up one hotel conference room, and the budget was kept low. The
> least he could sell tickets for was $250-$300 (somewhere in there) each.
> That was without him turning a profit.
>
> Now, take into account a con like this one wtih keynote speakers (most
> likely paid), a large staff, a larger room (and probably multiple rooms),
> more food, more drinks, more advertising, and $495. That really isn't that
> bad. Expensive yet, but you have to ask yourself if the value is worth it
> for you.
>
> -Dan Joseph
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
attached mail follows:
Hi,
Probably depends on location. My friend's was in Chicago, so everything was
a little more expensive.
-Dan Joseph
> -----Original Message-----
> From: Robert Cummings [mailto:robert
wocmud.org]
> Sent: Tuesday, September 16, 2003 9:39 AM
> To: Dan Joseph
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] PHP|Con insane pricing
>
>
> I don't know, the Ottawa Linux Symposium runs in Ottawa Canada each
> year. They usually run about 5 days and rent multiple rooms. The cost to
> non-students (this year): $325 CAD ($217 USD). That's less than half the
> price of PHP|Con.
>
> Cheers,
> Rob.
>
>
> On Tue, 2003-09-16 at 09:31, Dan Joseph wrote:
> > Hi,
> >
> > I know a couple people who put together a Con once. It wasn't
> a large one,
> > it only took up one hotel conference room, and the budget was
> kept low. The
> > least he could sell tickets for was $250-$300 (somewhere in there) each.
> > That was without him turning a profit.
> >
> > Now, take into account a con like this one wtih keynote speakers (most
> > likely paid), a large staff, a larger room (and probably
> multiple rooms),
> > more food, more drinks, more advertising, and $495. That
> really isn't that
> > bad. Expensive yet, but you have to ask yourself if the value
> is worth it
> > for you.
> >
> > -Dan Joseph
>
> --
> .---------------------------------------------.
> | Worlds of Carnage - http://www.wocmud.org |
> :---------------------------------------------:
> | Come visit a world of myth and legend where |
> | fantastical creatures come to life and the |
> | stuff of nightmares grasp for your soul. |
> `---------------------------------------------'
>
attached mail follows:
I did this blog where I create a temporary table to store entries while editing
them (spell checking, preview, etc). The problem I was having is that sometimes
the temporary table is created sometimes not. For every transaction with MySql I
used mysql_pconnect(). Since I changed to using mysql_connect and regular tables
instead of temporary tables everything seems to work fine, has anyone experienced
problems with temporary tables with MySql?
____
Regards, Andu Novac
attached mail follows:
On Monday 15 September 2003 10:26, andu wrote:
> I did this blog where I create a temporary table to store entries while
> editing them (spell checking, preview, etc). The problem I was having is
> that sometimes the temporary table is created sometimes not. For every
> transaction with MySql I used mysql_pconnect(). Since I changed to using
> mysql_connect and regular tables instead of temporary tables everything
> seems to work fine, has anyone experienced problems with temporary tables
> with MySql?
Temporary tables are only accessible from the MySQL connection that created
them. Using pconnect it was a crap shoot as to whether you would get the
same connection on the next page load.
Temporary tables should only be used (from within PHP) for the current page
view.
-Jackson
>
> ____
> Regards, Andu Novac
--
jackson miller
cold feet creative
615.321.3300 / 800.595.4401
jackson
coldfeetcreative.com
cold feet presents Emma
the world's easiest email marketing
Learn more
http://www.myemma.com
attached mail follows:
On Mon, 15 Sep 2003 22:31:08 -0500
Jackson Miller <jackson
coldfeetcreative.com> wrote:
> On Monday 15 September 2003 10:26, andu wrote:
> > I did this blog where I create a temporary table to store entries while
> > editing them (spell checking, preview, etc). The problem I was having is
> > that sometimes the temporary table is created sometimes not. For every
> > transaction with MySql I used mysql_pconnect(). Since I changed to using
> > mysql_connect and regular tables instead of temporary tables everything
> > seems to work fine, has anyone experienced problems with temporary tables
> > with MySql?
>
> Temporary tables are only accessible from the MySQL connection that created
> them. Using pconnect it was a crap shoot as to whether you would get the
> same connection on the next page load.
>
> Temporary tables should only be used (from within PHP) for the current page
> view.
Thanks.
>
> -Jackson
>
> >
> > ____
> > Regards, Andu Novac
>
> --
> jackson miller
>
> cold feet creative
> 615.321.3300 / 800.595.4401
> jackson
coldfeetcreative.com
>
>
> cold feet presents Emma
> the world's easiest email marketing
> Learn more
http://www.myemma.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
____
Regards, Andu Novac
attached mail follows:
Hi,
On Fri, 12 Sep 2003 12:24:33 -0700
"Chris W. Parker" <cparker
swatgear.com> wrote:
> (now to the entire list)
>
> Mark McCulligh <mailto:mmcculli
visualtech.ca>
> on Friday, September 12, 2003 11:48 AM said:
>
> > I am trying to create both an English and Japanese version of a site.
> > The English done and I have the Japanese translation in a word doc.
> > Can someone point me in the right direction on how I do this. I know
> > it has something to do with the META setting.
>
> I have only dabbled in this so I don't know the proper terms and
> technologies used, but I'll try to pass on what I've learned.
>
> It requires a few things.
>
> 1. PHP needs to send the proper header. (At the top of each page.)
>
> <?
> header("Content-type: text/html; charset=EUC-JP");
> ?>
Or, you can just declare it inside you're <head> tags (as mentioned previously). Also, depending on the charset you're using, you might need "shift_jis" instead of "euc-jp". ("euc-jp" is recommended though esp. if data is coming from a database.)
> 2. You also need to send the correct language info from within the page
> itself. I suggest going to a japanese page and looking at the source.
>
> 3. You need an editor that can handle the japanese language. I stopped
> trying to make japanese pages because I could not find a suitable editor
> (granted I didn't try very hard and I wasn't about to buy something).
Quanta works fine for me. ( http://quanta.sourceforge.net/ ) And you don't have to buy it ;) Actually, as long as you can change the default font used (and assuming you have the fonts installed), *most* editors should do just fine.
- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
attached mail follows:
=========================================================
This message is for the benefit of new subscribers and those new to PHP.
Those who do not want to be bothered just filter out the [Newbie Guide]
mails. Please feel free to add more points and send to the list.
==========================================================
1. If you have any queries/problems about PHP try http://www.php.net/manual/en
first. You can download a copy and use it offline also.
2. If you can not get answer here try http://www.google.com next. Try
searching for "php YOUR QUERY" and you may be lucky to get an answer within
the first 10 results.
3. Glancing/searching through the list archive at
http://marc.theaimsgroup.com/?l=php-general , you can find many of the
common topics discussed repeatedly and can get your answer from those
discussions.
4. If you are stuck with a script and do not understand what is wrong, instead
of posting the whole script, try doing some research yourself. One useful
trick is to print the variable/sql query using print or echo command and
check whether you get what you expected.
After diagnosing the problem, send the details of your efforts (following
steps 1, 2 & 3) and ask for help.
5. Provide a clear descriptive subject line. Avoid general subjects like
"Help!!", "A Question" etc. Especially avoid blank subjects.
6. When you want to start a new topic, open a new mail and enter the mailing
list address php-general
lists.php.net instead of replying to an existing
thread and replacing the subject and body with your message.
7. PHP is a server side scripting language. Whatever processing PHP does takes
place BEFORE the output reaches the client. Therefore, it is not possible to
access the users' computer related information (OS, screen size etc) using
PHP. You need to go for JavaScript and ask the question in a JavaScript
list.
8. It's always a good idea to post back to the list once you've solved
your problem. People usually add [SOLVED] to the subject line of their
email when posting solutions. By posting your solution you're helping
the next person with the same question. [contribued by Chris W Parker]
9. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard)
Hope you have a good time programming with PHP.
Best regards,
Ma Siva Kumar
--
Integrated Management Tools for leather industry
----------------------------------
http://www.leatherlink.net
Ma Siva Kumar,
BSG LeatherLink,
No 9, First Main Road,
Jai Nagar, Arumbakkam,
Chennai - 600106
Tel : +91 44 55191757
attached mail follows:
Hi,
Kris Yates <kris
2binteractive.com> wrote:
> Hello..
>
> I forget where but I found some source awhile back that abbreviated
> echo. It was something like
> <?=$var;?> which worked the same as <? echo $var; ?>. Maybe it was
> <?\=$var;?>.. Obviously I dont remember.. which is why I am asking..
> :) Does anyone have a link to something that talks about how to
> abbreviate commands in PHP?
>
> Well.. not how to.. but just a list of abbreviations?
>
> Is echo the only one that has an abbreviation? I couldn't find anything
> in the manual.. any leads?
Ternary conditional operator:
http://www.php.net/manual/en/language.expressions.php
echo()'s shortcut syntax:
http://www.php.net/manual/en/function.echo.php
The only two that I know of... I think.
- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
attached mail follows:
: Kris Yates <kris
2binteractive.com> wrote:
: >
: > I forget where but I found some source awhile back that abbreviated
: > echo. It was something like
: > <?=$var;?> which worked the same as <? echo $var; ?>. Maybe it was
: > <?\=$var;?>.. Obviously I dont remember.. which is why I am asking..
: > :) Does anyone have a link to something that talks about how to
: > abbreviate commands in PHP?
Is this what you meant?
http://www.php.net/manual/en/language.basic-syntax.php#language.basic-syntax.phpmode
attached mail follows:
Hello everyone,
Am I having a bad day or WHAT! I have exactly 5 lines of code as follows
<?
function here ($errno, $err_str, $file_name, $line_no, $context_no)
{
}
?>
and I get this error
Parse error: parse error, unexpected T_STRING, expecting '&' or T_VARIABLE or T_CONST in D:\sid\sid-test\index.php on line 3
what is the problem here.
Can someone help
- Sid
attached mail follows:
Hi
Odd - I copy/paste the code below and run it against windows version of
php4.0.6 and it's okay
Maybe you've got a hidden char there somewhere?
Martin
-----Original Message-----
From: Sid [mailto:sidh
hathway.com]
Sent: Wednesday, 17 September 2003 5:39 AM
To: php-general
lists.php.net
Subject: [PHP] Strange error
Hello everyone,
Am I having a bad day or WHAT! I have exactly 5 lines of code as follows
<?
function here ($errno, $err_str, $file_name, $line_no, $context_no)
{
}
?>
and I get this error
Parse error: parse error, unexpected T_STRING, expecting '&' or T_VARIABLE
or T_CONST in D:\sid\sid-test\index.php on line 3
what is the problem here.
Can someone help
- Sid
__________ Information from NOD32 1.509 (20030914) __________
This message was checked by NOD32 for Exchange e-mail monitor.
http://www.nod32.com
attached mail follows:
You are probably right. I typed in the same code into a new file and it
started to work. Just for the record, I copied and pasted this code from
Opera in Windows. Anyone had similar problems?
- Sid
----- Original Message -----
From: "Martin Towell" <martin.towell
world.net>
To: "'Sid'" <sidh
hathway.com>; <php-general
lists.php.net>
Sent: 16 September 2003 Tuesday 12:10 AM
Subject: RE: [PHP] Strange error
> Hi
>
> Odd - I copy/paste the code below and run it against windows version of
> php4.0.6 and it's okay
>
> Maybe you've got a hidden char there somewhere?
>
> Martin
>
> -----Original Message-----
> From: Sid [mailto:sidh
hathway.com]
> Sent: Wednesday, 17 September 2003 5:39 AM
> To: php-general
lists.php.net
> Subject: [PHP] Strange error
>
>
> Hello everyone,
>
> Am I having a bad day or WHAT! I have exactly 5 lines of code as follows
> <?
> function here ($errno, $err_str, $file_name, $line_no, $context_no)
> {
> }
> ?>
> and I get this error
> Parse error: parse error, unexpected T_STRING, expecting '&' or T_VARIABLE
> or T_CONST in D:\sid\sid-test\index.php on line 3
>
> what is the problem here.
>
> Can someone help
>
> - Sid
> __________ Information from NOD32 1.509 (20030914) __________
>
> This message was checked by NOD32 for Exchange e-mail monitor.
> http://www.nod32.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
"Sid" <sidh
hathway.com> wrote in message
news:007b01c37c8a$508f8560$1700a8c0
webqueztserver...
> Hello everyone,
>
> Am I having a bad day or WHAT! I have exactly 5 lines of code as follows
> what is the problem here.
works fine at my localhost.
rush
--
http://www.templatetamer.com/
attached mail follows:
Sid wrote:
> You are probably right. I typed in the same code into a new file and it
> started to work. Just for the record, I copied and pasted this code from
> Opera in Windows. Anyone had similar problems?
Yes. There are sometimes hidden characters in code that you cut and
paste like that. It will cause the parse error, but you don't actually
see anything there. Retyping the code, the exact same way, then fixes it.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
attached mail follows:
Hi,
When printing like this:
print <<<END
Hello world
END;
Is it at all possible to use a function in the output ?
For example:
print <<<END;
strtolower("Hello World")
END;
So far I've been unable to make it function work.
Many thanks
Rudi.
attached mail follows:
On Tuesday 16 Sep 2003 08:14, Rudi Starcevic wrote:
> Hi,
>
> When printing like this:
>
> print <<<END
> Hello world
> END;
>
> Is it at all possible to use a function in the output ?
> For example:
>
> print <<<END;
> strtolower("Hello World")
IIRC, heredocs print everything contained within literally, unless a
variable. using {} around the function might work, but I really doubt it.
This is where things like smarty templates come in handy.
attached mail follows:
Hi,
Rudi Starcevic <rudi
oasis.net.au> wrote:
> Hi,
>
> When printing like this:
>
> print <<<END
> Hello world
> END;
>
> Is it at all possible to use a function in the output ?
> For example:
>
> print <<<END;
> strtolower("Hello World")
> END;
>
> So far I've been unable to make it function work.
Hmm... I don't think that'll work. This one should though:
$my_string = strtolower("Hello World");
print <<<END
$my_string
END;
--
- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
attached mail follows:
Hi,
> $my_string = strtolower("Hello World");
> print <<<END
> $my_string
> END;
Yeah that'll work fine for me.
Thanks
Rudi.
attached mail follows:
I just read this:
http://zend.com/zend/trick/tricks-august-2001.php
To protect a file via PHP.
What does this part mean in the serving the files part:
define('FILEDIR', '/mnt/dos/');
Do I define the directory where the file is served from? Or do I define
a directory to which the file is served to (a temp) or what? No matter
what I've tried I get no error message and the browser (IE6) just hangs
so it appears that PHP is trying to serve the file but failing for some
reason.
What is that directory I am supposed to define?
What am I doing wrong?
Steve Jackson
Web Development and Marketing Manager
Viola Systems Ltd.
http://www.violasystems.com
stephen.jackson
violasystems.com
Mobile +358 50 343 5159
attached mail follows:
Hi,
"Steve Jackson" <stephen.jackson
violasystems.com> wrote:
> I just read this:
> http://zend.com/zend/trick/tricks-august-2001.php
> To protect a file via PHP.
Didn't really read this but...
> What does this part mean in the serving the files part:
> define('FILEDIR', '/mnt/dos/');
>
> Do I define the directory where the file is served from? Or do I define
> a directory to which the file is served to (a temp) or what?
It should be "from" and not "to".
> No matter
> what I've tried I get no error message and the browser (IE6) just hangs
> so it appears that PHP is trying to serve the file but failing for some
> reason.
Could be a different problem...
- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
attached mail follows:
Steve Jackson
Web Development and Marketing Manager
Viola Systems Ltd.
http://www.violasystems.com
stephen.jackson
violasystems.com
Mobile +358 50 343 5159
-----Original Message-----
From: Steve Jackson [mailto:stephen.jackson
violasystems.com]
Sent: 16. syyskuuta 2003 12:15
To: 'copperwa11s
yahoo.co.jp'
Subject: RE: [PHP] Protecting a file via PHP.
> > What does this part mean in the serving the files part:
> > define('FILEDIR', '/mnt/dos/');
> >
> > Do I define the directory where the file is served from? Or do I
> > define a directory to which the file is served to (a temp) or what?
>
> It should be "from" and not "to".
OK. The thing is I wonder why in the zend article the directory here is
different. There are two scripts on the page: <?
define('FILEDIR', '/downloads/');
//display available files
$d = dir(FILEDIR);
while($f = $d->read())
{
//skip 'hidden' files
if($f{0} != '.')
{
print("<a href=\"get.php?file=$f\">$f</a><br>\n");
}
}
$d->close();
?>
This first one looks in the downloads directory (outside the root) and
grabs the filenames displaying them as a link. This works fine on my
server.
This second one starts with:
define('FILEDIR', '/mnt/dos/');
And I can't see an explanation why. Surely if it was meant to be the
same the writer would have had the same route defined?
>
> Could be a different problem...
>
Could be. But I'm trying to eliminate this one first. I've tried the
from directory and get the same error as I menioned previously. If I
can't get this to work are there any other ways I can protect a file
from being displayed. I need to be able to:
1) Display links to authenticated users (php session)
2) Let authenticated users download the files.
I don't want to use an htaccess file unless there is a way to
authenticate the user in htaccess by reading the session variable.
attached mail follows:
Hi,
I have had a site working for the last 2 years and have had no problems
until at the weekend I replace my database server with a newer one. The
database migration went like a dream and I had the whole db changed over
in 1 hour.
Since the upgrade I have been getting the following error message
sporadically.
ERROR: current transaction is aborted, queries ignored until end of
transaction block
I have the following setup
Webserver:
Apache 1.3.27 (Redhat 7.2)
PHP 4.1.2
Database server (old): Postgres 7.1.3
Database server (new): Postgres 7.3.4
The PHP scripts have not changed. I am using PEAR::DB for database
access. I think it is the PEAR::DB that is actually making the
transactions because some times the error message some times gets
generated when I don't even have a transaction. Not too sure about that
though.
The funny thing is, when I first start up the web-server I don't get any
error messages and the site carries on working fine just as it did when
using the old database server.
However, after about an hour. I suddenly get 10 errors a minute from my
site (average of course) with the majority of pages still accessing
fine. After a bit more time, this doubles to 20 errors a minute. If I
carry on leaving the site, I eventually get error messages every second.
The error message seem to be generated from completely unrelated bits of
my code.
When I restart Apache the error messages go away and the site functions
as normal.
My theory is, since I am using persistent connections in PHP, a
connection is some how becoming...unstable...for the want of a better
word. That connection then returns an error on every single request.
To put my theory to test, I have turned off the persistent connections
on my site and everything appears to be working fine now. I now need to
work out where to go from here as my server load is high and I would
prefer to use persistent connections.
Has anyone experienced any similar problems with changing Postgres
versions? Do I need to upgrade my PHP on the web-server as the RedHat
postgres the PHP was built against was Postgres 7.1.3? Anyone have any
suggestions on how I can fix this?
Regards,
--
Abdul-Wahid Paterson
Lintrix Networking & Comms. ltd. Web: http://www.lintrix.net/
Tel: +44 (0) 870 285 4703 Mobile: +44 (0)7971 506177
Fax: 0870 133 0433 Email/Jabber: aw
lintrix.net
--------------------------------------------------------------------
Web-Hosting | Development | Security | Consultancy | Domains
--------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQA/ZsWIN5797utT3YkRArMkAKDQhRv6xpj8mCDkXaSdlIOwQGWlZwCgvhbj
/EAPTUmfhFDkSltjjEvWPz4=
=7itW
-----END PGP SIGNATURE-----
attached mail follows:
Hello!
I'm trying to find if some host is up or not.
For example
$fp =
fsockopen ('www.damirjosar.com', 80, $errno, $errstr, 1);
because this url is expired it takes about 10 seconds to get response from
DNS, but with fsockopne it take 62 seconds. but i set timeout to 1.
I also try checkdnsrr and gethostbyname and all functions takes about 60
seconds. Why?. Can this be set to lover value.
I was looking in source code, but I'm not good at C, so I can't figure out
what the problem is.
I'm doing some link checker and when i get to host like this everything
stops and waits........
--
Best regards,
uros
attached mail follows:
"Kris Reid" <kris
listzapper.com> wrote in message
news:016601c37bef$45333590$0100000a
buffy...
>I have a website with a standard html form on it. Every now and then some
jerk submits the form with some >dirty words. This is then seen by my
clients which as you can imagine is very unprofessional.
>Any ideas?
I think you will hardly cover all dirty or unwanted words. How about having
interface for editor to allow posting to appear on the site, so the post
will not appear until is allowed by editor?
rush
--
http://www.templatetamer.com/
attached mail follows:
"Raditha Dissanayake" <jabber
raditha.com> wrote in message
news:3F665E21.1080806
raditha.com...
> Wrong approach all together. Start using CVS
and do not mix php and html - use templates :)
rush
--
http://www.templatetamer.com/
attached mail follows:
This would be of some use to you http://bugs.php.net/bug.php?id=13342&edit=1
-Naintara
-----Original Message-----
From: Nicole [mailto:430ntr3k
aeontrek.com]
Sent: Monday, September 15, 2003 2:32 PM
To: php-general
lists.php.net
Subject: [PHP] Yikes! Strange Occurrence of ! in mail
Has anyone experienced exclamation points ! in their emails from no where?
This is a really strange thing I have been noticing lately in emails I send
to myself via PHP. When I send an email from 2 different machines using 2
different smtp servers, I still get the exclamations in the email.
Any ideas what on earth is causing that?
Example:
the!ir is an ex!clamation in my e!mail that I did not pu!t there.
Why??
Thanks!
--
Nicole
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003
attached mail follows:
Hi,
why doesn't this work?
## IP FUNCTIONS ##
function assignClientIP()
{
if (getenv('HTTP_X_FORWARDED_FOR') == '')
{
$this->aCustomer->setClientIP((!empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ?
$HTTP_SERVER_VARS['REMOTE_ADDR'] : ( (
!empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] :
$REMOTE_ADDR ));
}
else
{
$this->aCustomer->setClientIP("Proxy");
}
}
The Attribut $clientIP is always empty.
--
ABSOLUT ANONYMES FILESHARING:
http://www.freenetproject.org/
ABSOLUT ANONYMER IRC CHAT:
http://www.invisiblenet.net/
attached mail follows:
Try using global $HTTP_SERVER_VARS at the top of your function or using
the $_SERVER super global which is automatically global.
Jason
Webmaster wrote:
>Hi,
>
>why doesn't this work?
>
>## IP FUNCTIONS ##
>function assignClientIP()
>{
>if (getenv('HTTP_X_FORWARDED_FOR') == '')
>{
>$this->aCustomer->setClientIP((!empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ?
>$HTTP_SERVER_VARS['REMOTE_ADDR'] : ( (
>!empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] :
>$REMOTE_ADDR ));
>}
>
>else
>{
>$this->aCustomer->setClientIP("Proxy");
>}
>}
>
>The Attribut $clientIP is always empty.
>
>
>
>
attached mail follows:
[snip]
Has anyone ever suceesfully embedded a jpGraph image in an FPDF output?
FPDF uses this function for an image
$pdfGraph->Image('grfx/image.jpg', 15, 20, 50, 0, 'JPG');
but when image.jpg is created with jpgraph it throws errors. I am sure
that I am missing something quite obvious, but alas I cannot see it.
[/snip]
It appears that the image was not getting fully processed and that the
PDF was completing prior to the image itself. Solved this by
two-stepping, when the PDF is requested the graph image is processed and
saved to the server before a redirect to the PDF. Works like a chaem and
the user sees no degredation in performance.
attached mail follows:
fflush did not work?
Jay Blanchard wrote:
> [snip]
> Has anyone ever suceesfully embedded a jpGraph image in an FPDF output?
>
> FPDF uses this function for an image
>
> $pdfGraph->Image('grfx/image.jpg', 15, 20, 50, 0, 'JPG');
>
> but when image.jpg is created with jpgraph it throws errors. I am sure
> that I am missing something quite obvious, but alas I cannot see it.
> [/snip]
>
> It appears that the image was not getting fully processed and that the
> PDF was completing prior to the image itself. Solved this by
> two-stepping, when the PDF is requested the graph image is processed and
> saved to the server before a redirect to the PDF. Works like a chaem and
> the user sees no degredation in performance.
>
attached mail follows:
[snip]
fflush did not work?
[/snip]
No, because the graph image was not complete before the PDF was
complete. Flushing the JPG would display (if no errors occured) an
partial JPG within the PDF.
attached mail follows:
If your are using $graph->Stroke('sometempfile'); before
$pdf->Image('sometempfile'); (I bet you do), then the image should be
completed.
Is it happening always or just now and then? What if you wait a few
seconds between the two calls? Do you call clearstatcache()?
I'm asking this because I once had a similar problem. My code created a
file and included it right away. But sometimes (about 10%) the file was
empty or incomplete. I never managed to reproduce this in a small
example, only in my few 100 line script. I also noticed other people had
this problem.
Jay Blanchard wrote:
> [snip]
> fflush did not work?
> [/snip]
>
> No, because the graph image was not complete before the PDF was
> complete. Flushing the JPG would display (if no errors occured) an
> partial JPG within the PDF.
>
attached mail follows:
[snip]
If your are using $graph->Stroke('sometempfile'); before
$pdf->Image('sometempfile'); (I bet you do), then the image should be
completed.
Is it happening always or just now and then? What if you wait a few
seconds between the two calls? Do you call clearstatcache()?
I'm asking this because I once had a similar problem. My code created a
file and included it right away. But sometimes (about 10%) the file was
empty or incomplete. I never managed to reproduce this in a small
example, only in my few 100 line script. I also noticed other people had
this problem.
[/snip]
It was intermittent as described by you. We tried sleep() and
clearstatcache() and still found intermittent problems....especially
with data intensive graphs. Using the redirect actually seems faster
(not tested) than the direct embed. Perhaps it is because of the sizes
of both classes in combination.
attached mail follows:
Did you also noticed the partial image files are always in multiple of
4096 in size? There must be some inner php caching that just does not
work right. This bug should be fixed.
Jay Blanchard wrote:
> [snip]
> If your are using $graph->Stroke('sometempfile'); before
> $pdf->Image('sometempfile'); (I bet you do), then the image should be
> completed.
>
> Is it happening always or just now and then? What if you wait a few
> seconds between the two calls? Do you call clearstatcache()?
>
> I'm asking this because I once had a similar problem. My code created a
> file and included it right away. But sometimes (about 10%) the file was
> empty or incomplete. I never managed to reproduce this in a small
> example, only in my few 100 line script. I also noticed other people had
>
> this problem.
> [/snip]
>
> It was intermittent as described by you. We tried sleep() and
> clearstatcache() and still found intermittent problems....especially
> with data intensive graphs. Using the redirect actually seems faster
> (not tested) than the direct embed. Perhaps it is because of the sizes
> of both classes in combination.
>
attached mail follows:
Hi...
I'm trying to parse my cvs's logs through php, but am coming up short
with shell_exec.
shell_exec works fine with all the other commands i have tried, but not
with cvs.
I've tried the cvs command as myself, and that works.
I've run the command as user 'nobody', and that works as well.
There is no indication in /var/log/messages or /var/log/apache/error_log
that something's not working.
Any Ideas? The releavant code is underneath...
Jrgns
--
<><
dutoitjj
yahoo.co.uk
083 511 7932
"For those who believe no evidence is necessary.
For those who don't, no evidence would suffice."
$command = "cd /home/jrgns/MyProject; /usr/bin/cvs -d /usr/share/cvs
status";
$results = shell_exec($command);
print ($results);
attached mail follows:
I've gotten some output now...
I've changed the /usr/bin/cvs .. -d to -dtn, but I have no idea why that
should work.
Jrgns
--
<><
dutoitjj
yahoo.co.uk
083 511 7932
"For those who believe no evidence is necessary.
For those who don't, no evidence would suffice."
attached mail follows:
It is almost working.. I can't figure out why I can get the "someVal" to page5.php.
file: page4.php
<?php
if (isset($_REQUEST['submit1'])){
echo "button 1 was clicked, act accordingly";
echo "this the request values";
echo $_REQUEST['someVal'];
}elseif(isset($_REQUEST['submit2'])){
session_start();
echo "button 2 was clicked, act accordingly";
$_SESSION['post'] = $_POST;
header("Location: http://127.0.0.1/Alarms/page5.php?<?=SID?>");
}else{
echo "NO button clicked, do not act accordingly";
}
?>
<html>
<form action="page4.php" method=post>
<?php echo "this is page 4"; ?>
<input type=text name='someVal' value=''>
<input type='submit' name="submit1" value='page4 Submit'>
</form>
<form action="page4.php" method=post>
<input type='submit' name="submit2" value='page5 Submit'>
</form>
</html>
file: page5.php
<?php
$_POST = $_SESSION['post'];
$val = $_POST['someVal'];
echo $val;
echo "this is page 5";
?>
for some reason I get the error that the header was already sent. I have to send the session Id to the next page the old fashioned way since I have another problem that causes a new session to be created everytime a page is loaded. Do you where the problem is?
Thanx
Moiz
-----Original Message-----
From: CPT John W. Holmes [mailto:holmes072000
charter.net]
Sent: Monday, September 15, 2003 4:36 PM
To: Golawala, Moiz M (IndSys, GE Interlogix); php-general
lists.php.net
Subject: Re: [PHP] multiple FORMS on same page problem.
You can only use one form, as you've figured out. You can have PHP determine
the action for each button, though..
In a form with two buttons, say names "submit1" and "submit2", only one
variable will be set when the form is submitted, the actual button that was
clicked. So you can use logic like this in PHP.
<?php
if(isset($_REQUEST['submit1']))
{ echo "button 1 was clicked, act accordingly"; }
elseif(isset($_REQUEST['submit2']))
{ echo "button 2 was clicked, act accordingly"; }
else
{ echo "no button clicked, do not act accordingly?"; }
So this would be in "page4.php". $_REQUEST['someVar'] would be available
here.
Now, you want to redirect to "page5.php" if button two is pressed, right,
yet retain the value of $_POST?
if(isset($_REQUEST['submit2']))
{
$_SESSION['post'] = $_POST;
header("Location: http://www.yourdomain.com/page5.php");
}
Now, on "page5.php", to get $_POST back, just do:
$_POST = $_SESSION['post'];
That's assuming you have session_start() on each page and you don't have
anything in $_POST already on "page5.php" that you want to retain.
---John Holmes
PS: Sorry for the top-post, but OExpress sucks. :)
----- Original Message -----
From: "Golawala, Moiz M (IndSys, GE Interlogix)" <Moiz.Golawala
ge.com>
To: <php-general
lists.php.net>
Sent: Monday, September 15, 2003 4:17 PM
Subject: [PHP] multiple FORMS on same page problem.
I am creating a page with 2 buttons. One which will refresh the page and the
other that will go to another page. My problem that I need to put all the
values into $_POST and have access to when any of the 2 buttons are clicked.
If I use the button in 2 seperate form tags I don't have access to all the
values in $_POST. Please look at the code below:
file (page4.php):
<html>
<form action="page4.php" method=post>
<?php echo "this is page 4"; ?>
<input type=text name='someVal' value=''">
<input type='submit' value='page4 Submit'>
</form>
<form action="page5.php" method=post>
<input type='submit' value='page5 Submit'>
</form>
</html>
file(page5.php):
<?php
$val = $_POST['someVal'];
echo $val;
echo "this is page 5";
?>
I would like to see the variable 'someVal' in the $_POST of both "page4
Submit" button and "page5 Submit" button. This code is a simplified version
of the more complecated code where a tonnes of other values are involved.
Any help is appreciated.
Moiz
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
OK,
After much headbanging I figured out the first part of my problem. I
want to retrieve a file from behind the webroot and to do this I need to
send headers. This should be a simple case of finding out what the file
is called (its extension) and sending the headers via a switch depending
on what the extension is. My previous problem was that I had a URL
string attached to the front of the filename which I got rid of in the
variable $pfile
My question is how do I find out what the extension of my file is. I
have tried explode but it doesn't have the desired effect. I feel stupid
asking as I'm sure this is easy but I can't for the life of me figure it
out:
$pfile = str_replace('get.php?file=','','$file');
$p = explode('.', $pfile);
// How do I say look at the extension and put it into the switch?
$extension = $p;
// end of the bit I'm stuck on.
switch ($extension)
{
// define headers depending on $extension variable.
case "doc" :
header("Content-type: application/msword\n");
break;
case "htm" :
header("Content-type: text/html\n");
break;
case "html" :
header("Content-type: text/html\n");
break;
case "jpg" :
header("Content-type: image/jpeg\n");
break;
case "pdf" :
header("Content-type: application/pdf\n");
break;
case "txt" :
header("Content-type: text/plain\n");
break;
case "xls" :
header("Content-type: application/vnd.ms-excel\n");
break;
default :
// force download dialog if no extension defined.
header("Content-type: application/octet-stream\n");
header("Content-disposition: attachment; filename=\"$file\"\n");
break;
}
Steve Jackson
Web Development and Marketing Manager
Viola Systems Ltd.
http://www.violasystems.com
stephen.jackson
violasystems.com
Mobile +358 50 343 5159
attached mail follows:
Hi Steve,
> $pfile = str_replace('get.php?file=','','$file');
> $p = explode('.', $pfile);
> // How do I say look at the extension and put it into the switch?
> $extension = $p;
> // end of the bit I'm stuck on.
At this point $p is an array rather than a variable, so you'll need to get
the last element of $p.Try something like this:
$p = explode('.', $pfile);
$extension = $p[sizeof($p)-1];
Cheers
Jon
attached mail follows:
If you use pathinfo($pfile), you'll get an array with the dirname,
basename and extension...
Jrgns
--
<><
dutoitjj
yahoo.co.uk
083 511 7932
"For those who believe no evidence is necessary.
For those who don't, no evidence would suffice."
attached mail follows:
Hi there!
I'm currently developing some pages where I use
$_SELF[PHP_SELF], always without any kind of problem
(until some days ago).
Some days ago, as I said, I formated my hard disk,
installed everything again and from that day on
$_SELF[PHP_SELF] stopped working, same goes for
$_SERVER[REQUEST_URI] or $_GET[location] (which are
the solution I tried to find, without success). The
page says:
Notice: Undefined index
(for $_GET) or it just says nothing (the other ones
above, no error reported, it just displays nothing).
Inside PHP.ini I have globals set to On, but if I set
them to Off nothing changes...
Can anyone help me? At PHP.net I saw "If PHP is
running as a command-line processor, this variable is
not available", but I am running it from a web page on
Windows 2000 + Xitami.
Thanks a lot for your help and sorry if I asked
something stupid, but I couldn't find any solution....
Kisses,
Maria
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
attached mail follows:
Hi there!
--- Javier Tacon <javier.tacon
private.com> wrote:
> Try with $_SERVER["PHP_SELF"]
Then I get:
Parse error: parse error, unexpected
T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or
T_VARIABLE or T_NUM_STRING in
This is how I use it:
$currentAddress="$_SERVER[HTTP_HOST]$_SERVER[PHP_SELF]";
Thanks for your reply anyway.
Kisses,
Maria
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
attached mail follows:
Try with $_SERVER["PHP_SELF"]
-----Mensaje original-----
De: Maria Garcia Suarez [mailto:mariagarciasuarez
yahoo.com]
Enviado el: martes, 16 de septiembre de 2003 15:26
Para: php-general
lists.php.net
Asunto: [PHP] $_SELF[PHP_SELF] not working anymore
Importancia: Baja
Hi there!
I'm currently developing some pages where I use
$_SELF[PHP_SELF], always without any kind of problem
(until some days ago).
Some days ago, as I said, I formated my hard disk,
installed everything again and from that day on
$_SELF[PHP_SELF] stopped working, same goes for
$_SERVER[REQUEST_URI] or $_GET[location] (which are
the solution I tried to find, without success). The
page says:
Notice: Undefined index
(for $_GET) or it just says nothing (the other ones
above, no error reported, it just displays nothing).
Inside PHP.ini I have globals set to On, but if I set
them to Off nothing changes...
Can anyone help me? At PHP.net I saw "If PHP is
running as a command-line processor, this variable is
not available", but I am running it from a web page on
Windows 2000 + Xitami.
Thanks a lot for your help and sorry if I asked
something stupid, but I couldn't find any solution....
Kisses,
Maria
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Solved the problem
I changed the locales.conf file from freetds/etc
I had spanish, i changed to us_english.
I would like to use it in spanish cause when you use some spanish characters
the application crashes.
I don't know any other way to do it.
[default]
date format = %b %d %Y %I:%M%p
[en_US]
date format = %b %d %Y %I:%M%p
language = us_english
char set = iso_1
[es_ES]
date format = %b %d %Y %I:%M%p
language = us_english << changed
char set = iso_1
----- Original Message -----
From: "Dan Anderson" <dan
mathjunkies.com>
To: "Martin Greco" <mgreco
solsis.com.ar>
Cc: <php-db
lists.php.net>; "PHP List" <php-general
lists.php.net>
Sent: Monday, September 15, 2003 6:42 PM
Subject: Re: [PHP] MS-SQL 2000 weird problem
> > Any thoughts?
>
> Are you dying and outputting an error where something could happen to
> bodge up the server?
>
> I'm not familiar with MS SQL Server, but I know under mysql:
>
> <?php
>
> $link = mysql_connect($host,$username,$password) or die("");
> // I forget the next line off the top of my head
> /* returns null if $link didn't work and we didn't die */
> $result = mysql_query("SELECT * FROM table");
>
> ?>
>
> -Dan
>
attached mail follows:
I think I finally found my answer to the missing piece:
from DevShed.com
URL: http://www.devshed.com/Server_Side/Administration/CREDIT/
Looks like the ISP needs to recompile the php! Dah!!!
Tim, thanks for the lead to the missing piece and the rest of the
invaluable information!
Karen
-----Original Message-----
From: Tim Thorburn [mailto:immortal
nwconx.net]
Sent: Monday, September 15, 2003 5:08 AM
To: Karen Lubrecht
Subject: Re: [PHP] Novice in eCommerce
Hi Karen,
Connecting the shopping cart with your credit card merchant account is
done
through the payment gateway - each company has their own methods of
doing
so. Depending which country you are in, and which merchant
account/hosting
provider you are using you'll need to talk to your gateway people and
see
how they'd like it done.
I've setup several eCommerce sites - both making my own shopping cart
and
using a pre-built one. Generally speaking, the less you have to do with
the payment gateway (by less I mean the more automated it is from the
merchant account/gateway people) the better it is for you - less risk
and
less liability.
Not sure if this has helped or not ... as I've only used 2 gateways to
date
and will be signing up with a new one mid-next week.
Let me know if I can be of any more assistance.
Thanks
-Tim
At 04:44 PM 9/14/2003, you wrote:
>this may not be the right place to ask this, but perhaps someone here
>can tell me what I don't know and should be trying to learn!
>
>I can uses php in the construction of a web site. I can create a data
>base and authenticate users. I can create a shopping cart. I know that
>osCommerce is highly thought of. I can get a merchant card. I know that
>a SSL certificate is needed and if it is shared due to a shared server,
>the insurance is only for the owner of the server not for those
>accounts hosted. I know how to encrypt email using PGP or GNUPG.
>
>What I seem to be dense about is the technique for connecting the
>credit card company and the shopping cart, and where the SSL fits into
>this code! Something just isn't making sense!
>
>My appologies if I am trying to get php to do something that it isn't
>meant to do! If you can tell me what should be doing it I would greatly
>appreciate it!!!!!!!!!
>
>TIA
>
>Karen
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]