Re: [PHP] Re: [PHP-DB] php-mysql problem

2004-05-15 Thread Burhan Khalid
Jianping Zhu wrote:
Hi, thank you for your respinse.
It the /etc/php.ini i have something like:
;
;   extension=modulename.extension
;
; For example:
;
   extension=mysql.so
if you go to 
http://coopunit.forestry.uga.edu:8080/test.php
you will find mysql is not installed as an extension.

but i do not know how to fix this problem.
Do i have to recomplie the phd from source code?
Yes.
See http://www.php.net/mysql for details.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Template Engine

2004-05-15 Thread Tom Rogers
Hi,

Saturday, May 15, 2004, 6:13:25 AM, you wrote:
GL> I was just wondering if anyone had any good advice or tutorials on
GL> building a simple template engine system. I am woking on a small project
GL> that I would like to distribute, and I would of course like to separate
GL> logic from html. I really just want to know the basics without caching.
GL> I am familiar with Smarty and PHPLib and FastTemplate and some others.
GL> But since I am going to be distributing the app, I would like it as
GL> portable and small/simple as possible. Those template systems are
GL> overkill for what I need. Really it does not even have to be a "Template
GL> system", I would just like to here your thoughts on how you may have
GL> accomplished separation of logic from output in a simple way.
 
GL> Thanks,
GL> George

You can take a look at my 'system', its small (I use it in an
auto-prepend file) and pretty fast. You can view the code here
http://kwiktemplates.com/download.php and the syntax is here
http://kwiktemplates.com/ (still working on the site) Anything you
don't understand drop me a line.

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Template Engine

2004-05-15 Thread electroteque
I use one called phemplate, dont be scared of the same its pretty good and
follows the same ideology as the rest although check out the benchmark tool
of other engines which is supplied on the site.


http://pukomuko.esu.lt/phemplate/

I have been thinking of moving to smarty or i just wish there was a
templating standard, like  a php equivalant to struts hehe.



