I don't want to use $_REQUEST['my_passed_variable'] at all.
Right now when I do an sql insert on my local machine I have to use the
following syntax:
INSERT into tablename (field name list)
VALUES ($_REQUEST['var1'], $_REQUEST['var2'], $_REQUEST['var3'])
I just want to use $var1, $var2, $var3
At 02:48 30.01.2003, Noah said:
[snip]
>Yup. Restarted Apache.
>
>PHP's still not evaluating the passed form vars whether register globals is
>set to On or Off
[snip]
Just thinking the unthinkable...
Most of
then run extract($_REQUEST); just above where you want to use the var1
var2... and it will place all the key => value pairs into the local scope.
Jim
- Original Message -
From: "Noah" <[EMAIL PROTECTED]>
To: "Philip Olson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, Janu
On Thursday 30 January 2003 09:55, Noah wrote:
> I don't want to use $_REQUEST['my_passed_variable'] at all.
>
> Right now when I do an sql insert on my local machine I have to use the
> following syntax:
>
> INSERT into tablename (field name list)
> VALUES ($_REQUEST['var1'], $_REQUEST['var2'], $
Sure.
In the code below, class_type is passed in the query_string (e.g.
index.php?section_id=12&page_type=class_submit&class_type=apartments)
Also, below sql values are sent via a post.
Code Snippet ***
switch($_REQUEST['class_type']) {
case 'apartments';
At 02:55 30.01.2003, Noah said:
[snip]
>I don't want to use $_REQUEST['my_passed_variable'] at all.
>
>Right now when I do an sql insert on my local machine I have to use the
>following syntax:
>
>INSERT into tablename (field name list)
>VALUES ($_REQUEST['va
Has anyone got a PHP/*nix equivalent solution to the MS Shared VB
Object/Component model?
See:
http://www.cyscape.com/products/country/docs/countryhawk/getselectlist_metho
d.htm for an example of a useful component.
Thanks,
Luke Woollard
--
PHP General Mailing List (http://www.php.net/)
To un
I'm trying to use Pear on a server that had an old version of Pear, so I put the pear
directory in the directory where I'm working, and am including ini_set('include_path',
'path to pear'); at the top of my file. I then have
require_once('PEAR.php');
require_once('PEAR/Command/Auth.php'
why would it matter if he does it just above the place that he is going to
use them?
doesn't matter if he is in a function or not. the $_REQUEST var will always
be available.
if he calls a function then he would have to do it just inside the function
or pass it to the function.
Jim
- Origin
> $a = new Auth("DB", $dsn, "loginFunction");
>
>
> which is causing this:
>
> Fatal error: Cannot instantiate non-existent class: auth in
> /opt/docs/www.xxx.net/passthru.php on line 21
>
> Anyone know what I'm doing wrong? Is there a better example of
functional
> Auth code out there?
Since
$fname is the name of the file i want to download. It works in IE, as in the name of
the file to be downloaded appears correctly in the dialog box. I changed
'application/octet' to 'application/octet-stream' and this had no effect.
Dara
- Original Message -
From: Chris Shiflett <[EMAIL P
> $fname is the name of the file i want to download. It works in IE, as
in
> the name of the file to be downloaded appears correctly in the dialog
box.
> I changed 'application/octet' to 'application/octet-stream' and this
had
> no effect.
Maybe find a site that works correctly on the browser in q
how do i examine the headers sent?
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
Date: Wed, 29 Jan 2003 20:06:47 -0500
To: "''Dara Dowd''" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]>
Subject: RE: [PHP] content type header for downloading files
> > $fna
Hi,
I have a conditional:
if (a == b)
a is the number 0, but b is a string "Friday August 22".
The condition is evaluating as true, which is not what I want.
What am I misunderstanding?
Thanks,
Stephen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
> I have a conditional:
> if (a == b)
>
> a is the number 0, but b is a string "Friday August 22".
>
> The condition is evaluating as true, which is not what I want.
> What am I misunderstanding?
You're comparing a string to a number perhaps?
I tried this:
-8<-
$a = 0;
$b = "Frid
> What happens when you run this?
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in
/home/virtual/site125/fst/var/www/html/atracker/assignments/index.php on
line 15
ID Number Name Created by Created on Due on Class
Warning: mysql_fetch_array(): suppli
- Original Message -
From: "R0x0r Mc0wnage" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 8:49 PM
Subject: Re: [PHP] Functions and arguments
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result
> resource in
> /home/virtual/site125
On Thursday 30 January 2003 02:39, David Freeman wrote:
> -8<-
> $a = "0";
> $b = "Friday August 22";
> -8<-
>
> and resulted in 'no match'.
Or try
$a = 0;
$c = (string) $a; // Now $c == "0"
or
if (( (string) $a == (string) $b)) {
...
The manual could be your friend, to
> > What happens when you run this?
I made some tweaks to the way I was running sessions, and now it works. I'm
still getting an error unfortunately, but it's less conspicuous and spammy
this time:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in
/home/vir
Stephen,
"Friday August 22" evaluates to the number 0. (check the docs for intval())
Therefore the condition would be true.
I stated in an earlier thread this week. It is bad for to allow PHP todo
your conversions for you. At the least it's lazy, at the most it will cause
unpredictable results.
You can do either, many people have responded and given their thoughs on
the matter. I personally avoid storing images in a database, the
filesystem is better equipped IMO to handle files. On top of the
overhead of storing the image in your database you will be creating
additional database traffi
Cal,
Thanks for the suggestion. I looked up equality on www.php.net, and
there are many comments about how == works.
I also found out === works too, or is that still lazy?
Thanks,
Stephen
Cal Evans wrote:
Stephen,
"Friday August 22" evaluates to the number 0. (check the docs for intval())
The
$a === $b
TRUE if $a is equal to $b, and they are of the same type. (PHP 4 only)
> -Original Message-
> From: David Freeman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 29, 2003 7:39 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] if (a == b) ...
>
>
>
> > I have a condition
Checked out the php.ini file.
register_globals is set to On -- there is no semicolon or other character
that would cause a problem.
This might be a problem with the Apache, Win2k combination -- I don't
know..
--Noah
- Original Message -
From: "Ernest E Vogelsinger" <[EMAIL PROTE
H.
Sounds like "resorting" to extract($REQUEST) might have a downside?
Otherwise, I'll use it for now.
Thanks,
--Noah
- Original Message -
From: "Ernest E Vogelsinger" <[EMAIL PROTECTED]>
To: "Noah" <[EMAIL PROTECTED]>
Cc: "Philip Olson" <[EMAIL PROTECTED]>; <[EMAIL PROTEC
I'm using PHP 4.2.3, Apache 1.2.24 on OpenBSD 3.1.
(http://ardvark.upnix.net/phpinfo.php)
I'm running a fairly busy server that has a number of virtual hosts.
Safe mode is off, I don't (and never did) use open_basedir anywhere and
my php.ini file is the default one (untouched) from my PHP install.
You never answered if this was in a function or class method. Is it? Did
you say whether it was Apache 1 or 2?
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
> -Original Message-
> From: Noah [mailto:[EMAIL PROT
> You never answered if this was in a function or class
> method. Is it? Did you say whether it was Apache 1 or 2?
Also, to check what the register_globals setting really
is, make a call to phpinfo() as it will tell you the
true setting. Sometimes the wrong php.ini is edited
or the web server
Trying to decide between wrappers for a rather large application, and
wanted some input from the group as I haven't used any of these to any
degree. So far, I've found PearDB, metabase, adodb, and MDB.
What's the best option? My main concerns are speed and good community
support.
All input is *
This suggested solution is not quite what i was looking for (I was aware of
it already):
A: input TYPE=IMAGE NAME="parent" VALUE="foo" SRC="icon.gif">
The above uses an image as a bitmap and gets the x,y values where it was
clicked. I'd like to use an ICON (instead of a standard submit button) a
> Trying to decide between wrappers for a rather large application, and
> wanted some input from the group as I haven't used any of these to any
> degree. So far, I've found PearDB, metabase, adodb, and MDB.
>
> What's the best option? My main concerns are speed and good community
> support.
>
[snip]
> I assume i could use solution "A" above, and parse the _x out of the "name"
> value .. but this seems pretty hoaky and it's my understanding soultion B is
[snip]
This is how it's done. If this is set, the button
was clicked. For example:
if (isset($_REQUEST['thebuttonname_x'])) {
Ok, now I'm frustrated.
I'm trying to register an object in the session, and access that object
from 2 different pages.
I start off in the first file, and do:
include("nycmgMail.php");
session_start();
$myMailer = new nycmgMail();
$myMailer->buildRecipients();
$_SESSION['myMailer'] = $myMaile
I don't see where you include() your class definition in that second
file... add include("nycmgMail.php") right before the session_start()
line and see if that makes a difference.
-philip
On Thu, 30 Jan 2003, Weston Houghton wrote:
>
> Ok, now I'm frustrated.
>
> I'm trying to register an objec
No, I put a new version of Pear in the directory I was developing in. I
found this:
http://news.php.net/article.php?group=php.pear.general&article=3505
Seems there are lots of problems with Auth, despite Pear's 1.0 version.
Josh
John W. Holmes wrote:
$a = new Auth("DB", $dsn, "loginFunction")
Hi,
I think fopen() and fsockopen() have a bug. For
example, while I had no problem connecting to
"http://www2.barchart.com"; using a browser, it was not
possible to open a socket connection uisng either
fopen() or fsockopen() (i.e., none could initilize the
socket).
I was wondering if anyone els
Hello,
Is it possible via PHP to :
- join a pop3 server
- make a "query" to recover mails header, subject, date, sender, to
create a list.
- we I have the list when I click on an element of the list recever the
email content (text and attachment) and why not see the email's header
- Have the
I have various XML files that might contain <> tags inside the element body, for
example:
Today on 1/29/03, stuff
happened
Because of this I can't use xml_parse_into_struct; when I do this happens:
array (
...
[attributes] => array (
[ID] = "1"
Hi Phil,
Your XML is not well formed, not properly nested use:
This way the XML parser wil accept and , otherwise it sees it as
XML elements. I hope this helps.
Best regards,
Davy Obdam
mailto:[EMAIL PROTECTED]
Phil Powell wrote:
I have various XML files that might contain <> tags inside
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Manually connect and request a page using HTTP
echo -e "GET / HTTP/1.0\r\n\r\n" | nc server 80
works on many boxes... you may have to use telnet and actually type in the
request instead of piping
On Wednesday 29 January 2003 05:29 pm, Dara Dowd wrot
I was not able to either telnet (via port 80), or
connect using fopen() to www2.barchart.com.
But it seems that it is fine now. Perhaps it was a
temp problem on the site's server, but still, I had no
problems connecting to the site via a browser while
fopen and telnet were not working.
It would
On Thursday 30 January 2003 14:49, Christian Ista wrote:
> Is it possible via PHP to :
> - join a pop3 server
> - make a "query" to recover mails header, subject, date, sender, to
> create a list.
> - we I have the list when I click on an element of the list recever the
> email content (text a
I have a program called ImageMagick installed which allows me to resize
pictures and do some other fun things. I am, however, unable to run any of
the executables. I installed the software and it installed under program
files. I then created a virtual dir under my website. When I try to run the
exe
Hello
As far as I rememeber according to DOM Level 2 Elementnodes contain
Attributenodes but the Attributenode has no association with its
Elementnode meaning you can't tell from an Attributenode which Elementnode
it belongs to unless you remember it in your code. Thus an Attributenode
is not p
On Thursday 30 January 2003 15:51, Dale wrote:
> I have a program called ImageMagick installed which allows me to resize
> pictures and do some other fun things. I am, however, unable to run any of
> the executables. I installed the software and it installed under program
> files. I then created a
Hello people,
On my development machine (win XP/Apache 2.0.44/PHP 4.3.0/MySQL 3.23.55)
i have several websites that i made some time ago that require register
globals to be On in the php.ini. Ofcourse i know thats not a good idea
at all for security, but rewriting all this code is not an option
Hi Davy,
I found the following in the php manual:
Please note that register_globals cannot be set at runtime (ini_set()). Although, you
can use .htaccess if your host allows it as described above. An example .htaccess
entry: php_flag register_globals on.
on this page: http://www.php.net/manual
101 - 147 of 147 matches
Mail list logo