|
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 01:58:00 -0000 Issue 2299
php-general-digest-help
lists.php.net
Date: Mon Sep 15 2003 - 20:58:00 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 16 Sep 2003 01:58:00 -0000 Issue 2299
Topics (messages 162632 through 162693):
Re: File Types
162632 by: Duncan Hill
162633 by: Ed Curtis
Re: Header and dfile download bug???
162634 by: Curt Zirzow
FAQ in PHP
162635 by: Suresh Babu.A [Support]
162637 by: Raditha Dissanayake
Printing reports
162636 by: Hardik Doshi
Win2K and trans_sid
162638 by: Adam H. Pendleton
162689 by: Raditha Dissanayake
Oracle8i PEAR Connection problem
162639 by: ORLANDO POZO
Re: [SMARTY] Re: dreamweaver extension
162640 by: carlos castillo
installation help
162641 by: Jeremiah Breindel
162647 by: Shadow
PEAR::Pager examples
162642 by: Mauricio Cuenca
Updated PayPal IPN class for PHP
162643 by: Jeremy Johnstone
Re: Using PHP to do something with Acrobat PDF....
162644 by: Luis Lebron
How do I squelch warnings (without editing php.ini)?
162645 by: Dan Anderson
162646 by: CPT John W. Holmes
162673 by: Curt Zirzow
What is wrong with this code ?
162648 by: Daniel Szasz
162650 by: Robert Cummings
162651 by: Miroslaw Milewski
162652 by: Carl Furst
PHP|Con insane pricing
162649 by: Jeremy Brand, B.S.
162672 by: Curt Zirzow
162674 by: Dan Anderson
162675 by: Chris Sherwood
162676 by: Roger B.A. Klorese
162677 by: Chris Shiflett
162678 by: Dan Anderson
162679 by: Dan Anderson
162680 by: Chris Sherwood
162681 by: Curt Zirzow
162682 by: Dan Anderson
162691 by: Jeremy Brand, B.S.
162692 by: CPT John W. Holmes
How to comment out chunk of html/php mixed code?
162653 by: Wei Wang
162654 by: Robert Cummings
162655 by: Gabriel Guzman
162656 by: CPT John W. Holmes
162657 by: Eugene Lee
162658 by: Jennifer Goodie
162671 by: Curt Zirzow
162688 by: Raditha Dissanayake
multiple FORMS on same page problem.
162659 by: Golawala, Moiz M (IndSys, GE Interlogix)
162661 by: Vail, Warren
162662 by: CPT John W. Holmes
162668 by: Chris Shiflett
Re: passthru causes php to lose internal variables
162660 by: exasperated
MS-SQL 2000 weird problem
162663 by: Martin Greco
162666 by: Dan Anderson
162670 by: Curt Zirzow
Re: browser detector (php side)
162664 by: Raquel Rice
abreviating echo commands
162665 by: Kris Yates
Is the "PHP List Automoderator" a spam bot?
162667 by: Dan Anderson
162669 by: Curt Zirzow
mysql_query not returning true on innodb
162683 by: daniel.electroteque.org
162684 by: daniel.electroteque.org
simple online form stuck at !isset($first) condition
162685 by: Wei Wang
162686 by: Curt Zirzow
162687 by: Wei Wang
Language filter
162690 by: Kris Reid
Oracle 8i problem connection with pear
162693 by: ORLANDO POZO
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:
On Monday 15 Sep 2003 14:23, Ed Curtis wrote:
> On Mon, 15 Sep 2003, Raditha Dissanayake wrote:
> > You don't need to look any further than mime.types files included in
> > your apache distro.
>
> Did that as well as googled for the list of extensions. Still can't seem
> to find the mime type for .pm7, .p65, .qxp and .pmd.
Didn't google hard enough :)
.pm5 application/x-pagemaker
I'd guess that can be extended to pm7 and 65 - I've seen x-pagemaker5 as
well.
pmd is also pagemaker according to filext.com, as well as some software I've
never heard of.
QXP is a good one, and you may need to ask the manufacturer of the software
what mime type is used.
attached mail follows:
> Didn't google hard enough :)
>
> .pm5 application/x-pagemaker
> I'd guess that can be extended to pm7 and 65 - I've seen x-pagemaker5 as
> well.
>
> pmd is also pagemaker according to filext.com, as well as some software I've
> never heard of.
>
> QXP is a good one, and you may need to ask the manufacturer of the software
> what mime type is used.
>
I think too that application/pagemaker should work for .p65 and .pm7
as well as .pmd (Page Maker Document). I think .qpx is a Quark Express
document but I can't find the mime for that anywhere.
Thanks for the repiles,
Ed
attached mail follows:
* Thus wrote Tristan.Pretty
risk.sungard.com (Tristan.Pretty
risk.sungard.com):
> header("Content-Disposition: attachment; filename=$file");
> header("Content-Length: " . filesize($path));
> header("Content-Type: " . filetype($path));
I didn't see this the first time, you should be calling:
mime_content_type()
And ensure that there is mime type defined in magic.mime for pdf.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
attached mail follows:
Hi Team,
How to track a posting in a faq using mysql.
Thanks in advance.
Suresh A.
attached mail follows:
Is this part of the 'mailing lists :: guess the missing paragraph'
competition?
Suresh Babu.A [Support] wrote:
>Hi Team,
>
>How to track a posting in a faq using mysql.
>
>Thanks in advance.
>
>Suresh A.
>
>
>
--
Raditha Dissanayake
----------------------------------------------------------
http://www.radinks.com/sftp/?sg
Lean and mean secure FTP applet in pure java.
Complete with Graphical User Inteface Just 150 kb in size.
attached mail follows:
Hi,
From the different PHP mailing lists archives i found
out that printing reports with the PDF is good
solution. Let me know if you guys know any better
solution for printing the reports.
Currently i am testing report module with the FPDF
library. My main goal is to print addresses
information of all the users. Now the critical part is
how can i set the page break if some user's record is
not completed on the particular page(Meaning, some of
the addresses information for particular user on the
first page and remaining on the second page). I would
like to set page break in the PDF when such kind of
conditions occur. Does any one know about it?
Thanks
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
attached mail follows:
I am running Apache 2.0.47 with PHP 4.3.3 on a Windows 2000 server, and
I am having some trouble getting cookie-less sessions to work. I've
search around trying to figure out how to get this to work, but most of
what i have found is people going to other way. To be clear, I am
trying to use PHP sessions *without* cookies (none at all). To do this
I have set use_cookies to 0 and use_trans_sid to 1, but all that does is
break sessions altogether. Is there a way to get this to work? What am
I doing wrong? Is what I am trying to do even possible with the PHP
session handler?
Any help or pointers would be greatly appreciated.
ahp
attached mail follows:
The only sure fire way to make sure you sessions do not get killed
without cookies is to append the session identifier to the end of each link.
Adam H. Pendleton wrote:
> I am running Apache 2.0.47 with PHP 4.3.3 on a Windows 2000 server,
> and I am having some trouble getting cookie-less sessions to work.
> I've search around trying to figure out how to get this to work, but
> most of what i have found is people going to other way. To be clear,
> I am trying to use PHP sessions *without* cookies (none at all). To
> do this I have set use_cookies to 0 and use_trans_sid to 1, but all
> that does is break sessions altogether. Is there a way to get this to
> work? What am I doing wrong? Is what I am trying to do even possible
> with the PHP session handler?
>
> Any help or pointers would be greatly appreciated.
>
> ahp
>
--
http://www.radinks.com/upload
Drag and Drop File Uploader.
attached mail follows:
Hello, mailing-list people, I need help about connect
the RDBMS Oracle8i through PEAR library, look this code
<html><head><title>Test DB Class - PEAR</title></head>
<body>
<table border=1>
<tr><th>NAME</th><th>PHONE</th><th>ADDRESS</th></tr>
<?php
//connect
require_once('DB.php');
$db
=DB::connect("oci8://system:manager
localhost/orcl");
// message
if (DB::iserror($db)) {
die($db->getMessage());
}
//issue the query
$sql ="SELECT *
FROM S_CUSTOMER";
$q =$db->query($sql);
// message
if (DB::iserror($q)) {
die($q->getMessage());
}
//generate table
while ($q->fetchInto($row)) {
?>
<tr><td><?= $row[0] ?></td>
<td><?= $row[1] ?></td>
<td><?= $row[2] ?></td>
</tr>
<?php
}
?>
</table>
</body></html>
When I execute this code, I receive this output:
DB Error: extension not found
NAME PHONE ADDRESS
I think that is a problem with the DSN in the
connection (oci8://system:manager
localhost/orcl)
I put oci8 for the db type, user: system, pass: manager,
and db: orcl
I could connect oracle8i with PHP, but using ODBC methods,
I want now connect oracle8i through the PEAR library.
If someone know, please give me a hand, thanks.
attached mail follows:
I would like to know too, where i can get the dreamweaver extension for
smarty, thanks!
Carlos A. Castillo.
Ingeniero de desarrollo
ccastillo
imagine.com.co
____________________________________
Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia
____________________________________
- Soluciones web para Internet e Intranet
- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico
____________________________________
-----Mensaje original-----
De: Mattia Cazzola [mailto:mattia.c
libero.it]
Enviado el: lunes, 15 de septiembre de 2003 11:40
Para: smarty-general
lists.php.net
Asunto: [SMARTY] Re: dreamweaver extension
It's not very clear what you mean with "dreamweaver extension for
smarty". Smarty in not a piece of dreamweaver. Smarty is a standalone
project, not made bi Macromedia.
Usully template files used by smarty use .tpl or .html extension. But
that is not something special related to dreaweaver.
Pete M wrote:
> Anyone know where the dreamweaver extension for smarty is ? - its not
> on
> Macromedia's site and the one at tiki.org crashes ;-(
>
> tia
>
> pete
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I was recently involved in installing PHP 4.3.2 on a NT 4 server with IIS 4.
We followed all of the installation instructions, but whenever we tried to
run a test script through a browser to see if PHP was installed correctly,
all the page did was load. And load and load and load. It never displayed
the text it was supposed to, and it never errored out. Anybody have any
ideas?
I also had phpinfo run as a script through the server, with the same
results.
Jeremiah Breindel
jeremiah.breindel
creativew.com
attached mail follows:
You didn't configure something right. I would go over the install steps
again. I installed Foxserv on NT without IIS but I did install 4.3.2 on
Windows 2003 server and found the instructions here a god-send.
http://www.php.net/manual/en/install.windows.php
Basically you need to make sure that php.ini is in \windows and
php4isapi.dll in \windows\system32. I also had to configure IIS to allow me
to run scripts.
Shadow
attached mail follows:
Hello,
I've been using the PEAR::DB_Pager class for a while, but looking at the
PEAR documentation I saw that there is another database paging class.
PEAR::Pager (http://pear.php.net/package/Pager/). It seems to be good, but I
couldn't find any documentation about it.
Has anyone had any experiencie with this package that can share ?
TIA,
____________________
Mauricio Cuenca
attached mail follows:
Unfortunately it seems PayPal has broke IPN processing for PHP users
recently. This is important news because a good majority of the people
using IPN with a PHP script are no longer able to automatically process
payments, and PayPal offers nothing to help PHP users who are having
trouble. In fact they claim that they changed nothing and that it is the
user's fault that it suddenly stopped working one day. The problem
actually is that PayPal now seems to require your IPN script to follow a
http redirection. After trying almost everything, within reason, to
avoid this redirection, it seems no matter whether you use GET or POST
and HTTP or HTTPS they force you to follow the redirect. The solution to
this problem is to use cURL so PHP can follow the redirection and thus
get the VERIFIED or INVALID response from PayPal. A new PHP class which
works perfectly with the current PayPal IPN (and should always work even
if they fix the bug) is available at http://www.scriptdevelopers.net. It
is a modified version of the class by Pineapple Technologies which is
commonly used all over the Internet and is a drop in replacement for
their paypal_ipn.php class. If you use a class named paypal_ipn.php,
then most likely you will need to get this updated version. The script
is licensed under the GPL.
attached mail follows:
I use htmldoc http://www.easysw.com/htmldoc/ to generate pdf files from html
documents. Another options is fpdf http://www.fpdf.org.
Luis
-----Original Message-----
From: Scott Fletcher [mailto:scott
abcoa.com]
Sent: Friday, September 12, 2003 9:11 AM
To: php-general
lists.php.net
Subject: [PHP] Using PHP to do something with Acrobat PDF....
Hi Fellas!!
Know of any good websites that would provide tutorials, step-by-step,
and/or a PHP scripts of creating a PDF, putting datas into PDF, along with
Printing PDF, Saving PDF files, etc... I have no experience with using PHP
and PDF so I need both a tutorial and quick, plain to the point of PHP
script of PDF stuffs. From there I can start reviewing on how it work, what
function is being used, etc. Then look at all of the available PHP
functions for PDF, add what I need or take out what I don't need, etc.
(Customize), etc...
Another question, does using PDF require the use of some configuration
in php.ini?? How does PHP do the PDF stuffs if there is no PDF on the
server? Etc...
Thanks!
Scott F.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I am running a script that occasionally utters a few warnings when the
user does something dumb (but it does not kill the script). Is there a
way to turn off warnings within a script? I really don't want my users
to see them.
Thanks in advance,
Dan Anderson
attached mail follows:
From: "Dan Anderson" <dan
mathjunkies.com>
> I am running a script that occasionally utters a few warnings when the
> user does something dumb (but it does not kill the script). Is there a
> way to turn off warnings within a script? I really don't want my users
> to see them.
Short of fixing your code, adjust the error_reporting() level.
us2.php.net/error_reporting
---John Holmes...
attached mail follows:
On Mon, 15 Sep 2003 13:20:05 -0400, Dan Anderson <dan
mathjunkies.com>
wrote:
> I am running a script that occasionally utters a few warnings when the
> user does something dumb (but it does not kill the script). Is there a
> way to turn off warnings within a script? I really don't want my users
> to see them.
You can lazily suppress errors on the fly like so
call_func();
the
will suppress error messages being sent directly to the browser.
Curt
attached mail follows:
Hello
What is wrong with this code ?
$doWork = $_GET[doWork];
echo $doWork;
echo ( "<BR>");
if ( $doWork = 0) {
exit;
}
else
{
if ( $doWork = 1) {
?>
<input class=no type="button" value="Accept" onClick="doAccept();">
<input class=no type="button" value="Reject" onClick="doReject();">
<?
};
if ( $doWork = 2) {
echo ( "call request accepted");
};
if ( $doWork = "3") {
echo ( "call request rejected");
}
}
I still got in the page the 2 buttons and the 2 echo's from doWork = 2 and
doWork = 3.
Thanks
Daniel
attached mail follows:
On Mon, 2003-09-15 at 15:29, Daniel Szasz wrote:
> Hello
>
> What is wrong with this code ?
>
> $doWork = $_GET[doWork];
This is sloppy, put the quotes around the key string "doWork".
> echo $doWork;
> echo ( "<BR>");
> if ( $doWork = 0) {
You just assigned 0 to $doWork, try using 0 == $doWork
> exit;
> }
> else
> {
> if ( $doWork = 1) {
Once again, assignment when comparison is probably intended.
> ?>
> <input class=no type="button" value="Accept" onClick="doAccept();">
> <input class=no type="button" value="Reject" onClick="doReject();">
> <?
> };
> if ( $doWork = 2) {
Yet again with the assignment.
> echo ( "call request accepted");
> };
> if ( $doWork = "3") {
Another assignment, but now it's a string, not even any consistency.
> echo ( "call request rejected");
> }
> }
>
> I still got in the page the 2 buttons and the 2 echo's from doWork = 2 and
> doWork = 3.
Looks like you're a coding slob IMHO.
Rob.
--
.---------------------------------------------.
| 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:
Daniel Szasz wrote:
> What is wrong with this code ?
== instead of =.
--
miro.
attached mail follows:
If should use double equals for comparison.. if ($doWork == 1) { etc here}.
Of course doing multiple tests like this you are better off using switch
case...
Switch ($doWork) {
Case 0:
Exit;
Break;
Case 1:
DoOne($arguments);
Break;
Case 2:
DoTwo($arguments);
Break;
}
each number after the case statement is the value that $doWork will be
tested against.. look up Switch in the php manual, it's behavior can be a
bit weird especially if you forget to "break" if you don't break it's like
an OR statement/gate;
Carl.
-----Original Message-----
From: Daniel Szasz [mailto:danysz
yahoo.com]
Sent: Monday, September 15, 2003 3:29 PM
To: php-general
lists.php.net
Subject: [PHP] What is wrong with this code ?
Hello
What is wrong with this code ?
$doWork = $_GET[doWork];
echo $doWork;
echo ( "<BR>");
if ( $doWork = 0) {
exit;
}
else
{
if ( $doWork = 1) {
?>
<input class=no type="button" value="Accept" onClick="doAccept();">
<input class=no type="button" value="Reject" onClick="doReject();">
<?
};
if ( $doWork = 2) {
echo ( "call request accepted");
};
if ( $doWork = "3") {
echo ( "call request rejected");
}
}
I still got in the page the 2 buttons and the 2 echo's from doWork = 2 and
doWork = 3.
Thanks
Daniel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
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:
On Mon, 15 Sep 2003 11:27:37 -0700, Jeremy Brand <jeremy
nirvani.net>
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?
I think technically its PHP{con west
>
> The pricing seems insane, and geared towards people with lots of spare
> money...
There is nothing insane, IMO, most events like this usually cost much more.
and no, i don't have lots of spare money to spend to go to this.
Curt.
attached mail follows:
> 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:
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
>
>
attached mail follows:
> 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
I'm sure that, like most conferences and trainings, the assumption is that
people will attend who are either employed in the subject area -- in which
case they need to get their employers to ante up -- or are independent
contractors in the subject area -- in which case they need to treat it as a
legitimate business expense for tax purposes. It's not a "friends of PHP"
sci-fi con...
attached mail follows:
--- Dan Anderson <dan
mathjunkies.com> wrote:
> speakers (very pricey), etc.
Unless I'm missing out on all the gold (which is a possibility), speakers
usually get a very modest honorarium and their expenses paid. I can't imagine
that speakers are the most significant cost of a conference.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
attached mail follows:
> Yea its not bad if you dont have a life outside of programming and/or
> computers
Well most professionals who would go to this conference -- IMHO -- would
be doing it because it would be worth while. For instance, I considered
going because if it reduced the time it takes for me to develop software
by just 1% it would more then pay itself off.
> 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...
Well there are a number of things to consider. It is a lot about what
you value and how you manage your money. (Pick up a copy of one of the
Rich Dad's series in your local library / bookstore to see what I mean).
> heh yea the average salary is 50K but then when the government takes 40% (if
> your canadian) that is not a whole lot
(50000 - (.40 * 50000) == 30000)
That's a heckuva lot of money. Especially when you consider you
canadians have a cradle to grave socialist system that covers major
expenses for us from the US like healthcare. Of course, I don't know
your particular situation. What would be reasonable to you?
-Dan
attached mail follows:
> Unless I'm missing out on all the gold (which is a possibility),
speakers
> usually get a very modest honorarium and their expenses paid. I can't imagine
> that speakers are the most significant cost of a conference.
Well it does depend on the fame (or infamy) of the speaker. If you want
Bill Clinton to speak for you be prepared to cough up a couple hundred
grand. If you want somebody else well....::shrugs::
But remember that all expenses paid part. Let's say a meal costs $5 a
person (to be cheap). That's not a lot of money. But rooms can cost
upwards of $100 a night (probably at least $60 even with the discount).
So that plus food + everything else for the speaker can add up.
Of course, I haven't seen the finances of this conference. But I would
suspect that $495 is a reasonable price.
-Dan
attached mail follows:
> > Yea its not bad if you dont have a life outside of programming and/or
> > computers
> Well most professionals who would go to this conference -- IMHO -- would
> be doing it because it would be worth while. For instance, I considered
> going because if it reduced the time it takes for me to develop software
> by just 1% it would more then pay itself off.
lol that I agree with
> > 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...
> Well there are a number of things to consider. It is a lot about what
> you value and how you manage your money. (Pick up a copy of one of the
> Rich Dad's series in your local library / bookstore to see what I mean).
ah like with 4 kids I have nothing better to do than run down and grab a
book and evaluate my parenting skills.
never mind keeping up with the current advances in techniques and technology
> > heh yea the average salary is 50K but then when the government takes 40%
(if
> > your canadian) that is not a whole lot
> (50000 - (.40 * 50000) == 30000)
umm I take it you dont have kids and only pay part of the rent or what not?
lets see rent is 1200/mo
1200 * 12 = 14400
and umm socialist system.. umm where you been hiding?
at least I dont live in a police state.
> That's a heckuva lot of money. Especially when you consider you
> canadians have a cradle to grave socialist system that covers major
> expenses for us from the US like healthcare. Of course, I don't know
> your particular situation. What would be reasonable to you?
>
> -Dan
>
>
attached mail follows:
* Thus wrote Chris Sherwood (csherwood
nortialearning.com):
> and umm socialist system.. umm where you been hiding?
> at least I dont live in a police state.
ouch :)
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
attached mail follows:
> ah like with 4 kids I have nothing better to do than run down and grab a
> book and evaluate my parenting skills.
It's not about parenting but about money management. It's pretty cool
and shows you how to minimize taxes (so the govn't gets less then 40%).
> umm I take it you dont have kids and only pay part of the rent or what not?
No kids. Full time programmer. Putting as much away as possible and
hoping to retire at 40.
> lets see rent is 1200/mo
> 1200 * 12 = 14400
With 4 kids I can understand that.
> and umm socialist system.. umm where you been hiding?
I pay for health care and other things out of pocket. Socialism in the
form of government handouts should not be confused with communism.
> at least I dont live in a police state.
I hate the patriot act.
-Dan
attached mail follows:
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.
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
attached mail follows:
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?
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
attached mail follows:
hi,
This may sound very newbie. But since html comment uses <!-- --> which doesn't comment out the
php code. And the php comment /**/ // apparently doesn't work on html. So how do I comment out
a chunk of html/php mixed code?
Many thanks,
Wei Wang
attached mail follows:
You might try the following:
<!-- <?php /*
*/ ?> -->
This is untested, I've never had to face the issue.
Cheers,
Rob.
On Mon, 2003-09-15 at 15:59, Wei Wang wrote:
> hi,
>
> This may sound very newbie. But since html comment uses <!-- --> which doesn't comment out the
> php code. And the php comment /**/ // apparently doesn't work on html. So how do I comment out
> a chunk of html/php mixed code?
>
>
> Many thanks,
>
> Wei Wang
--
.---------------------------------------------.
| 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 Monday 15 September 2003 12:59 pm, Wei Wang wrote:
> hi,
>
> This may sound very newbie. But since html comment uses <!-- --> which
> doesn't comment out the php code. And the php comment /**/ // apparently
> doesn't work on html. So how do I comment out a chunk of html/php mixed
> code?
probably the easiest way is to just do this:
<?php /*
your mixed html and php code here
*/ ?>
that way php will take everything inside the <?php ?> tags and comment them
out, regardless of if they are html or php or whatever.
hth,
gabe.
attached mail follows:
From: "Wei Wang" <ww220
cam.ac.uk>
> This may sound very newbie. But since
> html comment uses <!-- --> which doesn't
> comment out the php code. And the php
> comment /**/ // apparently doesn't work
> on html. So how do I comment out a
> chunk of html/php mixed code?
/* and */ appears to work:
<?php
/*
echo "hello world";
?>
HTML
<?php
*/
echo "bye";
?>
That'll just display "bye"... You just have to start the comment in PHP mode
and end it in PHP mode. Any breaking out of PHP mode to display HTML will be
commented out.
If you have mostly HTML with some PHP thrown in that you want to comment
out, HTML comments will work, also, so long as you start the comment in HTML
mode and end it in HTML mode, like this:
HTML
<!--
HTML
<?php echo "hi"; ?>
HTML
-->
HTML
Which will just display "HTML" twice. The center part is commented out.
---John Holmes...
attached mail follows:
On Mon, Sep 15, 2003 at 08:59:53PM +0100, Wei Wang wrote:
:
: This may sound very newbie. But since html comment uses <!-- -->
: which doesn't comment out the php code. And the php comment /**/ //
: apparently doesn't work on html. So how do I comment out a chunk of
: html/php mixed code?
Remove the chunk of mixed code and save it into an external PHP file,
e.g. mixed_code.php. In place of removed chunk, use an include() or
require() statement, e.g. include("mixed_code.php"). Now comment
that one line in or out as needed.
attached mail follows:
> <?php /*
>
> your mixed html and php code here
>
> */ ?>
>
> that way php will take everything inside the <?php ?> tags and
> comment them
> out, regardless of if they are html or php or whatever.
This won't work is your PHP code has comments using /* */ syntax in it
already. I always just through an if(false){ } around huge portions of
mixed content that I want to comment out. Unless you have unbalanced curly
braces in the chunk you want to comment out, it should work.
attached mail follows:
On Mon, 15 Sep 2003 20:59:53 +0100, Wei Wang <ww220
cam.ac.uk> wrote:
> hi,
>
> This may sound very newbie. But since html comment uses <!-- --> which
> doesn't comment out the
> php code. And the php comment /**/ // apparently doesn't work on html. So
> how do I comment out
> a chunk of html/php mixed code?
for temporary comments I do what jennifer does and use a if(false) block to
not execute it
<?php
if(false) {
// other php code
/* that has comments like this */
?><html code><?php
} // if false
?>
attached mail follows:
Wrong approach all together. Start using CVS
Wei Wang wrote:
>hi,
>
>This may sound very newbie. But since html comment uses <!-- --> which doesn't comment out the
>php code. And the php comment /**/ // apparently doesn't work on html. So how do I comment out
>a chunk of html/php mixed code?
>
>
>Many thanks,
>
>Wei Wang
>
>
--
http://www.radinks.com/upload
Drag and Drop File Uploader.
attached mail follows:
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
attached mail follows:
I don't know of any rule that says you cannot have two submit button in the same form.
Of course, if you need to know which was clicked, you will either need to name them differently or detect their values in your form processing routine. If the button is clicked that should take you to another form simply do a redirect (after processing all $_POST information);
header("Location: new page");
exit; // I always use this because processing continues after header
good luck,
Warren Vail
-----Original Message-----
From: Golawala, Moiz M (IndSys, GE Interlogix)
[mailto:Moiz.Golawala
ge.com]
Sent: Monday, September 15, 2003 1:17 PM
To: php-general
lists.php.net
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
attached mail follows:
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
attached mail follows:
--- "Golawala, Moiz M (IndSys, GE Interlogix)" <Moiz.Golawala
ge.com> wrote:
> I am creating a page with 2 buttons.
...
> <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>
...
> I would like to see the variable 'someVal' in the $_POST of both
> "page4 Submit" button and "page5 Submit" button.
Then put someVal in both forms. When you submit a form, only the data in the
form will be sent to the server.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
attached mail follows:
system() has the same problem as passthru. Thanks for the suggestion
anyway.
I wonder if I should post this to the bug list?
"Nicole" <430ntr3k
aeontrek.com> wrote in message
news:20030915090814.47764.qmail
pb1.pair.com...
> Hi,
>
> Did you try using the system() command instead and skip using exec and
> passthru?
>
> --
> Nicole
>
>
> "Exasperated" <php
instruform.com> wrote in message
> news:20030914202252.32486.qmail
pb1.pair.com...
> > Anyone come across something like this before?
> >
> > I have made a little test script as follows:
> > <?
> > header ("Content-Type: application/pdf");
> > $command_line = "/usr/bin/pdflabelseries " .
> > escapeshellcmd($_POST['labelstart']) . " " .
> > escapeshellcmd($_POST['labelend']);
> > exec ("echo \"$command_line\" >/opt/specs/labels.txt");
> > //passthru($command_line);
> > ?>
> >
> > The form takes input from a posted form with two variables, labelstart
and
> > labelend. In the above test, if I put in 'start' and 'end' as the
posted
> > variable data, the output from /opt/specs/labels.txt (writable by the
http
> > server) is:
> > /usr/bin/pdflabelseries start end
> > All is well and good. Now is where it heads South. I uncomment the
> > passthru command above. The output from the script in
> /opt/specs/labels.txt
> > from the same posted form with the same data entered is now:
> > /usr/bin/pdflabelseries
> > pdflabelseries is a C program that I have confirmed works perfectly on
the
> > command line (i.e. generates the requisite pdf file to stdout).
> > Even if the C program fails (which it does not appear to do from the
> output
> > in the httpd logs as it outputs its command line to stderr), surely php
> > should not lose its own internal variables, especially, for a command
that
> > is executed BEFORE the passthru command.
> >
> > I am truly baffled.
> >
> > Any help appreciated.
> > Regards
> >
> > Mark
> >
> > I am running vanilla Mandrake 9.1 with the following PHP rpms:
> > libphp_common430-430-11mdk
> > php-pear-4.3.0-3mdk
> > apache2-mod_php-2.0.44_4.3.1-2mdk
> > php-xml-4.3.0-2mdk
> > php-dba_bundle-4.3.0-4mdk
> > php-pgsql-4.3.0-4mdk
> > php-xmlrpc-4.3.0-2mdk
> > php-manual-en-4.3.0-2mdk
> > php430-devel-430-11mdk
> > php-gd-4.3.0-2mdk
attached mail follows:
Hi everyone.
I have a Redhat 8 box with Apache 2.0.40, PHP 4.3.1, FreeTDS 0.61 to work
with an MS-SQL2000 server.
It works fine and I have no problems but today i found this.
When i call specific stored procedures it retrieve no rows, and if i paste
this query on the Query Analizer it works fine.
The function mssql_num_fields() shows correctly the number of fields.
The strange thing is that it was working a day ago (the same code).
Any thoughts?
--
###################
# Martin Greco
attached mail follows:
> 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:
On Mon, 15 Sep 2003 15:21:41 -0300, Martin Greco <mgreco
solsis.com.ar>
wrote:
> Hi everyone.
>
> I have a Redhat 8 box with Apache 2.0.40, PHP 4.3.1, FreeTDS 0.61 to work
> with an MS-SQL2000 server.
>
> It works fine and I have no problems but today i found this.
>
> When i call specific stored procedures it retrieve no rows, and if i
> paste
> this query on the Query Analizer it works fine.
> The function mssql_num_fields() shows correctly the number of fields.
I'm just taking a wild stab at this but maybe somethings changed with the
database structure.. try re-saving the storedprocedure so it will update
its cache.
Curt
attached mail follows:
On Mon, 15 Sep 2003 13:54:19 +0800
"Louie Miranda" <louie
axishift.ath.cx> wrote:
> Im looking for a browser detector and can redirect to a certain
> page if its match something. So far phpsniff is the only thing i
> found.
>
> But i didnt got it to work d redirection part.
>
> any ideas?
>
>
> -
> Louie
>
Did you try: $_SERVER['HTTP_USER_AGENT'];
--
Raquel
============================================================
Far away in the sunshine are my highest aspirations. I may not reach
them, but I can look up and see the beauty, believe in them and try
to follow where they lead.
--Louisa May Alcott
--
Raquel
============================================================
Far away in the sunshine are my highest aspirations. I may not reach
them, but I can look up and see the beauty, believe in them and try
to follow where they lead.
--Louisa May Alcott
attached mail follows:
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?
Thanks,
Kris
attached mail follows:
I just got an email from some daemon claiming to be the "PHP List
Automoderator" asking me to reply before my e-mail could be sent to the
list. I assume that this is a spam bot. Anybody else having this
problem?
-Dan
attached mail follows:
On Mon, 15 Sep 2003 17:49:44 -0400, Dan Anderson <dan
mathjunkies.com>
wrote:
> I just got an email from some daemon claiming to be the "PHP List
> Automoderator" asking me to reply before my e-mail could be sent to the
> list. I assume that this is a spam bot. Anybody else having this
> problem?
that usually happens when you send a post/reply to the list with an email
that
isn't subscribed to the list.
curt.
attached mail follows:
Hi there i have a random issue where mysql_query is not returning true
sometimes on an innodb table which will trigger a custom error, this
happens randomly if i go back to that page its fine ??
attached mail follows:
i am doing a straight mysql_query without an autocommit=0 should i be doing
an autocommit=0 if i am doing a read ?
> Hi there i have a random issue where mysql_query is not returning true
> sometimes on an innodb table which will trigger a custom error, this
> happens randomly if i go back to that page its fine ??
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
hi, all,
I have this code at http://weiwang.freeshell.org/formprac.php and the execution kept stuck at
the condition part of:
if(!isset($first)) {
show_form();
}
Even if I input some text into both field and click submit, the execution wouldn't go to any other
conditional branch and be stuck at this one.
Any advice would be greatly appreciated.
Wei Wang
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h2>Simple Form Example</h2>
<? function show_form($first="",$last="") { ?>
<form action="formprac.php" method="POST">
First Name:
<input type=text name=first value="<?echo $first?>">
<br>
Last Name:
<input type=text name=last value="<?echo $last?>">
<br>
<input type=submit>
</form>
<? }
if(!isset($first)) {
show_form();
}
else {
if(empty($first) or empty($last)) {
echo "You did not fill in all the
fields, try again<p>";
show_form($first,$last);
}
else {
echo "Thank you, $first $last";
}
}
?>
</body>
</html>
attached mail follows:
* Thus wrote Wei Wang (ww220
cam.ac.uk):
>
> <? function show_form($first="",$last="") { ?>
>
> <form action="formprac.php" method="POST">
note the method ----------------------^^^^
> First Name:
> <input type=text namerst value="<?echo $first?>">
> <br>
> Last Name:
> <input type=text name=last value="<?echo $last?>">
> <br>
>
> <input type=submit>
> </form>
>
> <? }
>
>
> if(!isset($first)) {
make this
if (!isset($_POST['first'])) {
see:
http://php.net/language.variables
http://us3.php.net/register_globals
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
attached mail follows:
Dear Curt,
Thanks a lot. Is this related to the register_global variable as well? I was
stuck at the $request_method and $_SERVER['request_method'] for quite
a long time.
Wei
----- Original Message -----
From: "Curt Zirzow" <php-general
zirzow.dyndns.org>
To: <php-general
lists.php.net>
Sent: Tuesday, September 16, 2003 1:22 AM
Subject: Re: [PHP] simple online form stuck at !isset($first) condition
> * Thus wrote Wei Wang (ww220
cam.ac.uk):
> >
> > <? function show_form($first="",$last="") { ?>
> >
> > <form action="formprac.php" method="POST">
> note the method ----------------------^^^^
>
> > First Name:
> > <input type=text name=first value="<?echo $first?>">
> > <br>
> > Last Name:
> > <input type=text name=last value="<?echo $last?>">
> > <br>
> >
> > <input type=submit>
> > </form>
> >
> > <? }
> >
> >
> > if(!isset($first)) {
>
> make this
> if (!isset($_POST['first'])) {
>
> see:
> http://php.net/language.variables
> http://us3.php.net/register_globals
>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Hi All
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.
I want to build a language filter but can't think of good way of doing in it.
The best idea I found on the net was to have a DB of dirty words.
Then when someone submits the form check their entree against the DB.
This seems a little labour intensive and won't work if someone submits something like youraf*&!head.
Any ideas?
Thanks
Kris
attached mail follows:
Hello, mailing-list people, I need help about connect
the RDBMS Oracle8i through PEAR library, look this code
<html><head><title>Test DB Class - PEAR</title></head>
<body>
<table border=1>
<tr><th>NAME</th><th>PHONE</th><th>ADDRESS</th></tr>
<?php
//connect
require_once('DB.php');
$db
=DB::connect("oci8://system:manager
localhost/orcl");
// message
if (DB::iserror($db)) {
die($db->getMessage());
}
//issue the query
$sql ="SELECT *
FROM S_CUSTOMER";
$q =$db->query($sql);
// message
if (DB::iserror($q)) {
die($q->getMessage());
}
//generate table
while ($q->fetchInto($row)) {
?>
<tr><td><?= $row[0] ?></td>
<td><?= $row[1] ?></td>
<td><?= $row[2] ?></td>
</tr>
<?php
}
?>
</table>
</body></html>
When I execute this code, I receive this output:
DB Error: extension not found
NAME PHONE ADDRESS
I think that is a problem with the DSN in the
connection (oci8://system:manager
localhost/orcl)
I put oci8 for the db type, user: system, pass:
manager,
and db: orcl
I could connect oracle8i with PHP, but using ODBC methods,
I want now connect oracle8i through the PEAR library.
If someone know, please give me a hand, thanks.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]