> -Original Message-
> From: Tom Rogers [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 15, 2004 6:10 PM
> To: George Lantz
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Template Engine
>
>
> Hi,
>
> Saturday, May 15, 2004, 6:13:25 AM, you wrote:
> GL> I was just wondering if anyone had any good advice or tutorials on
> GL> building a simple template engine system. I am woking on a
> small project
> GL> that I would like to distribute, and I would of course like
> to separate
> GL> logic from html. I really just want to know the basics
> without caching.
> GL> I am familiar with Smarty and PHPLib and FastTemplate and some others.
> GL> But since I am going to be distributing the app, I would like it as
> GL> portable and small/simple as possible. Those template systems are
> GL> overkill for what I need. Really it does not even have to be
> a "Template
> GL> system", I would just like to here your thoughts on how you may have
> GL> accomplished separation of logic from output in a simple way.
>
> GL> Thanks,
> GL> George
>
> You can take a look at my 'system', its small (I use it in an
> auto-prepend file) and pretty fast. You can view the code here
> http://kwiktemplates.com/download.php and the syntax is here
> http://kwiktemplates.com/ (still working on the site) Anything you
> don't understand drop me a line.
>
> --
> regards,
> Tom
>
> --
> 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



[PHP] Carrying Variables

2004-05-15 Thread Ronald \"The Newbie\" Allen
How would I carry a variable from one page to another

Here is what I mean

I have a send.php page and this is sent to
insert_into_database.php where the values of the previous page are inserted
into the database.
I then use a meta=refresh to go to another page and evaluate the variable.
The problem is that I do remember how to carry the variable.  I believed
that I used the meta before to carry it, but unsure.  Any help would be
appreciated!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Carrying Variables

2004-05-15 Thread Torsten Roehr
"Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How would I carry a variable from one page to another
>
> Here is what I mean
>
> I have a send.php page and this is sent to
> insert_into_database.php where the values of the previous page are
inserted
> into the database.
> I then use a meta=refresh to go to another page and evaluate the variable.
> The problem is that I do remember how to carry the variable.  I believed
> that I used the meta before to carry it, but unsure.  Any help would be
> appreciated!

This could be done via GET by appending the values to the target URI:

insert_into_database.php?value1=$value1&value2=$value2&value3=$value3

On the next page you acces those values via:
$_GET['value1']
$_GET['value2']
$_GET['value3']

Here's the corresponding manual:
http://de3.php.net/manual/en/reserved.variables.php#reserved.variables.get

Hope this helps.

Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



php-general Digest 15 May 2004 10:34:44 -0000 Issue 2764

2004-05-15 Thread php-general-digest-help

php-general Digest 15 May 2004 10:34:44 - Issue 2764

Topics (messages 186263 through 186287):

Looking For Easy To Use Shopping Cart
186263 by: Ryan Schefke
186266 by: Justin Patrin
186268 by: Dan McCullough
186270 by: Ryan Schefke
186271 by: Justin Patrin
186273 by: Dan McCullough
186274 by: Dan McCullough

Missing data types?
186264 by: René Fournier

Re: tracking ip and its location
186265 by: adwinwijaya

Re: GD createpng and getting different png formats
186267 by: Galen
186269 by: Sam Joseph
186275 by: Galen
186278 by: Sam Joseph

How to duplicate this functionality?
186272 by: Ryan A
186276 by: Robert Cummings
186277 by: Ryan A
186279 by: Will Collins
186280 by: Curt Zirzow
186282 by: Will Collins

Re: php-general Digest 14 May 2004 22:05:59 - Issue 2763
186281 by: Graeme Foster

Re: [PHP-DB] php-mysql problem
186283 by: Burhan Khalid

Re: Template Engine
186284 by: Tom Rogers
186285 by: electroteque

Carrying Variables
186286 by: Ronald \"The Newbie\" Allen
186287 by: Torsten Roehr

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
Can anyone recommend a good open source shopping cart solution? I built an
application for custom websites, now, I just need to interface to a shopping
cart. I'm using mysql. Any suggestions?

...looking for something easy.

Thanks,
Ryan 

 

--- End Message ---
--- Begin Message ---
Ryan Schefke wrote:
Can anyone recommend a good open source shopping cart solution? I built an
application for custom websites, now, I just need to interface to a shopping
cart. I'm using mysql. Any suggestions?
...looking for something easy.
Thanks,
Ryan 

Well...
Do you mean that you've created a storefront already and need a cart, or 
do you need the whole thing? There really isn't any only cart software, 
they all include a storefront.

From what I've seen, Zen Cart is pretty well featured and is open 
source and free.

--
paperCrane 
--- End Message ---
--- Begin Message ---
There are several tutorials that are just the cart, probably some minimal
code typing and fixing for your needs.
MyMarket found on SourceForge is one.  There was one on Monkey Junkies.

FreeTrade is good.

dan mccullough
sr. engineer
url:  heathermccullough.com
tf:   866.298.3991
w:   603.444.9808

There is no such thing as a problem, unless the servers are on fire.
Sometimes great opportunity comes brilliantly disguised as bad news.

-Original Message-
From: Justin Patrin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart

Ryan Schefke wrote:

> Can anyone recommend a good open source shopping cart solution? I built an
> application for custom websites, now, I just need to interface to a
shopping
> cart. I'm using mysql. Any suggestions?
>
> ...looking for something easy.
>
> Thanks,
> Ryan
>

Well...

Do you mean that you've created a storefront already and need a cart, or
do you need the whole thing? There really isn't any only cart software,
they all include a storefront.

 From what I've seen, Zen Cart is pretty well featured and is open
source and free.

--
paperCrane 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I want my customer to be able to select a few options via radio buttons (12
months or 24 months - how many photos in their photo album, etc) that impact
the price.  Then, I want the customer to click a "checkout" link that takes
them directly to a form to input billing address and credit card
information.

Any recommendations/guidance?

I'm calling around and speaking to payment gateways and merchant account
providers but wanted to tap into the open source community to see what's out
there that can fit my needs.

I really don't think this is that complex of a task, or maybe it is?

Thanks,
Ryan

-Original Message-
From: Justin Patrin [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart

Ryan Schefke wrote:

> Can anyone recommend a good open source shopping cart solution? I built an
> application for custom websites, now, I just need to interface to a
shopping
> cart. I'm using mysql. Any suggestions?
> 
> ...looking for something easy.
> 
> Thanks,
> Ryan 
> 

Well...

Do you mean that you've created a storefront already and need a cart, or 
do you need the whole thing? There really isn't any only cart software, 
they all include a st

[PHP] Re: Carrying Variables

2004-05-15 Thread Ronald \"The Newbie\" Allen
This is what I have
insert_into_the_database.php



check.php


This is still not working for me

"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > How would I carry a variable from one page to another
> >
> > Here is what I mean
> >
> > I have a send.php page and this is sent to
> > insert_into_database.php where the values of the previous page are
> inserted
> > into the database.
> > I then use a meta=refresh to go to another page and evaluate the
variable.
> > The problem is that I do remember how to carry the variable.  I believed
> > that I used the meta before to carry it, but unsure.  Any help would be
> > appreciated!
>
> This could be done via GET by appending the values to the target URI:
>
> insert_into_database.php?value1=$value1&value2=$value2&value3=$value3
>
> On the next page you acces those values via:
> $_GET['value1']
> $_GET['value2']
> $_GET['value3']
>
> Here's the corresponding manual:
> http://de3.php.net/manual/en/reserved.variables.php#reserved.variables.get
>
> Hope this helps.
>
> Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Carrying Variables

2004-05-15 Thread Torsten Roehr
"Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This is what I have
> insert_into_the_database.php
>  content="10; URL=./check.php?">

You have to assign the value to a variable (name) and print the POST value
with '">

This should work.

Regards, Torsten

> 
>
> check.php
>  $event =  $_GET['Event_Type'];
> echo "$event";
> ?>
>
> This is still not working for me
>
> "Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > How would I carry a variable from one page to another
> > >
> > > Here is what I mean
> > >
> > > I have a send.php page and this is sent to
> > > insert_into_database.php where the values of the previous page are
> > inserted
> > > into the database.
> > > I then use a meta=refresh to go to another page and evaluate the
> variable.
> > > The problem is that I do remember how to carry the variable.  I
believed
> > > that I used the meta before to carry it, but unsure.  Any help would
be
> > > appreciated!
> >
> > This could be done via GET by appending the values to the target URI:
> >
> > insert_into_database.php?value1=$value1&value2=$value2&value3=$value3
> >
> > On the next page you acces those values via:
> > $_GET['value1']
> > $_GET['value2']
> > $_GET['value3']
> >
> > Here's the corresponding manual:
> >
http://de3.php.net/manual/en/reserved.variables.php#reserved.variables.get
> >
> > Hope this helps.
> >
> > Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Carrying Variables

2004-05-15 Thread Ronald \"The Newbie\" Allen
That is it!  Thank you very much!


"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > This is what I have
> > insert_into_the_database.php
> >  > content="10; URL=./check.php?">
>
> You have to assign the value to a variable (name) and print the POST value
> with '
> 
>
> This should work.
>
> Regards, Torsten
>
> > 
> >
> > check.php
> >  > $event =  $_GET['Event_Type'];
> > echo "$event";
> > ?>
> >
> > This is still not working for me
> >
> > "Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > How would I carry a variable from one page to another
> > > >
> > > > Here is what I mean
> > > >
> > > > I have a send.php page and this is sent to
> > > > insert_into_database.php where the values of the previous page are
> > > inserted
> > > > into the database.
> > > > I then use a meta=refresh to go to another page and evaluate the
> > variable.
> > > > The problem is that I do remember how to carry the variable.  I
> believed
> > > > that I used the meta before to carry it, but unsure.  Any help would
> be
> > > > appreciated!
> > >
> > > This could be done via GET by appending the values to the target URI:
> > >
> > > insert_into_database.php?value1=$value1&value2=$value2&value3=$value3
> > >
> > > On the next page you acces those values via:
> > > $_GET['value1']
> > > $_GET['value2']
> > > $_GET['value3']
> > >
> > > Here's the corresponding manual:
> > >
> http://de3.php.net/manual/en/reserved.variables.php#reserved.variables.get
> > >
> > > Hope this helps.
> > >
> > > Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Breaks on socket_read

2004-05-15 Thread Marek Kilimajer
René Fournier wrote:
Can anyone suggest why this script (well, part of the script) fails on 
the "while(($bug=socket_read..." line after it successfully loops 
several times? (Of course, it is only after it timesout, but that is 
what I need it to do.)

---CODE--
$msg_recv = 3;
$timeout = array('sec' => 5, 'usec' => 0);
// ENTER LOOP
do {
$data = "";
socket_set_block($socket);
socket_set_option($socket,SOL_SOCKET,SO_RCVTIMEO,$timeout);
 >>>while(($buf = socket_read($socket,128,PHP_BINARY_READ)) !== 
false) {  <<<
$data .= $buf;

---OUTPUT--
PHP Warning:  socket_read() unable to read from socket [35]: Resource 
temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on 
line 65
Because the read operation times out, so you get this warning. If you 
don't want this warning to show up use $buf = 
@socket_read($socket,128,PHP_BINARY_READ) and check with 
socket_last_error() what is going on.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Carrying Variables

2004-05-15 Thread Ronald \"The Newbie\" Allen
How would you carry two variables?



"Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> That is it!  Thank you very much!
>
>
> "Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > This is what I have
> > > insert_into_the_database.php
> > >  > > content="10; URL=./check.php?">
> >
> > You have to assign the value to a variable (name) and print the POST
value
> > with ' >
> > 
> >
> > This should work.
> >
> > Regards, Torsten
> >
> > > 
> > >
> > > check.php
> > >  > > $event =  $_GET['Event_Type'];
> > > echo "$event";
> > > ?>
> > >
> > > This is still not working for me
> > >
> > > "Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> > > > news:[EMAIL PROTECTED]
> > > > > How would I carry a variable from one page to another
> > > > >
> > > > > Here is what I mean
> > > > >
> > > > > I have a send.php page and this is sent to
> > > > > insert_into_database.php where the values of the previous page are
> > > > inserted
> > > > > into the database.
> > > > > I then use a meta=refresh to go to another page and evaluate the
> > > variable.
> > > > > The problem is that I do remember how to carry the variable.  I
> > believed
> > > > > that I used the meta before to carry it, but unsure.  Any help
would
> > be
> > > > > appreciated!
> > > >
> > > > This could be done via GET by appending the values to the target
URI:
> > > >
> > > >
insert_into_database.php?value1=$value1&value2=$value2&value3=$value3
> > > >
> > > > On the next page you acces those values via:
> > > > $_GET['value1']
> > > > $_GET['value2']
> > > > $_GET['value3']
> > > >
> > > > Here's the corresponding manual:
> > > >
> >
http://de3.php.net/manual/en/reserved.variables.php#reserved.variables.get
> > > >
> > > > Hope this helps.
> > > >
> > > > Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Carrying Variables

2004-05-15 Thread Ronald \"The Newbie\" Allen
OK I am a moron.  I looked at your code and the answer is there!!!


"Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How would you carry two variables?
>
> 
>
> "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > That is it!  Thank you very much!
> >
> >
> > "Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > This is what I have
> > > > insert_into_the_database.php
> > > >  > > > content="10; URL=./check.php?">
> > >
> > > You have to assign the value to a variable (name) and print the POST
> value
> > > with ' > >
> > > 
> > >
> > > This should work.
> > >
> > > Regards, Torsten
> > >
> > > > 
> > > >
> > > > check.php
> > > >  > > > $event =  $_GET['Event_Type'];
> > > > echo "$event";
> > > > ?>
> > > >
> > > > This is still not working for me
> > > >
> > > > "Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
> > > > news:[EMAIL PROTECTED]
> > > > > "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in
message
> > > > > news:[EMAIL PROTECTED]
> > > > > > How would I carry a variable from one page to another
> > > > > >
> > > > > > Here is what I mean
> > > > > >
> > > > > > I have a send.php page and this is sent to
> > > > > > insert_into_database.php where the values of the previous page
are
> > > > > inserted
> > > > > > into the database.
> > > > > > I then use a meta=refresh to go to another page and evaluate the
> > > > variable.
> > > > > > The problem is that I do remember how to carry the variable.  I
> > > believed
> > > > > > that I used the meta before to carry it, but unsure.  Any help
> would
> > > be
> > > > > > appreciated!
> > > > >
> > > > > This could be done via GET by appending the values to the target
> URI:
> > > > >
> > > > >
> insert_into_database.php?value1=$value1&value2=$value2&value3=$value3
> > > > >
> > > > > On the next page you acces those values via:
> > > > > $_GET['value1']
> > > > > $_GET['value2']
> > > > > $_GET['value3']
> > > > >
> > > > > Here's the corresponding manual:
> > > > >
> > >
> http://de3.php.net/manual/en/reserved.variables.php#reserved.variables.get
> > > > >
> > > > > Hope this helps.
> > > > >
> > > > > Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] New Newbie Question

2004-05-15 Thread Ronald \"The Newbie\" Allen
Here is my problem:
When I get the value of $date and I echo it it shows up just fine

$date =  date("Y-m-d H:i");
echo "$date";
2004-05-15 16:20

but when I go to insert the value into a form like this

Time:
size="50">
 it only displays
2004-05-15

why is this?
Annoying





Master Station Log




Time:
size="50">


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] New Newbie Question

2004-05-15 Thread Travis Low
Change:
  value=
to
  value=""
or
  value=""

cheers,
Travis
Ronald "The Newbie" Allen wrote:
Here is my problem:
When I get the value of $date and I echo it it shows up just fine
$date =  date("Y-m-d H:i");
echo "$date";
2004-05-15 16:20
but when I go to insert the value into a form like this
Time:
size="50">
 it only displays
2004-05-15
why is this?
Annoying


Master Station Log



Time:
size="50">

--
Travis Low


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: New Newbie Question

2004-05-15 Thread Torsten Roehr
"Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Here is my problem:
> When I get the value of $date and I echo it it shows up just fine
>
> $date =  date("Y-m-d H:i");
> echo "$date";
> 2004-05-15 16:20
>
> but when I go to insert the value into a form like this
>
> Time:
> size="50">
>  it only displays
> 2004-05-15
>
> why is this?
> Annoying

Looks like you are missing the closing > for your value attribute (see
below).

>
>
> 
>
> 
> Master Station Log
> 
> 
>  $date =  date("Y-m-d H:i");
> echo "$date";
> ?>
>
> Time:
> size="50">
>  

Don't put quotes around your variables.

echo $date;

> size="50">
(Pay attention to ?>>)

Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: New Newbie Question

2004-05-15 Thread Torsten Roehr
"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Here is my problem:
> > When I get the value of $date and I echo it it shows up just fine
> >
> > $date =  date("Y-m-d H:i");
> > echo "$date";
> > 2004-05-15 16:20
> >
> > but when I go to insert the value into a form like this
> >
> > Time:
> > size="50">
> >  it only displays
> > 2004-05-15
> >
> > why is this?
> > Annoying
>
> Looks like you are missing the closing > for your value attribute (see
> below).
>
> >
> >
> > 
> >
> > 
> > Master Station Log
> > 
> > 
> >  > $date =  date("Y-m-d H:i");
> > echo "$date";
> > ?>
> >
> > Time:
> > size="50">
> >  > 
>
> Don't put quotes around your variables.
>
> echo $date;
>
> >
size="50">

Bullshit! This is correct:


Sorry, my fault.

Torsten

> (Pay attention to ?>>)
>
> Regards, Torsten


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] New Newbie Question

2004-05-15 Thread John W. Holmes
Ronald "The Newbie" Allen wrote:
Time:
size="50">
 it only displays
2004-05-15
Please learn HTML. You need quotes around your value.
Time:"
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: New Newbie Question

2004-05-15 Thread Ronald \"The Newbie\" Allen
I haved removed the quotes and when it is by itself it works just fine
$date =  date("Y-m-d H:i");
echo "$date";
2004-05-15 16:20

but I put it in a a form it only displays the date and not the time

Time:
size="50">
still only displays
2004-05-15


"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Here is my problem:
> > When I get the value of $date and I echo it it shows up just fine
> >
> > $date =  date("Y-m-d H:i");
> > echo "$date";
> > 2004-05-15 16:20
> >
> > but when I go to insert the value into a form like this
> >
> > Time:
> > size="50">
> >  it only displays
> > 2004-05-15
> >
> > why is this?
> > Annoying
>
> Looks like you are missing the closing > for your value attribute (see
> below).
>
> >
> >
> > 
> >
> > 
> > Master Station Log
> > 
> > 
> >  > $date =  date("Y-m-d H:i");
> > echo "$date";
> > ?>
> >
> > Time:
> > size="50">
> >  > 
>
> Don't put quotes around your variables.
>
> echo $date;
>
> >
size="50">
> (Pay attention to ?>>)
>
> Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] New Newbie Question

2004-05-15 Thread Ronald \"The Newbie\" Allen
Travis thanks this worked!  It is amazing what one little thing will do

   value=""


"Travis Low" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Change:
>
>value=
>
> to
>
>value=""
>
> or
>
>value=""
>
>
>
> cheers,
>
> Travis
>
> Ronald "The Newbie" Allen wrote:
> > Here is my problem:
> > When I get the value of $date and I echo it it shows up just fine
> >
> > $date =  date("Y-m-d H:i");
> > echo "$date";
> > 2004-05-15 16:20
> >
> > but when I go to insert the value into a form like this
> >
> > Time:
> > size="50">
> >  it only displays
> > 2004-05-15
> >
> > why is this?
> > Annoying
> >
> >
> > 
> >
> > 
> > Master Station Log
> > 
> > 
> >  > $date =  date("Y-m-d H:i");
> > echo "$date";
> > ?>
> >
> > Time:
> > size="50">
> >  > 
> >
>
> -- 
> Travis Low
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] [AWF-TOPIC] How to duplicate this functionality?

2004-05-15 Thread Robert Cummings
On Sat, 2004-05-15 at 01:08, Will Collins wrote:
> Also, I forgot to mention... another little snippet I like to use for
> something like this is this meta tag:
> 
> 
> 
> It makes the pages fade into each other, and for two pages that are very
> similar (like your example) it doesn't look like there's any reload at all.
> It has a pretty cool effect when you up the "duration" and use it for
> totally different pages too... it's just really fun to play with.  Just
> stick it into the header of your page.

This is a nice effect but I suggest you check your pages when this is
enabled. I tried it across one of my sites and on some long pages IE 6
just hung, and Netscape 7 took ages to perform the blend.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to duplicate this functionality?

2004-05-15 Thread Ryan A
Hey,

-SNIP-
> > Hmmm..for IE it didnt reload the page...or reloaded the page so fast
> that I
> > couldnt make out the reload and the product just seemed to
> > "disappear"...very smoothly...thats why I was impressed...

> You might want to complain to your ISP that your connection is too
> fast :)

-/SNIP-


Hehe, yeah, I guess that might be the "culprit" too...i'm on a 10mb
line..the highest download speed I have clocked on DC++ was 990k-1110k a
second but regularly have 600k a second downloads when downloading movies
off DC++. Ohh the woes of having a high speed line...why me god? why me?
:-p

> The rendering is fast because its a simple page and utilizes the
> browser's cache effeciently (css link, cached small images, etc.)

I guess that must be it, I usally have the blank page for a second before it
starts to render and when this just started to disappear off my screen
without the pause...well, it looked good.

Thanks,
-Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] How to duplicate this functionality?

2004-05-15 Thread Ryan A

> It's fairly simple: at the top of your script, have a block of code
similar
> to the following, and have the link point to
> --
> $_SERVER['PHP_SELF']."?rm_id=".$id_to_be_deleted
> --
> I'll
> leave out all but the essential elements.
>
> 
>  if (isset($_GET['rm_id']))
> {
> $query = "REMOVE FROM whatever WHERE id = ".$_GET['rm_id']." LIMIT 1";
> mysql_query($query);
> }
> ?>
> 
>
> Will Collins


Hi Will,
Thanks for replying.

Yes, I know how to delete rows/products etc from the database, cookies etc,
the only think I was confused about was that I didnt get the "blank pause"
as I clicked on the item to be removed, it was immediate...Curt pointed out
its probably coz I am on a fast line (10mbs) and that the page is using good
cacheingothers on the list kind enough to try it out reported that its
giving the "blank pause" when they accessed it via Linux using these
browsers Netscape 7, Opera 7.2 and so on

Cheers,
-Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] [AWF-TOPIC] How to duplicate this functionality?

2004-05-15 Thread Ryan A
> > Also, I forgot to mention... another little snippet I like to use for
> > something like this is this meta tag:
> >
> > 
> >
> > It makes the pages fade into each other, and for two pages that are
> very
> > similar (like your example) it doesn't look like there's any reload
> at all.
> > It has a pretty cool effect when you up the "duration" and use it for
> > totally different pages too...
> it's just really fun to play with.  Just
> > stick it into the header of your page.
>
> This is a nice effect but I suggest you check your pages when this is
> enabled. I tried it across one of my sites and on some long pages IE 6
> just hung, and Netscape 7 took ages to perform the blend.
>
> Cheers,
> Rob.


Hey Will/Rob,
H...didnt try the above...quite a good idea using a meta tag, will give
it a shot if I have small pages and then post them to the list to try out so
you guys can tell me if it does not work with you.

Thanks,
-Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] elseif carry

2004-05-15 Thread Ronald \"The Newbie\" Allen
I have tried both of these statements and neither one works  Trying to get
the Date and Time to be carried in the URL.  Any Help please.

 print '';

or

 echo '';

The code:

';
} elseif ($event == "Conference_Calls") {
 print '';
} elseif ($event == "Outage_Reports") {
 echo '';
} else {
 echo '';
}



?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mdecrypt_generic problem

2004-05-15 Thread Thomas Trötscher
Hi,
trying to use mcrypt/decrypt, but i'm not able to print the decoded text  
without the script stopping.

The code below is taken from php.net, supplied by [EMAIL PROTECTED] dot com  
07-Apr-2004 07:29.


$key = "this is a secret key";
$input = "Let us meet at 9 o'clock at the secret place.";
$td = mcrypt_module_open('tripledes', '', 'ecb', '');
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td, $key, $iv);
$encrypted_data = mcrypt_generic($td, $input);
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
echo "Encrypt: ".$encrypted_data;
echo "";
$td = mcrypt_module_open('tripledes', '', 'ecb', '');
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
$key = substr($key, 0, mcrypt_enc_get_key_size($td));
mcrypt_generic_init($td, $key, $iv);
$decrypted_data = mdecrypt_generic($td, $encrypted_data);
echo "Decrypt: ".$decrypted_data;
//modified
echo "something's wrong";
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
?>
The script seems to work, but the string "something's wrong" doesn't print.
However the script below works fine:

$td = mcrypt_module_open('tripledes', '', 'ecb', '');
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td, $key, $iv);
$encrypted_data = mcrypt_generic($td, $input);
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
echo "Encrypt: ".$encrypted_data;
echo "";
$td = mcrypt_module_open('tripledes', '', 'ecb', '');
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
$key = substr($key, 0, mcrypt_enc_get_key_size($td));
mcrypt_generic_init($td, $key, $iv);
$decrypted_data = mdecrypt_generic($td, $encrypted_data);
//echo "Decrypt: ".$decrypted_data;
echo "something's wrong";
echo "something else is wrong";
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
?>
Outputs:
Encrypt: \ºþê?Ï?á¸(v¹FýaõFËU³æç SäÇÚÖzßù5Qì<±_?-:Í
something's wrong
something else is wrong
Thomas
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Yahoo and PHP

2004-05-15 Thread Chris Shiflett
--- Jonathan Villa <[EMAIL PROTECTED]> wrote:
> "Yahoo, of course, makes heavy use of MySQL, and not only do Yahoo
> developers code in PHP, they even hired PHP's creator, Rasmus
> Lerdorf. "
> 
> I was wondering if anyone had some information to further
> substantiate this...

Yes, Rasmus works there, and so does Andrei.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Carrying Variables

2004-05-15 Thread Daniel Clark
I uses  variables and method="post" to sent them to the next page.
On your 2nd page it's inserting into the database, so past that page, if I want to 
retain the variables I either read them again from the database OR 
store those variables as $_SESSION variables.


>>How would I carry a variable from one page to another
>>
>>Here is what I mean
>>
>>I have a send.php page and this is sent to
>>insert_into_database.php where the values of the previous page are inserted
>>into the database.
>>I then use a meta=refresh to go to another page and evaluate the variable.
>>The problem is that I do remember how to carry the variable.  I believed
>>that I used the meta before to carry it, but unsure.  Any help would be
>>appreciated!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Carrying Variables

2004-05-15 Thread Daniel Clark
On the URL, use ? to separate the file name from the variables, and & to separate each 
additional variable.

. &logdate=

URL=check.php?Event_Type=&logdate=">

>>How would you carry two variables?
>>
>>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] imagedestroy problems with memory

2004-05-15 Thread Merlin
Hi there,
I am having trouble with ram memory. After about a day the system starts to 
swap. After doing a bit of research I found that a possible reason could be the 
missing of the imagedestroy() function.

There is a question I have on that. Inside a function I add sometimes watermarks 
to images, than I return the image from the function. Where would I have to 
place the imagedestroy command? Inside the function, or after calling it?

Here is part of the function code:
#
# save image to var to make saving possible in db into blob
ob_start();
imagejpeg($photoImage);
$photoImage = ob_get_contents();
ob_end_clean();
#   
return $photoImage;
thankx for any help,
Merlin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] elseif carry

2004-05-15 Thread Daniel Clark
I think you want double quotes around the entire line and \" for the internal double 
quotes.

echo "';

>>I have tried both of these statements and neither one works  Trying to get
>>the Date and Time to be carried in the URL.  Any Help please.
>>
>> print '';
>>
>>or
>>
>> echo '';

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] elseif carry

2004-05-15 Thread Ronald \"The Newbie\" Allen
I did a cut asnd paste to your code and this is the error that I receive

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING in c:\inetpub\wwwroot\check.php on
line 9



"Daniel Clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I think you want double quotes around the entire line and \" for the
internal double quotes.
>
> echo " URL=./Conference_Calls.php?Date_and_Time=$_POST['Date_and_Time']">';
>
> >>I have tried both of these statements and neither one works  Trying to
get
> >>the Date and Time to be carried in the URL.  Any Help please.
> >>
> >> print '';
> >>
> >>or
> >>
> >> echo '';

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] GET and POST variables name

2004-05-15 Thread Dino Costantini
i know it could be a stupid problem, but i need a help and i hope u could be generous 
with me :).
this is my code, it writes the list of POST and GET variables. 

";
foreach($_GET as $parole)
{
 echo "Parola = $parole ";
}

echo "POST:";
foreach($_POST as $parole)
{
 echo "Parola = $parole ";
}
?>

i want to write also the name of the variable, for example:
if i call my page so --->  index.php?id=2&a=4
it writes

GET:
Parola = 2 
Parola = 4 


POST:

I want it to write:

GET:
id = 2 
a = 4 


POST:

how can I do it?
thx for any help.

Re: [PHP] mysql blob and phpmysqladmin

2004-05-15 Thread Raj Shekhar
On Thu, 13 May 2004 17:53:20 -0400, Jianping Zhu
<[EMAIL PROTECTED]> wrote:
> 
> I have mysql table call com. One colum of table com will store
> user's comments. Because user-provided comment might be too big to fit in char(255), 
> i
> use blob. but when i try to see it by use phpmysqladmin, i can only see
> something like [BLOB 345 byes] i can not read the text of the comment.
> 
> Is there a way to let see the user-provide comments from phpmysqladmin?

In the latest phpmysqladmin, a "T" is formed in the upper right part
of the table which have data of type blob (when you choose to browse a
table) . Clicking on the "T" will show the text stored in blob.

Regards
Raj Shekhar

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET and POST variables name

2004-05-15 Thread Tom Rogers
Hi,

Sunday, May 16, 2004, 1:47:44 AM, you wrote:
DC> i know it could be a stupid problem, but i need a help and i
DC> hope u could be generous with me :).
DC> this is my code, it writes the list of POST and GET variables. 

DC>  echo "GET:";
DC> foreach($_GET as $parole)
DC> {
DC>  echo "Parola = $parole ";
DC> }

DC> echo "POST:";
DC> foreach($_POST as $parole)
DC> {
DC>  echo "Parola = $parole ";
DC> }
?>>

DC> i want to write also the name of the variable, for example:
DC> if i call my page so --->  index.php?id=2&a=4
DC> it writes

DC> GET:
DC> Parola = 2 
DC> Parola = 4 


DC> POST:

DC> I want it to write:

DC> GET:
DC> id = 2 
DC> a = 4 


DC> POST:

DC> how can I do it?
DC> thx for any help.

You need the keys like this:

foreach($_GET as $key=>$parole)
{
 echo "$key = $parole ";
}

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET and POST variables name

2004-05-15 Thread Marek Kilimajer
foreach($_POST as $key => $parole) {
   echo "$key = $parole ";
}
Dino Costantini wrote:
i know it could be a stupid problem, but i need a help and i hope u could be generous with me :).
this is my code, it writes the list of POST and GET variables. 

";
foreach($_GET as $parole)
{
 echo "Parola = $parole ";
}
echo "POST:";
foreach($_POST as $parole)
{
 echo "Parola = $parole ";
}
?>
i want to write also the name of the variable, for example:
if i call my page so --->  index.php?id=2&a=4
it writes
GET:
Parola = 2 
Parola = 4 


POST:

I want it to write:
GET:
id = 2 
a = 4 


POST:

how can I do it?
thx for any help.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] imagedestroy problems with memory

2004-05-15 Thread Marek Kilimajer
Merlin wrote:
Hi there,
I am having trouble with ram memory. After about a day the system starts 
to swap. After doing a bit of research I found that a possible reason 
could be the missing of the imagedestroy() function.

There is a question I have on that. Inside a function I add sometimes 
watermarks to images, than I return the image from the function. Where 
would I have to place the imagedestroy command? Inside the function, or 
after calling it?

Here is part of the function code:
#
# save image to var to make saving possible in db into blob
ob_start();
imagejpeg($photoImage);
$photoImage = ob_get_contents();
ob_end_clean();
#   
return $photoImage;

thankx for any help,
Merlin
Inside the function right after imagejpeg().
$photoImage = ob_get_contents() makes $photoImage a string, so 
imagedestroy() cannot be called on it.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] elseif carry

2004-05-15 Thread James Kaufman
Try this:

echo "";

On Sat, May 15, 2004 at 07:47:28PM +0400, Ronald The Newbie Allen wrote:
> I did a cut asnd paste to your code and this is the error that I receive
> 
> Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
> T_STRING or T_VARIABLE or T_NUM_STRING in c:\inetpub\wwwroot\check.php on
> line 9
> 
> 

-- 
Jim Kaufman
Linux Evangelist
public key 0x6D802619
http://www.linuxforbusiness.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] elseif carry

2004-05-15 Thread Daniel Clark
Oops. Try this.

echo "" ;


>>I did a cut asnd paste to your code and this is the error that I receive
>>
>>Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
>>T_STRING or T_VARIABLE or T_NUM_STRING in c:\inetpub\wwwroot\check.php on
>>line 9
>>
>>
>>
>>"Daniel Clark" <[EMAIL PROTECTED]> wrote in message
>>news:[EMAIL PROTECTED]
>>> I think you want double quotes around the entire line and \" for the
>>internal double quotes.
>>>
>>> echo ">> URL=./Conference_Calls.php?Date_and_Time=$_POST['Date_and_Time']">';
>>>
>>> >>I have tried both of these statements and neither one works  Trying to
>>get
>>> >>the Date and Time to be carried in the URL.  Any Help please.
>>> >>
>>> >> print '';
>>> >>
>>> >>or
>>> >>
>>> >> echo '';
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>




Re: [PHP] GET and POST variables name

2004-05-15 Thread Daniel Clark
http://www.php.net/manual/en/control-structures.foreach.php

Try this.

echo "GET:";
foreach($_GET as $key => $value)
{
 echo "$key = $value ";
}


>>i know it could be a stupid problem, but i need a help and i hope u could be 
>>generous with me :).
>>this is my code, it writes the list of POST and GET variables. 
>>
>>>echo "GET:";
>>foreach($_GET as $parole)
>>{
>> echo "Parola = $parole ";
>>}
>>
>>echo "POST:";
>>foreach($_POST as $parole)
>>{
>> echo "Parola = $parole ";
>>}
>>?>
>>
>>i want to write also the name of the variable, for example:
>>if i call my page so --->  index.php?id=2&a=4
>>it writes
>>
>>GET:
>>Parola = 2 
>>Parola = 4 
>>
>>
>>POST:
>>
>>I want it to write:
>>
>>GET:
>>id = 2 
>>a = 4 
>>
>>
>>POST:
>>
>>how can I do it?
>>thx for any help.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: GET and POST variables name

2004-05-15 Thread Martin Visser
You also could use:
print_r($_GET);
and print_r($_POST);
an Array will be printed with key and value
Martin
Dino Costantini schreef:
i know it could be a stupid problem, but i need a help and i hope u could be generous with me :).
this is my code, it writes the list of POST and GET variables. 

";
foreach($_GET as $parole)
{
echo "Parola = $parole ";
}
echo "POST:";
foreach($_POST as $parole)
{
echo "Parola = $parole ";
}
?>
i want to write also the name of the variable, for example:
if i call my page so --->  index.php?id=2&a=4
it writes
   GET:
   Parola = 2 
   Parola = 4 
   
   
   POST:

I want it to write:
   GET:
   id = 2 
   a = 4 
   
   
   POST:

how can I do it?
thx for any help.
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] elseif carry

2004-05-15 Thread Ronald \"The Newbie\" Allen
Tried it and this is the error that  I get


Notice: Undefined index: Date_and_Time in c:\inetpub\wwwroot\check.php on
line 9
 wrote in message
news:[EMAIL PROTECTED]
> Try this:
>
> echo " URL=./Conference_Calls.php?Date_and_Time=".$_POST['Date_and_Time'].">";
>
> On Sat, May 15, 2004 at 07:47:28PM +0400, Ronald The Newbie Allen wrote:
> > I did a cut asnd paste to your code and this is the error that I receive
> >
> > Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting
> > T_STRING or T_VARIABLE or T_NUM_STRING in c:\inetpub\wwwroot\check.php
on
> > line 9
> >
> >
>
> -- 
> Jim Kaufman
> Linux Evangelist
> public key 0x6D802619
> http://www.linuxforbusiness.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] xslt_process

2004-05-15 Thread eoghan
hi,
im using the xslt_process() function, but want to use a php file with 
generated xml content as the xml file i feed the
function but it seems to complain that its a php file
*Warning*: Sablotron error on line 22: XML parser error 4: not 
well-formed (invalid token)
when i use a test xml doc is works fine... i have the header set as 
text/xml... anyone any ideas how i can use a php
file with this function?
thanks eoghan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] xslt_process

2004-05-15 Thread Ray Hunter
On Sat, 2004-05-15 at 10:20, eoghan wrote:
> hi,
> im using the xslt_process() function, but want to use a php file with 
> generated xml content as the xml file i feed the
> function but it seems to complain that its a php file
> *Warning*: Sablotron error on line 22: XML parser error 4: not 
> well-formed (invalid token)
> when i use a test xml doc is works fine... i have the header set as 
> text/xml... anyone any ideas how i can use a php
> file with this function?

Why not run the file and get the output as a variable in you php file
that has the xslt_process() function in it.

--
BigDog

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] elseif carry

2004-05-15 Thread Daniel Clark
Ah.

Must have a POST variable in that page called Date_and_Time.


>>Tried it and this is the error that  I get
>>
>>
>>Notice: Undefined index: Date_and_Time in c:\inetpub\wwwroot\check.php on
>>line 9
>>http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] xslt_process

2004-05-15 Thread raditha dissanayake
eoghan wrote:
hi,
im using the xslt_process() function, but want to use a php file with 
generated xml content as the xml file i feed the
function but it seems to complain that its a php file
*Warning*: Sablotron error on line 22: XML parser error 4: not 
well-formed (invalid token)
when i use a test xml doc is works fine... i have the header set as 
text/xml... anyone any ideas how i can use a php
file with this function?
thanks eoghan

When you give a php script as input in this manner, it will not be 
parsed, compiled and executed as a result sablot gets php code as input. 
So instead of this approach how about calling the 'main' method in the 
php script from your xslt script


--
Raditha Dissanayake.
-
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session variables not working

2004-05-15 Thread Andrew Wood
If a page accesses the session variables does it need to explicity 
reset them as well because it would appear that an intermediate PHP 
script which also reads the 2 variables is destroying the session for 
no apparent reason


On 14 May 2004, at 22:11, Brad Pauly wrote:
On Fri, 2004-05-14 at 14:48, Andrew Wood wrote:
I'm trying to set the following two vars on one page then read their
values on another like this:
page1.php...
ob_start();
session_start();
  $_SESSION['member_id'] = $member_id;
  $_SESSION['password'] = $password;
ob_end_flush();
Where are $member_id and $password coming from?
page2.php...
ob_start();
session_start();
  $member_id = $_SESSION['member_id'];
  $password $_SESSION['password'];
ob_end_flush();
I think you want $password = $_SESSION['password'];
But on page2.php the variables are null.  Can anyone help me out with
this. I must be doing something really obvious wrong.
Where are you outputting the variables to see what they are? You might
want to add a print_r($_SESSION) to see what is there. The ob_*
functions don't cause any output of variables, they only output what 
you
output within them (if that makes sense). For example:

ob_start();
  echo 'Hi';
ob_end_flush();
- Brad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Carrying Variables

2004-05-15 Thread Ray Hunter
On Sat, 2004-05-15 at 02:53, Ronald "The Newbie" Allen wrote:
> How would I carry a variable from one page to another
> 
> Here is what I mean
> 
> I have a send.php page and this is sent to
> insert_into_database.php where the values of the previous page are inserted
> into the database.
> I then use a meta=refresh to go to another page and evaluate the variable.
> The problem is that I do remember how to carry the variable.  I believed
> that I used the meta before to carry it, but unsure.  Any help would be
> appreciated!

You could also use session variables that will allow you to pass the
variable from page to page.

--
BigDog

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD createpng and getting different png formats

2004-05-15 Thread Galen
Sam,
File size totally depends on what you're working with. For text and 
graphics, PNG is significantly smaller than JPEGs that have quality 
settings anywhere near close to looking similar. For other things, it's 
tricky.

Certainly, reducing the number of colors is a good way to cut file 
size. If you're really picky about this, you could use exec() and call 
the pngcrush binary for your pngs (though this will slow the process 
down enough to not be a good idea if you're running it in real time). 
Depending on many factors, pngcrush can often yield a 5-25% reduction 
in file size with zero quality loss.

Also, I'm not sure what you're actually compressing, but turning off 
antialiasing will cut the number of colors required by a lot 
(automatically saving space) and eliminate all the excess edge detail 
(also saving a bunch). If you're compositing the image in real time 
(i.e. image + text) try cutting the colors on each one individually 
(before compositing) and you may be able to use fewer colors (i.e. make 
the antialiased text be only 3-4 colors but allow the image to retain 
more quality).

You might also like using imagemagick (in the command line) and working 
with things there. I haven't yet found enough of a need for it to play 
with it yet, but I would bet you could do all sorts of things that 
might help file size (better color reduction, etc) and it doesn't look 
too tricky.

Good luck!
-Galen
On May 14, 2004, at 7:37 PM, Sam Joseph wrote:
Hi Galen,
Thanks for that - all sorted now.  I had looked at 
imagetruecolortopalette, but had not taken it on board.  I'm now using 
it as follows to get a balance between image quality and file size 
(for png output):

imagetruecolortopalette ( $myImage, true, 64);
It's just remarkable how much better quality I can get for a given 
size with jpeg as opposed to png - but then I'm unable to use jpeg for 
my current application.

Many, many thanks for your help.
CHEERS> SAM
Galen wrote:
Sam,
OK, sorry, I only had a few moments before. Let's see if this points  
you in the right direction.

Basically, you can have "standard" 8-bit images ("color") and then  
"true" color images (24 bit). When you "create" the GD image 
resource,  you use a function to do that. One such function is 
imagecreate() -  this generates a palette based image that (IIRC, 8 
bit or less) will  compress to that smaller PNG 8 file. 
imagecreatetruecolor() typically  makes full-depth ("true color") 
images that become PNG 24/32 and  support transparency and 
everything. You may find  imagetruecolortopalette() also of interest 
as it transforms a true  color image into a palette based image.

So the distinction is this: true color = 32 bit (24 bit + alpha  
channel), palette based = exact number of colors + no alpha channel

I may be subtly wrong on a few of these smaller points, and please  
accept my apologies if I am, but the gist is that you need a  
palette-based image to get 8-bit PNGs!

-Galen
On May 14, 2004, at 4:27 PM, Sam Joseph wrote:
Hi Galen,
Many thanks for your reply.  I tried to find things in the php 
manual  relating to bit depth, but I didn't find anything relevant:

http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF 
-8&oe=UTF-8&q=site:www%2Ephp%2Enet+bit+depth

I haven't read every single one of the image functions in detail, 
but  I did look through them all, and at the moment I can't see 
anything  that allows me to manipulate the bit depth.  The closest 
thing I can  see is the imagecolorstotal function which returns the 
number of  colors in the specified image's palette.

Apologies if I'm missing something obvious, but if anybody knows 
about  a specific function that does this I'd be very interested to 
hear  about it.

Many thanks in advance.
CHEERS> SAM
Galen wrote:
IIRC, the goal of PNG is lossless output and it outputs that 
exactly  with PHP. What you send is what you get out. When you're 
using GD, I  suggest you make an 8 bit GD image resource, then make 
that into PNG.  There are several functions dealing with converting 
bit depth and  such, poke around the GD image reference section in 
the PHP manual.

Sorry if this is too vague, it's all off the top of my head but I  
think it will give you enough to go on.

-Galen
On May 14, 2004, at 3:05 PM, Sam Joseph wrote:
Hi all,
I've recently got the GD libraries set up and working with php and 
I  have been resizing and reformating images to my hearts content.
One thing I notice however is that when I output png images they  
seem by default to come out in the larger size PNG32 format, as  
opposed to the lightweight PNG8 format that I would prefer.

I've checked the archives and googled and found no direct 
reference  to this issue.

If anybody can tell me how to adjust the png output format php I'd 
 be very grateful.  Although I have the feeling that this might 
well  require hacking away at the gd source 

Thanks in advance.
CHEERS> SAM
--
PHP General Mailing List (http://www.php.net/)
T

[PHP] Re: Carrying Variables

2004-05-15 Thread Kim Steinhaug
You could ofcourse also use sessions.
If you need to store alot of values, this would be the way to go.

If its only a couple of short ones, ofcourse some GET variables
is the simplest and fastest way to go.

--
--
Kim Steinhaug
--
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
--
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
--


"Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How would I carry a variable from one page to another
>
> Here is what I mean
>
> I have a send.php page and this is sent to
> insert_into_database.php where the values of the previous page are
inserted
> into the database.
> I then use a meta=refresh to go to another page and evaluate the variable.
> The problem is that I do remember how to carry the variable.  I believed
> that I used the meta before to carry it, but unsure.  Any help would be
> appreciated!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: accessing $_POST from another page.

2004-05-15 Thread Al
Save the POST variables in $_SESSION buffers. 

Don't forget to 'start_session" first thing on the page.
Edward Peloke wrote:
I have a page class which controls what happens within a given page.  For
example, the code in my index page is this:
$page=new AdminPage();
$page->action($action);
$page->paint($paint);
The paint and action methods simply set include files
Function action($action){
include_once($this->actionRoot.$action.".action.php"); }
On my test page, my paint method paints an add client form.  The action of
the add client form recalls the page passing in the action:
action="index.php?action=addNewClient".
So, when this form is submitted, the page is reloaded and
$page->action("addNewClient") is called which includes the
addNewClient.action.php page which simply contains the insert into the
database using the $_POST vars.  The problem is, this page doesn't seem to
have access to the $_POST vars.  To help remedy this, I added this to the
end of the form:
';
?>
and added this in my addNewClient.action.php form:
$posted = unserialize(base64_decode($_POST['posted']));
However the $_POST variables only come through after I have clicked submit
twice.  What's the best way to handle this?  Do I simply need to pass in the
$_POST array to my action script?
THanks,
Eddie




WARNING:  The information contained in this message and any attachments is
intended only for the use of the individual or entity to which it is
addressed.  This message may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  It may also
contain trade secrets and other proprietary information for which you and
your employer may be held liable for disclosing.  You are hereby notified
that any unauthorized dissemination, distribution or copying of this
communication is strictly prohibited.  If you have received this
communication in error,  please notify [EMAIL PROTECTED] by E-Mail and then
destroy this communication in a manner appropriate for privileged
information.
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Class variable unexpected behavior

2004-05-15 Thread Richard Shaffer
I am sure this is something I'm doing wrong, but I just can't see it.  I
have the following in my test.php file:





$a = $arg;
echo "a = " . $this->$a . "\n";
echo "b = " . $this->$b . "\n";
  }
}
$d = new test;
$d->c("hello");
?>



When I load the page, I expect to see the following output:

a = hello
b = goodbye

Instead, what I'm seeing is:

a = hello
b = hello

It seems that all variables in the class are taking the value of the last
assignment to any other variable in the class.

Can anyone tell me what mistake I'm making?  I'm using PHP 4.3.4 on an
up-to-date Fedora Core 1 system.

Much thanks,

-Richard

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Class variable unexpected behavior

2004-05-15 Thread Adam Bregenzer
On Sat, 2004-05-15 at 06:24, Richard Shaffer wrote:
> class test {
>   var $a;
>   var $b = "goodbye";
>   function c($arg) {
> $this->$a = $arg;
> echo "a = " . $this->$a . "\n";
> echo "b = " . $this->$b . "\n";
>   }
> }

$this->$a should be $this->a
same with '$b': $this->$b should be $this->b

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Reposting elseif carry

2004-05-15 Thread Ronald \"The Newbie\" Allen
I have tried both of these statements and neither one works  Trying to get
the Date_and_Time to be carried in the URL.  Any Help please.

 print '';

or

 echo '';


what I currently have is

 echo "";

Tried several things from the string and either they return a parsing error
or they return ".$_POST

kind of clueless nowhelp please

The code:

';
} elseif ($event == "Conference_Calls") {
 print '';
} elseif ($event == "Outage_Reports") {
 echo '';
} else {
 echo '';
}



?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and qmail

2004-05-15 Thread Stephen Lake
Hey all,

Can someone tell me how I can send HTML using qmail from a Script? The MTA I
was using was changed from Sendmail to qmail and now my HTML mails actually
show the html tags in the mail body.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP and qmail

2004-05-15 Thread Manuel Lemos
Hello,
On 05/15/2004 04:14 PM, Stephen Lake wrote:
Can someone tell me how I can send HTML using qmail from a Script? The MTA I
was using was changed from Sendmail to qmail and now my HTML mails actually
show the html tags in the mail body.
That looks like a bug in the mail() function because qmail comes with 
sendmail compatible wrapper.

Anyway, you may want to try this class for composing and sending 
messages including HTML formatted. It comes with a sub-class specialized 
in qmail but I suspected that you do not need to use it as the base 
class that uses mail() already comes with workarounds to use the mail()
function without the problems you are facing:

http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Release Announcement: Hardened-PHP 0.1.1

2004-05-15 Thread Stefan Esser


_  __ _   ___  _  _  ___ 
   | || | __ _  _ _  __| | ___  _ _   ___  __| | ___ | _ \| || || _ \
   | __ |/ _` || '_|/ _` |/ -_)| ' \ / -_)/ _` ||___||  _/| __ ||  _/
   |_||_|\__,_||_|  \__,_|\___||_||_|\___|\__,_| |_|  |_||_||_|  
 



The Hardened-PHP project team is pleased to announce the release of 
version 0.1.1 of our PHP security hardening patch. This new Hardened-PHP
release is the first one that is publicly announced and is considered
stable on atleast linux systems.

Hardened-PHP is a patch against the PHP codebase which adds security 
hardening features to it to protect servers on the one hand against a 
number of well known problems in hastily written PHP scripts and on 
the other hand against potential unknown vulnerabilities within the 
engine itself.

Hardened-PHP provides:

+ Protection of the Zend Memory Manager with canaries
+ Protection of Zend Linked Lists with canaries
+ Protection against internal format string exploits
+ Protection against arbitrary code inclusion
+ Syslog logging of attackers IP

We consider Hardened-PHP 0.1.1 to be the best version of Hardened-PHP
available and we strongly recommend that users of older versions upgrade
as soon as possible.

Hardened-PHP is available for download via HTTP from 

http:///www.hardened-php.net/download.php

The distribution file name is:

hardened-php-4.3.6-0.1.1.patch.gz  
MD5 checksum: 62f7d49b89c93dace247c2bc189b7503

Yours,
The Hardened-PHP Project Team...
http://www.hardened-php.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Release Announcement: Hardened-PHP 0.1.1

2004-05-15 Thread electroteque
please define a hastily written script ?

if this is it i dont know anyone who would ever attempt this




saying that anyone who codes with no security in mind should go back to
school. But i'm sure it could be possible for maybe a web host to have
something dodgy on there.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: PHP and qmail

2004-05-15 Thread electroteque
Could it not be you have to send the  html document type in the header of
the mail ?

> -Original Message-
> From: Manuel Lemos [mailto:[EMAIL PROTECTED]
> Sent: Sunday, May 16, 2004 8:55 AM
> To: Stephen Lake
> Cc: [EMAIL PROTECTED]
> Subject: [PHP] Re: PHP and qmail
>
>
> Hello,
>
> On 05/15/2004 04:14 PM, Stephen Lake wrote:
> > Can someone tell me how I can send HTML using qmail from a
> Script? The MTA I
> > was using was changed from Sendmail to qmail and now my HTML
> mails actually
> > show the html tags in the mail body.
>
> That looks like a bug in the mail() function because qmail comes with
> sendmail compatible wrapper.
>
> Anyway, you may want to try this class for composing and sending
> messages including HTML formatted. It comes with a sub-class specialized
> in qmail but I suspected that you do not need to use it as the base
> class that uses mail() already comes with workarounds to use the mail()
> function without the problems you are facing:
>
> http://www.phpclasses.org/mimemessage
>
>
> --
>
> Regards,
> Manuel Lemos
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
>
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.html
>
> --
> 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



Re: [PHP] Reposting elseif carry

2004-05-15 Thread Curt Zirzow
* Thus wrote Ronald The Newbie Allen ([EMAIL PROTECTED]):
> 
> what I currently have is
> 
>  echo " URL=./Conference_Calls.php?Date_and_Time=".$_POST["$Date_and_Time"].">";

Have you looked at what this is actually outputing?

> 
> Tried several things from the string and either they return a parsing error
> or they return ".$_POST
> 
> kind of clueless nowhelp please

You might want to read:
http://www.php.net/manual/en/langref.php

It'll give you a better grasp on what  you're trying to do.


> 
> The code:
> 
>  $event =  $_GET['Event_Type'];
> $Date_and_Time = $_GET['Date_and_Time'];

You're using $_GET here but $_POST in the output of your meta tag,
which one is it?

> //echo "$event";
> //echo "$time";
> if ($event == "Trouble_Tickets") {
>  echo '';
> } elseif ($event == "Conference_Calls") {
>  print '';
> } elseif ($event == "Outage_Reports") {
>  echo '';
> } else {
>  echo '';
> }
> 

A few points:
 - You're if/elseif would better be written with a switch()
   statment.
 - You shouldn't really use a meta-refresh, but redirect the user
   using header().
 - Learn the difference between how php treats the single quote (')
   vs the double quote (")
 




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



Re: [PHP] Reposting elseif carry

2004-05-15 Thread Daniel Clark
 echo "";

>>I have tried both of these statements and neither one works  Trying to get
>>the Date_and_Time to be carried in the URL.  Any Help please.
>>
>> print '';
>>
>>or
>>
>> echo '';

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php