[PHP] question about $_GET, etc

2002-09-11 Thread swade

On my laptop i still have 4.11 apache,linux on it but its just for 
development.

I must be confused about get and post handling. I've been referrencing
them in $_GET, etc but I was just working on something and linked to a 
script by using ?section=duh in the query string,etc

Now i thought $duh would be empty since i thought all get and post
now got stored in $_GET[duh], but i notice if i echo $duh[0] it will return 
an 'd'

is this normal? 

thanks!
shawn






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




Re: [PHP] Query result to an array

2002-09-11 Thread Zak Greant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On September 12, 2002 01:55, Christian Ista wrote:
> >   $result = mysql_query(...);
> >   while( $t = mysql_fetch_row($result) ){
> > $array[] = $t;
> >   }
>
> No. I need a 2 dimensions arrays, each line of this array, is the result
> of one row of the query and each cell of this row is a field from the
> select.

  Did you test the code? :)

> Example, the query return 2 row and 3 fields for each row :
> "Christian", "Ista", "Belgium"
> "zak", "PhpNet", "Dontknowfrom"
>
> resulf of SELECT NAME, LASTNAME, COUNTRY FROM MyTable;

  The code snippet above combined with the above query would create an array
  of this structure:

  $array[0][0] = 'Christian';
  $array[0][1] = 'Ista';
  $array[0][2] = 'Belgium';

  $array[1][0] = 'zak';
  $array[1][1] = 'PhpNet';
  $array[1][2] = 'Canada';

> I'd like to put that in an array and later because I use a session array.
>
> I'd like via a for loop access these data by
> echo(MyArray[1][1]);  result is "PhpNet"
> echo(MyArray[0][2]);  result is "Belgium"
> echo(MyArray[1][0]);  result is "zak"
>
> Is it clearer now ?

Cheers!
- --zak  
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9gD/1b6QONwsK8bIRAmm7AJ41PUo2zVmFwN/vfvTr4j6Fze/NdwCbBPZm
bWnEPyBj+bKQsnQ2bg9HZ7E=
=q8vy
-END PGP SIGNATURE-


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




[PHP] what is wrong?

2002-09-11 Thread Meltem Demirkus

Hi,
I want to understand what is wrong with this code?I am trying to understand
when an empty inputs come from form and I will then give a warning message..

if($_POST[new_password1] == "   ")

echo "empty input";



thanks..

meltem


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




[PHP] Date-format

2002-09-11 Thread Tommi Virtanen

Hi!

I have web-form, which has field (10 chars), there I enter date (format
dd.mm.). Then data saves to database (date-field type is date). 

So everything works, but not fine. When I enter date in format ex.
31.12.2002 and save form, then I'll check what are in db (there are
2031-12-20). 

Is there any chance to correct this problem. 

I have (in clause which insert to db): 

GetSQLValueString($HTTP_POST_VARS['date'], "date")

gustavus



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




RE: [PHP] frame

2002-09-11 Thread Martin Towell

Sorry, can't help you there. I'm not familiar with swf_* functions
Martin

-Original Message-
From: dinnie [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 4:59 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] frame



anyway thanks before mr martin..^_^
i know to use it if use html but
how bout command swf_setframe(void) or swf_getframe(void) ???


-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 11:02 AM
To: '[EMAIL PROTECTED]'; Milist PHP
Subject: RE: [PHP] frame


this is more of an HTML question. You'll probably be wanting to look at
 and 

-Original Message-
From: dinnie [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 12:59 PM
To: Milist PHP
Subject: [PHP] frame



hi all,
sorry for disturb all of u for a while...
there's anyone can hel me...??

i'm a beginner in PHPer...
right now... i'm trying to make 2 frames in one file...

example.. 

setup.php as main program with 2 frame 
then i want to call dispsetup.php and display it in second frame...
how the way to make the syntax...??

thanks before all... ^_^




-- 
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] Query result to an array

2002-09-11 Thread Martin Towell

> >   $result = mysql_query(...);
>   while( $t = mysql_fetch_row($result) ){
> $array[] = $t;
>   }
> 
> No. I need a 2 dimensions arrays, each line of this array, is the result 
> of one row of the query and each cell of this row is a field from the 
> select.
> 
> Example, the query return 2 row and 3 fields for each row :
> "Christian", "Ista", "Belgium"
> "zak", "PhpNet", "Dontknowfrom"
> 
> resulf of SELECT NAME, LASTNAME, COUNTRY FROM MyTable;
> 
> I'd like to put that in an array and later because I use a session array.
> 
> I'd like via a for loop access these data by
> echo(MyArray[1][1]);  result is "PhpNet"
> echo(MyArray[0][2]);  result is "Belgium"
> echo(MyArray[1][0]);  result is "zak"
> 
> Is it clearer now ?
> 
> Thanks,
> 
> Christian
> 

That's exactly what this will do. mysql_fetch_row() returns an array.
Appending that to another array and you get back an array of arrays (which
is the same as a 2D array)

Try it and see...

Martin


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




Re: [PHP] Query result to an array

2002-09-11 Thread Christian Ista


>   $result = mysql_query(...);
>   while( $t = mysql_fetch_row($result) ){
> $array[] = $t;
>   }

No. I need a 2 dimensions arrays, each line of this array, is the result 
of one row of the query and each cell of this row is a field from the 
select.

Example, the query return 2 row and 3 fields for each row :
"Christian", "Ista", "Belgium"
"zak", "PhpNet", "Dontknowfrom"

resulf of SELECT NAME, LASTNAME, COUNTRY FROM MyTable;

I'd like to put that in an array and later because I use a session array.

I'd like via a for loop access these data by
echo(MyArray[1][1]);  result is "PhpNet"
echo(MyArray[0][2]);  result is "Belgium"
echo(MyArray[1][0]);  result is "zak"

Is it clearer now ?

Thanks,

Christian



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




Re: [PHP] PreCaching Db into Variables Slows it down?!??

2002-09-11 Thread Peter J. Schoenster

On 12 Sep 2002 at 1:35, M1tch wrote:

> Just spent ages (well, 2hours) on a precaching system for my PHP code
> that didn't work out! Hang on, I'll backtrack a bit...
> 
> My website is using a php engine that picks at snippets of html from the
> database, and builds them up to form the page. A typical page may use 5
> of these html snippets, each at maybe 5kb in size.
> 
> I was sat thinking, looking at the debug-timer, and saw that the
> templates were one of the more time consuming aspects. So I said, I
> know, I'll save the db a bit, and at the start of the script, read all
> the templates that I'll need into a global variable, and call them from
> that. Simple, 5 db calls put into 1, and templates taken out of memory.
> 
> So why, oh why, has the time taken actually increased??? Does anyone
> have sufficient working knowledge of PHP to give me a hint at why this
> has happened?

I bet someone would have to look at the code. Are you writing your own code or just 
gluing modules together? I'm using the 
Smarty template system which I really like, it caches templates.

Personally I think you are going overboard in trying to optimize at this point. I 
assume that your system is working, and so you 
need only tweak it. But it sounds as if you are still working out what the system is. 

I have not done much work on High Traffic sites. One site was a skater site and  big 
food producer was running a promo and 
had TV ads ... site performed fine even though it was just plain cgi scripts hitting 
mysql at least 5 times for just about every 
page (I did not write the site but I had to modify,watch it).

Another site was marked as troublesome, big book publisher. They just threw hardware 
at it and all was well. 

Now Yahoo ... or Google ... that would be interesting. Why create a solution for no 
problem?  I'd suggest looking at your 
templating system. Which one are you using? You didn't create your own did you?

Peter




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




Re: [PHP] Query result to an array

2002-09-11 Thread Zak Greant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On September 12, 2002 00:56, Christian Ista wrote:
> >   array(
> > array( $temp[0], $temp[1] ),
> > array( $temp[1], $temp[2] )
> >   )
>
> I thinks it's not the right way.
>
> I have a query, this query can return 1,5,20, 200, ... rows, each row has
> 5 fields (or more or less).
>
> I'd like a 2 dimensions array, one line by row and each cell is a field
> content of the query.
>
> I program in a lot of language C/C++, Java, Delphi, C++Builder,
> ColdFusion, C# and I don't undersand why the PHP syntax for this kind of
> think is so complex and not clear.

  Good Lord! I thought that you wanted to transform an of array query results
  into a multi-dimensional array.

  Briefly, you want to do this:

  $result = mysql_query(...);
  while( $t = mysql_fetch_row($result) ){
$array[] = $t;
  }

  Just read the MySQL section in the PHP manual for more details.

Cheers!
- --zak
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9gDCIb6QONwsK8bIRAitjAJ0bUVpwvcdbrIayNQFtbfPqtHJSkwCdGmrq
OIkNSi0vING+U/+/GgYf/58=
=d63f
-END PGP SIGNATURE-


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




Re: [PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy

Hmmm...hadn't thought of that...

I guess I could use that if there's no alternative...

What I really need is the ability to do this:



I'm convinced that there just has to be a way! :)

But thanks though...I'm writing that down now...

Lewis


"Peter J. Schoenster" <[EMAIL PROTECTED]> wrote in message
3D7FEE06.26058.356643C@localhost">news:3D7FEE06.26058.356643C@localhost...
>
>
> On 12 Sep 2002 at 0:13, OrangeHairedBoy wrote:
>
> > Yeah...i should have mentioned I had thought of that...but I really
> > don't want to   :)
> >
> > It just doesn't look right when it's a math expression. Know a permenant
> > solution?
>
> > I want to be able to handle the tag , but the parser
> > keeps telling me that it's not formed correctly (because of the "<" in
> > the quotes).
>
> 
> 
> 
>
> But < will most probably be displayed as < in the example the other
person gave you, only the source view shows <
>
> Peter



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




Re: [PHP] Using HTTP Referer

2002-09-11 Thread Henrik Hudson

Since you're checking to see if people are logged in and then sending them to 
the login page if they're not...I would pass, via GET, the page they are on 
when they were checked for being logged in and then the script on your login 
page would take that GET and embed it into the POST form. When the user does 
successfully login then you can throw them back to whatever was passed 
through. As someone else mentioned and the PHP docs mention as well, 
HTTP_REFERER isn't very reliable. I believe you can use $HTTP_SELF for the 
first page when it needs to find out who it is. 

Hope that helped.


On Thursday 12 September 2002 02:41, Jiaqing Wang wrote:
> Hello, All,
> I'm currently working on a problem which is in need of HTTP referer or the
> similar technique, but I couldn't seem to find any article or links which
> illustrate the idea, I tried $_SERVER['HTTP_REFERER'] but somehow it didn't
> work for me. Let me breifly explain what I did here:
>
> I have login page called login.php, in this page I do
>
> 1. verify user the username and password against my backend database.
> 2. once passwd is verified, opens up a session with this login session.
> 3. header("Location: ${_SERVER['HTTP_REFERER']}") this will send user who
> just logged in back to the whichever page they came from.
>
> I also have a bunch of service scripts providing the content of my site
> like mysite.php which invokes the login.php page if it determines that the
> user is not logged in, after user goes through the logging in process, the
> login.php will re-direct it back to this particular page, of course the
> location of the page is dynamicly determined by HTTP_REFERER.
>
> The problem I'm having right now is that after the user is logged in, the
> login.php can never send it back to the page the user came from, it will
> just redraw the login.php page. Obviously, $_SERVER['HTTP_REFERER']
> contains the location of itself instead of the location of the page sent
> the user here.
>
> I hope this is clear to you, if any of you out here knew a clue please help
> me out. Any comment is greatly appreciated.
>
> JJW
> 9/11/2002

-- 

Henrik Hudson
[EMAIL PROTECTED]

Note:  Beware of Dragons - Thou art crunchy and taste good with ketchup.


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




Re: [PHP] XML Parser Question

2002-09-11 Thread Peter J. Schoenster



On 12 Sep 2002 at 0:13, OrangeHairedBoy wrote:

> Yeah...i should have mentioned I had thought of that...but I really
> don't want to   :)
> 
> It just doesn't look right when it's a math expression. Know a permenant
> solution?

> I want to be able to handle the tag , but the parser
> keeps telling me that it's not formed correctly (because of the "<" in
> the quotes).





But < will most probably be displayed as < in the example the other person gave 
you, only the source view shows <

Peter

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




Re: [PHP] Query result to an array

2002-09-11 Thread OrangeHairedBoy

Here's a function I wrote...feel free to use it. It will convert anything
into a 2D array.



Sample Table:

ID  Name

1Bob

2Joe

3Eric

4Cody



$query="select * from sampletable";

$result=mysql_query($query);

$wholetable=ResultToArray($result,"ID");

foreach ($wholetable as $key=>$value)

{

print "$key. $value[Name]";

}



function ResultToArray ( $result , $key )

{

while ( $row = mysql_fetch_object ( $result ) )

{

foreach ( $row as $column => $data )

{

$thiskey=$row->$key;

$table[$thiskey][$column] = $data;

}

}

}



I hope this makes sense!!



Lewis





"Christian Ista" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >   array(
> > array( $temp[0], $temp[1] ),
> > array( $temp[1], $temp[2] )
> >   )
>
> I thinks it's not the right way.
>
> I have a query, this query can return 1,5,20, 200, ... rows, each row has
> 5 fields (or more or less).
>
> I'd like a 2 dimensions array, one line by row and each cell is a field
> content of the query.
>
> I program in a lot of language C/C++, Java, Delphi, C++Builder,
> ColdFusion, C# and I don't undersand why the PHP syntax for this kind of
> think is so complex and not clear.
>
> Bye
>



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




RE: [PHP] Query result to an array

2002-09-11 Thread Martin Towell

I'm not totally familiar with mySql, but if I remember correctly, you can
get each row (one at a time) back as an (1D) array. All you need to do is
append that array onto the end of your dataset array and, bob's your uncle,
you have a 2D array full with your dataset

HTH
Martin

-Original Message-
From: Christian Ista [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 4:56 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Query result to an array


>   array(
>   array( $temp[0], $temp[1] ),
>   array( $temp[1], $temp[2] )
>   )

I thinks it's not the right way.

I have a query, this query can return 1,5,20, 200, ... rows, each row has 
5 fields (or more or less).

I'd like a 2 dimensions array, one line by row and each cell is a field 
content of the query.

I program in a lot of language C/C++, Java, Delphi, C++Builder, 
ColdFusion, C# and I don't undersand why the PHP syntax for this kind of 
think is so complex and not clear.

Bye


-- 
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] Query result to an array

2002-09-11 Thread Christian Ista

>   array(
>   array( $temp[0], $temp[1] ),
>   array( $temp[1], $temp[2] )
>   )

I thinks it's not the right way.

I have a query, this query can return 1,5,20, 200, ... rows, each row has 
5 fields (or more or less).

I'd like a 2 dimensions array, one line by row and each cell is a field 
content of the query.

I program in a lot of language C/C++, Java, Delphi, C++Builder, 
ColdFusion, C# and I don't undersand why the PHP syntax for this kind of 
think is so complex and not clear.

Bye


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




[PHP] Re: How do I upgrade my version of PHP?

2002-09-11 Thread Monty

Could you explain what "man patch" does or is? I haven't updated using a
patch before. Thanks.

> From: [EMAIL PROTECTED]
> Newsgroups: php.general
> Date: Wed, 11 Sep 2002 23:14:55 +0200
> To: [EMAIL PROTECTED]
> Subject: Re: How do I upgrade my version of PHP?
> 
> You should use the patch command, feel free to "man patch".
> 
> --
> 
> Nicos - CHAILLAN Nicolas
> [EMAIL PROTECTED]
> www.WorldAKT.com - Hébergement de sites Internet
> 
> "Monty" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
>> I've downloaded the patch file for 4.2.2 to 4.2.3 from the PHP website,
> but,
>> not sure what to do with this file. I have a Linux 7.x server. Can anyone
>> tell me how to patch my version of PHP or point me to a source that
> explains
>> how this is done?
>> 
>> Thanks!
>> 
> 
> 


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




[PHP] Re: how can I return several query results per table row?

2002-09-11 Thread OrangeHairedBoy

well, hope about this:

$count=0;
print "";
while (list($FirstName,$LastName)=mysql_fetch_row($result))
{
$count++;
if ($count == 4)
{
$count=0;
print "\n";
}
print "$FirstName $LastName\n";
}
print "\n";

Or something like that...you get the idea??

You might also consider writint your prog so that it inputs all the info
into an array and then loops through it as you need to print (just for ease
of use).

Hope that help...it's at least a starting point.


Lewis


"Brian Tully" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'm trying to figure out how I can format the results from a MySQL query so
that I can display several records per row, i.e., I'd like to be able to
format the results in a table with 3 columns, and as many rows as needed.
Please excuse my inability to be concise - my brain seems to be fried from a
long day.

I'm used to returning query results in a loop which prints out each record
in a row:

while (list($FirstName, $LastName) = mysql_fetch_row($result)) {

echo "

   $FirstName $LastName

";
}


however that returns a page that looks like this:

Joe Cool
John Doe
Homer Simpson
Bob Vila
Dr. Suess
Captain Crunch



I'm hoping to display the results so that I can have several results per
line like so:

Joe CoolJohn DoeHomer Simpson
Bob VilaDr. Suess   Captain Crunch



in my naïve thinking, I'm guessing that I'd need to count the query results
(mysql_num_rows) and divide them by 3.

so if I had 25 records and I wanted them listed 3 per line, I would divide
25/3 = 8.33 and round it up to the next number meaning I would have 9 rows,
the last row only having one record.

this is about as far as I get before I start getting a bad headache. ;)

I'm hoping someone might know of an article/tutorial on how to accomplish
this so I don't need to reinvent the wheel.

many thanks in advance,

brian









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




RE: [PHP] how can I return several query results per table row?

2002-09-11 Thread Martin Towell

basing my code on yours:

$i = 0;  $cols = 3;
while (list($FirstName, $LastName) = mysql_fetch_row($result))
{
if ($i % $cols == 0)  echo "";
echo "$FirstName $LastName";
if ($i % $cols == $cols - 1)  echo "";
$i++;
}
// clean up table...
if ($i % $cols != $cols - 1)  echo "";


-Original Message-
From: Brian Tully [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 3:33 PM
To: PHP List
Subject: [PHP] how can I return several query results per table row?


I'm trying to figure out how I can format the results from a MySQL query so
that I can display several records per row, i.e., I'd like to be able to
format the results in a table with 3 columns, and as many rows as needed.
Please excuse my inability to be concise - my brain seems to be fried from a
long day.

I'm used to returning query results in a loop which prints out each record
in a row:

while (list($FirstName, $LastName) = mysql_fetch_row($result)) {

echo "

   $FirstName $LastName

";
}

 
however that returns a page that looks like this:

Joe Cool
John Doe
Homer Simpson
Bob Vila
Dr. Suess
Captain Crunch



I'm hoping to display the results so that I can have several results per
line like so:

Joe CoolJohn DoeHomer Simpson
Bob VilaDr. Suess   Captain Crunch



in my naïve thinking, I'm guessing that I'd need to count the query results
(mysql_num_rows) and divide them by 3.

so if I had 25 records and I wanted them listed 3 per line, I would divide
25/3 = 8.33 and round it up to the next number meaning I would have 9 rows,
the last row only having one record.

this is about as far as I get before I start getting a bad headache. ;)

I'm hoping someone might know of an article/tutorial on how to accomplish
this so I don't need to reinvent the wheel.

many thanks in advance,

brian







-- 
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] Using HTTP Referer

2002-09-11 Thread Craig Vincent


The problem I'm having right now is that after the user is logged in, the
login.php can never send it back to the page the user came from, it will
just redraw the login.php page. Obviously, $_SERVER['HTTP_REFERER'] contains
the location of itself instead of the location of the page sent the user
here.


That would make sense as after a form submission has been done the new
referring url would be the page the form was submitted from (hence the
login.php).  What you need to do is either embed the HTTP_REFER on the login
page either via a hidden field in the form, or through a session variable or
even a cookie.  Basically you need to temporarily store where the user
originally came from so then after the submission from the login.php page,
you can grab what the old referring URL was and redirect the user to the
proper site.

Also keep in mind that some browsers do not pass referring URLs at all, and
some browsers (such as AOL) do not pass referring URLs if the page now being
access was opened up in a new window.  You may want to prepare for the
potential of not having a referring url be passed occasionally as well.

Craig



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




RE: [PHP] Using HTTP Referer

2002-09-11 Thread Martin Towell

set a hidden form element to be the referring page url, then use that to
redirect the user
eg: 
then use: header("location: $myReferer");

remember, also, that $_SERVER['HTTP_REFERER'] is not always set, so you'll
need to cater for that

Martin


-Original Message-
From: Jiaqing Wang [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 5:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Using HTTP Referer 


Hello, All,
I'm currently working on a problem which is in need of HTTP referer or the
similar technique, but I couldn't seem to find any article or links which
illustrate the idea, I tried $_SERVER['HTTP_REFERER'] but somehow it didn't
work for me. Let me breifly explain what I did here:

I have login page called login.php, in this page I do

1. verify user the username and password against my backend database.
2. once passwd is verified, opens up a session with this login session.
3. header("Location: ${_SERVER['HTTP_REFERER']}") this will send user who
just logged in back to the whichever page they came from.

I also have a bunch of service scripts providing the content of my site like
mysite.php which invokes the login.php page if it determines that the user
is not logged in, after user goes through the logging in process, the
login.php will re-direct it back to this particular page, of course the
location of the page is dynamicly determined by HTTP_REFERER.

The problem I'm having right now is that after the user is logged in, the
login.php can never send it back to the page the user came from, it will
just redraw the login.php page. Obviously, $_SERVER['HTTP_REFERER'] contains
the location of itself instead of the location of the page sent the user
here.

I hope this is clear to you, if any of you out here knew a clue please help
me out. Any comment is greatly appreciated.

JJW
9/11/2002



-- 
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] Re: Using HTTP Referer

2002-09-11 Thread OrangeHairedBoy

The variable name is just $HTTP_REFERER. Some others are:

$HTTP_USER_AGENT, $REMOTE_ADDR, $REMOTE_HOST, $QUERY_STRING, and $PATH_INFO.

There's more which you can find by looping through the globals array:

foreach ($GLOBALS as $key=>$value)
{
print "\$GLOBALS[\"$key\"] == $value\n";
}

Hope this helps!

Lewis


"Jiaqing Wang" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello, All,
> I'm currently working on a problem which is in need of HTTP referer or the
> similar technique, but I couldn't seem to find any article or links which
> illustrate the idea, I tried $_SERVER['HTTP_REFERER'] but somehow it
didn't
> work for me. Let me breifly explain what I did here:
>
> I have login page called login.php, in this page I do
>
> 1. verify user the username and password against my backend database.
> 2. once passwd is verified, opens up a session with this login session.
> 3. header("Location: ${_SERVER['HTTP_REFERER']}") this will send user who
> just logged in back to the whichever page they came from.
>
> I also have a bunch of service scripts providing the content of my site
like
> mysite.php which invokes the login.php page if it determines that the user
> is not logged in, after user goes through the logging in process, the
> login.php will re-direct it back to this particular page, of course the
> location of the page is dynamicly determined by HTTP_REFERER.
>
> The problem I'm having right now is that after the user is logged in, the
> login.php can never send it back to the page the user came from, it will
> just redraw the login.php page. Obviously, $_SERVER['HTTP_REFERER']
contains
> the location of itself instead of the location of the page sent the user
> here.
>
> I hope this is clear to you, if any of you out here knew a clue please
help
> me out. Any comment is greatly appreciated.
>
> JJW
> 9/11/2002
>
>



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




[PHP] how can I return several query results per table row?

2002-09-11 Thread Brian Tully

I'm trying to figure out how I can format the results from a MySQL query so
that I can display several records per row, i.e., I'd like to be able to
format the results in a table with 3 columns, and as many rows as needed.
Please excuse my inability to be concise - my brain seems to be fried from a
long day.

I'm used to returning query results in a loop which prints out each record
in a row:

while (list($FirstName, $LastName) = mysql_fetch_row($result)) {

echo "

   $FirstName $LastName

";
}

 
however that returns a page that looks like this:

Joe Cool
John Doe
Homer Simpson
Bob Vila
Dr. Suess
Captain Crunch



I'm hoping to display the results so that I can have several results per
line like so:

Joe CoolJohn DoeHomer Simpson
Bob VilaDr. Suess   Captain Crunch



in my naïve thinking, I'm guessing that I'd need to count the query results
(mysql_num_rows) and divide them by 3.

so if I had 25 records and I wanted them listed 3 per line, I would divide
25/3 = 8.33 and round it up to the next number meaning I would have 9 rows,
the last row only having one record.

this is about as far as I get before I start getting a bad headache. ;)

I'm hoping someone might know of an article/tutorial on how to accomplish
this so I don't need to reinvent the wheel.

many thanks in advance,

brian







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




[PHP] Using HTTP Referer

2002-09-11 Thread Jiaqing Wang

Hello, All,
I'm currently working on a problem which is in need of HTTP referer or the
similar technique, but I couldn't seem to find any article or links which
illustrate the idea, I tried $_SERVER['HTTP_REFERER'] but somehow it didn't
work for me. Let me breifly explain what I did here:

I have login page called login.php, in this page I do

1. verify user the username and password against my backend database.
2. once passwd is verified, opens up a session with this login session.
3. header("Location: ${_SERVER['HTTP_REFERER']}") this will send user who
just logged in back to the whichever page they came from.

I also have a bunch of service scripts providing the content of my site like
mysite.php which invokes the login.php page if it determines that the user
is not logged in, after user goes through the logging in process, the
login.php will re-direct it back to this particular page, of course the
location of the page is dynamicly determined by HTTP_REFERER.

The problem I'm having right now is that after the user is logged in, the
login.php can never send it back to the page the user came from, it will
just redraw the login.php page. Obviously, $_SERVER['HTTP_REFERER'] contains
the location of itself instead of the location of the page sent the user
here.

I hope this is clear to you, if any of you out here knew a clue please help
me out. Any comment is greatly appreciated.

JJW
9/11/2002



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




Re: [PHP] refresh function?

2002-09-11 Thread Chris Shiflett

The Refresh HTTP header is not an official part of the HTTP 
specification, so be very wary using it.

Chris

Paul Nicholson wrote:

>There sure is!:)
>/* 60 = Time in  seconds */
>header("Refresh: 60; URL=http://www.php.net";);
>


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




Re: [PHP] refresh function?

2002-09-11 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,
There sure is!:)
/* 60 = Time in  seconds */
header("Refresh: 60; URL=http://www.php.net";);
(http://php.net/header)
~Pauly

On Wednesday 11 September 2002 11:56 pm, Peter wrote:
> Hi,
>   Is there a function that will auto refresh a page?
>
> Thanks in advance,
> -Peter

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The webthe way you want it!"
[EMAIL PROTECTED]

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9gBQODyXNIUN3+UQRApe5AJwIZOW3K0giVp4JhWZzzcVPp7jWDwCfcSdx
ugFMxvuBSLS3oUIN5swE7gY=
=aFAO
-END PGP SIGNATURE-

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




php-general Digest 12 Sep 2002 04:13:05 -0000 Issue 1580

2002-09-11 Thread php-general-digest-help


php-general Digest 12 Sep 2002 04:13:05 - Issue 1580

Topics (messages 116010 through 116077):

Re: IPlanet Webserver
116010 by: Henrik Hudson
116066 by: Justin French

PHP And Apache
116011 by: Glenn
116012 by: Rasmus Lerdorf
116015 by: Glenn

Need PHP programmer ASAP..
116013 by: Michael Plasse

PHP help needed
116014 by: Michael Plasse
116041 by: nicos.php.net

Re: Sending Attachements through php email form
116016 by: Manuel Lemos

PHP and Special Characters
116017 by: Rick King
116018 by: Adam Williams

is php-4.2.3 a stable version?
116019 by: Anil Garg
116021 by: MET
116040 by: nicos.php.net

help with making an xslt class
116020 by: Geoff
116022 by: Brian V Bonini
116025 by: Geoff

How do I upgrade my version of PHP?
116023 by: Monty
116033 by: nicos.php.net

Re: Mail system with folders?
116024 by: Leonid Mamtchenkov

Query result to an array
116026 by: Christian Ista
116027 by: Zak Greant
116031 by: Christian Ista
116034 by: Zak Greant
116036 by: Christian Ista
116044 by: Zak Greant

Re: Displaying value different from actual value
116028 by: Zak Greant

cookie problem...
116029 by: rtrt

Re: ucwords()? and åäö
116030 by: Zak Greant

open_basedir without safe mode?
116032 by: Ville Mattila
116035 by: Rasmus Lerdorf

installing php-4.2.3
116037 by: Anil Garg
116038 by: Brad Bonkoski

Text from web form
116039 by: Rick King
116042 by: Jome
116043 by: nicos.php.net

Will return break loop?
116045 by: Kevin Stone
116047 by: SHEETS,JASON (Non-HP-Boise,ex1)
116048 by: David Buerer
116049 by: Zak Greant
116050 by: Kevin Stone

Variable Variables
116046 by: Mike Smith

Extracting Numbers from a string.
116051 by: Jason Caldwell
116053 by: M1tch
116054 by: Brad Bonkoski
116056 by: Dan Ostrowski
116057 by: Zak Greant

Re: Re:[PHP]question
116052 by: timo stamm

Session example at OSCON2002
116055 by: jacob.keystreams.com
116061 by: Chris Shiflett

Re: header question
116058 by: Chris Shiflett

html tables, php, other URL's...
116059 by: Anthony Ritter

Re: LDAP (NDS) authentication example...
116060 by: joshua

Re: mysql_insert_id
116062 by: David Robley

PreCaching Db into Variables Slows it down?!??
116063 by: M1tch

Need 2-way encryption
116064 by: Bob Bowker
116065 by: Bob Bowker

strtolower -> strtoupper
116067 by: Tommi Virtanen
116068 by: Michael Sims

frame
116069 by: dinnie
116075 by: Martin Towell

refresh function?
116070 by: Peter
116072 by: OrangeHairedBoy
116074 by: Peter Houchin

XML Parser Question
116071 by: OrangeHairedBoy
116076 by: Martin Towell
116077 by: OrangeHairedBoy

Re: Mail() function problem
116073 by: David Robley

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 ---

Make sure you're accessing your variables correctly as well. Remember, 
register_globals is now off by default, so you can't just access POST and GET 
vars by variable name, but insterad use $_POST[varname] or $_GET[varname]

On Wednesday 11 September 2002 10:42, Chris Boget wrote:
> Do any of you guys have experience setting PHP up
> with the IPlanet webserver?  We are trying it out (for
> a client) and we can't seem to get to so that PHP
> gets the POST or GET variables passed from a form
> and would like to talk with someone who's had experience
> working with or around this problem.
>
> Chris

-- 

Henrik Hudson
[EMAIL PROTECTED]

Note:  Beware of Dragons - Thou art crunchy and taste good with ketchup.


--- End Message ---
--- Begin Message ---

Instead of $myformvalue, try $_POST['myformvalue'] or $_GET['myformvalue'].
Then slap yourself on the forhead for not looking in the manual and seeing
what changes have been made to newer versions, or for not checking this
lists' archives first, because this questions is asked DAILY, if not more
frequently :)

Justin French


on 12/09/02 1:42 AM, Chris Boget ([EMAIL PROTECTED]) wrote:

> Do any of you guys have experience setting PHP up
> with the IPlanet webserver?  We are trying it out (for
> a client) and we can't seem to get to so that PHP
> gets the POST or GET variables passed from a form
> and would like to talk with someone who's had experience
> working with or around this problem.
> 
> Chris
> 
> 
> 


--- End Message ---
--- Begin Message ---

Can anyone tell me if the latest v

Re: [PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy

Yeah...i should have mentioned I had thought of that...but I really don't
want to   :)

It just doesn't look right when it's a math expression. Know a permenant
solution?

Lewis


"Martin Towell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> could you change the "<" to "<" or "%3C" or something similar?
>
> -Original Message-
> From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 12, 2002 1:59 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] XML Parser Question
>
>
> I've been reading the XML parser documention, and I'm not having much
luck.
>
> I want to be able to handle the tag , but the parser
> keeps telling me that it's not formed correctly (because of the "<" in the
> quotes). But shouldn't it ignore that as a tag-opening "<" since it's
inside
> quotes?? Anyway, is there an option I can set to allow this??
>
> If not, is there a XML parser class that anyone would recommend? I like
the
> fact that the built in one has the ability to call different subroutines
> based on the the tag information. Are there any like that which would
> support the use of < and > in quotes??
>
> Thanks all!
>
> Lewis
>
>
>
> --
> 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] XML Parser Question

2002-09-11 Thread Martin Towell

could you change the "<" to "<" or "%3C" or something similar?

-Original Message-
From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 1:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] XML Parser Question


I've been reading the XML parser documention, and I'm not having much luck.

I want to be able to handle the tag , but the parser
keeps telling me that it's not formed correctly (because of the "<" in the
quotes). But shouldn't it ignore that as a tag-opening "<" since it's inside
quotes?? Anyway, is there an option I can set to allow this??

If not, is there a XML parser class that anyone would recommend? I like the
fact that the built in one has the ability to call different subroutines
based on the the tag information. Are there any like that which would
support the use of < and > in quotes??

Thanks all!

Lewis



-- 
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] frame

2002-09-11 Thread Martin Towell

this is more of an HTML question. You'll probably be wanting to look at
 and 

-Original Message-
From: dinnie [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 12:59 PM
To: Milist PHP
Subject: [PHP] frame



hi all,
sorry for disturb all of u for a while...
there's anyone can hel me...??

i'm a beginner in PHPer...
right now... i'm trying to make 2 frames in one file...

example.. 

setup.php as main program with 2 frame 
then i want to call dispsetup.php and display it in second frame...
how the way to make the syntax...??

thanks before all... ^_^




-- 
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] refresh function?

2002-09-11 Thread Peter Houchin

yeah have a look at ur meta tags.. ie meta refreash

> -Original Message-
> From: Peter [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 12 September 2002 1:56 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] refresh function?
> 
> 
> Hi,
>   Is there a function that will auto refresh a page?
> 
> Thanks in advance,
> -Peter
> 
> 
> 
> -- 
> 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] Mail() function problem

2002-09-11 Thread David Robley

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> Hi,
> 
> does that mean I can do nothing about it?
> 
> Alva
> 
> "Pekka Saarinen" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > At 9/10/2002, you wrote:
> > >Hi Everyone,
> > >
> > >I did a simple test with this script:
> > >
> > > > >mail("[EMAIL PROTECTED]", "test", "this is a test mail");
> > >echo "done";
> > >?>
> > >
> > >I run the script from web accounts on different servers. I can receive
> the
> > >test mail from some but not from others. Is there any configurations that
> I
> > >am missing here?
> >
> > My guesses:
> >
> > Many mail servers are configured so that they send mail only if the sender
> > receives mail at the same time. One other possible pitfall is that reverse
> > IP lookup is not working correctly and your server rejects the mail as it
> > cannot verify the sender host. Also, many (well configured) servers do not
> > send when there is no live account for that sender.

You can use the fourth argument to mail() to set additional headers, such 
as From: [EMAIL PROTECTED] to try and get around the 
problem.

-- 
David Robley

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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




[PHP] Re: refresh function?

2002-09-11 Thread OrangeHairedBoy

That's actually an HTML function. Just insert this in the ...
tags:



If you want it to refresh itself, use:



In either case, replace "2" with the number of seconds to wait from the time
the page finishes loading before refreshing.


Lewis


"Peter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>   Is there a function that will auto refresh a page?
>
> Thanks in advance,
> -Peter
>
>



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




[PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy

I've been reading the XML parser documention, and I'm not having much luck.

I want to be able to handle the tag , but the parser
keeps telling me that it's not formed correctly (because of the "<" in the
quotes). But shouldn't it ignore that as a tag-opening "<" since it's inside
quotes?? Anyway, is there an option I can set to allow this??

If not, is there a XML parser class that anyone would recommend? I like the
fact that the built in one has the ability to call different subroutines
based on the the tag information. Are there any like that which would
support the use of < and > in quotes??

Thanks all!

Lewis



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




[PHP] refresh function?

2002-09-11 Thread Peter

Hi,
  Is there a function that will auto refresh a page?

Thanks in advance,
-Peter



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




[PHP] frame

2002-09-11 Thread dinnie


hi all,
sorry for disturb all of u for a while...
there's anyone can hel me...??

i'm a beginner in PHPer...
right now... i'm trying to make 2 frames in one file...

example.. 

setup.php as main program with 2 frame 
then i want to call dispsetup.php and display it in second frame...
how the way to make the syntax...??

thanks before all... ^_^




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




Re: [PHP] strtolower -> strtoupper

2002-09-11 Thread Michael Sims

On Thu, 12 Sep 2002 05:21:01 +0300, you wrote:

[...]
>$name = "mattson-hedman" # correct format is Mattson-Hedman, but user
>can write in many ways. $name came from db.
>
>so how I can convert this $name format "Mattson-Hedman".
[...]

Try this:

function uc_all ($str) {

  $temp = preg_split('/(\W)/', $str, -1,PREG_SPLIT_DELIM_CAPTURE);

  foreach ($temp as $key => $word) { 
$temp[$key] = ucfirst(strtolower($word)); 
  } 

  return join ('', $temp); 

}

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




[PHP] strtolower -> strtoupper

2002-09-11 Thread Tommi Virtanen

Hi!

Again, problem to convert chars. 

example:

$name = "mattson-hedman" # correct format is Mattson-Hedman, but user
can write in many ways. $name came from db.

so how I can convert this $name format "Mattson-Hedman". First name
first-letter is easy, but how about second-name first-letter H. There
are always char '-' before char which should be convert.

gustavus



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




Re: [PHP] IPlanet Webserver

2002-09-11 Thread Justin French

Instead of $myformvalue, try $_POST['myformvalue'] or $_GET['myformvalue'].
Then slap yourself on the forhead for not looking in the manual and seeing
what changes have been made to newer versions, or for not checking this
lists' archives first, because this questions is asked DAILY, if not more
frequently :)

Justin French


on 12/09/02 1:42 AM, Chris Boget ([EMAIL PROTECTED]) wrote:

> Do any of you guys have experience setting PHP up
> with the IPlanet webserver?  We are trying it out (for
> a client) and we can't seem to get to so that PHP
> gets the POST or GET variables passed from a form
> and would like to talk with someone who's had experience
> working with or around this problem.
> 
> Chris
> 
> 
> 


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




RE: [PHP] Need 2-way encryption

2002-09-11 Thread Bob Bowker

Maybe "reversible hashing of a tar file" is a better way to describe what I 
need ... I want to make a tar file unreadable (at least can't be 
uncompressed) by anyone who doesn't know the key.

Bob.

At 10:43 AM 9/12/2002 +1000, Martin Towell wrote:
>something to do with private and public keys - but don't ask me how to do it
>in PHP
>Hope that leads you on the right path
>Martin
>
>
>-Original Message-
>From: Bob Bowker [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September 12, 2002 10:49 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] Need 2-way encryption
>
>
>Is there a way to encrypt a large tar file (60+ megs) in a way that it can
>be decrypted ...? RH Linux 7.2, PHP 4.06
>
>TIA --
>
>Bob.
>
>
>--
>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] Need 2-way encryption

2002-09-11 Thread Bob Bowker

Is there a way to encrypt a large tar file (60+ megs) in a way that it can 
be decrypted ...? RH Linux 7.2, PHP 4.06

TIA --

Bob.


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




[PHP] PreCaching Db into Variables Slows it down?!??

2002-09-11 Thread M1tch

Grrr!

Just spent ages (well, 2hours) on a precaching system for my PHP code that
didn't work out!
Hang on, I'll backtrack a bit...

My website is using a php engine that picks at snippets of html from the
database, and builds them up to form the page.
A typical page may use 5 of these html snippets, each at maybe 5kb in size.

I was sat thinking, looking at the debug-timer, and saw that the templates
were one of the more time consuming aspects.
So I said, I know, I'll save the db a bit, and at the start of the script,
read all the templates that I'll need into a global variable, and call them
from that.
Simple, 5 db calls put into 1, and templates taken out of memory.

So why, oh why, has the time taken actually increased??? Does anyone have
sufficient working knowledge of PHP to give me a hint at why this has
happened?

Also, am I right in thinking that as the website hits increase, the db will
be put under increasing pressure, so it serves off better being called only
once instead of 5 times (Even though more data is taken out of it??).

It's late, my eyes are blurring, and I'm annoyed. Very annoyed!

Regards,
Andy




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




[PHP] Re: mysql_insert_id

2002-09-11 Thread David Robley

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Hi guys,
> 
> I never can get mysql_insert_id?
> Is this broken with PHP4?
> Please let me know if you can get it to work. or work around.
> 
> Thanks.

I have had no problem with it - perhaps if you could show the list your 
code someone might be able to see if you have a problem there.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




Re: [PHP] Session example at OSCON2002

2002-09-11 Thread Chris Shiflett

http://conf.php.net/oscon2002

Happy hacking.

Chris

[EMAIL PROTECTED] wrote:

>A friend of mine took a tutorial at OSCON 2002 (he thinks it was "Intorduction 
>to PHP") and said that Rasmus had provided a full working version of a class 
>to handle sessions. While I was at the conference I did not go to that 
>tutorial (or was it a session?) and so I did not see it. I am wondering if 
>anyone has a link to it. I looked at pres.php.net and couldn't see anything
>


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




Re: [PHP] Re: LDAP (NDS) authentication example...

2002-09-11 Thread joshua

i'm not sure if i follow you. i have never used ldap to write 
authentication scripts as i've only used the .htaccess method.

to retrieve data you need to bind using a username/password combination 
that is valid. i guess you could test your user's username/password by 
using it to attempt a bind.



the following is copied verbatim from the manual's user notes:

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

[EMAIL PROTECTED] (03-Jan-2002 11:46)

It took quite a while to figure out how to do LDAP authentication as 
there wasn't a complete example ... just some cryptic notes about 
passwords. So, here's what I came up with that works for me:
// $inp_uid contains the user id to be authenticated
// $inp_passwd contains the plain text password to be authenticated
$ds=ldap_connect("ldap.someserver.com");
//substitute the real host name in the previous statement
if ($ds) {
$r=@ldap_bind($ds); // this is an anonymous bind
$st_search="uid=$res_uid";
// need to set the right root search information in next statement.
// Your requirement may be different
$sr=ldap_search($ds,"ou=mycompany.com,o=My Company", "$st_search");
$info = ldap_get_entries($ds, $sr);
for ($i=0; $i<$info["count"]; $i++) {
$dn=$info[$i]["dn"];
}
// I now know the dn needed to authenticate
// now bind to see if the uid and password work
// the password is still plain text
$r=@ldap_bind($ds, $dn, $inp_passwd);
if ($r) {
$str_passok="Yes";
// ldap_bind will return TRUE if everything matches
} else {
$str_passok="No";
// otherwise ldap_bind will return FALSE
}
ldap_close($ds);
} else {
$error_string="Error -- unable to connect to ldap.someserver.com";
}
I'm sure that there's more error checking that needs to be done, but 
this provides the basic skeleton


# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


Joshua




Richard Whittaker wrote:
>>If on the other hand you actually want to retrieve data from your LDAP
>>system then i suggest reading the manual. it's not actually a lot harder
>>that connecting to RDBMS.
>>
>>I managed to get a working script straight off the manual page.
>>http://www.php.net/manual/en/ref.ldap.php
> 
> 
> Unfortunately, what I know about LDAP would fit on the head of a very small
> object (I.E. a pin), so I'm still getting used to the whole idea of LDAP...
> 
> So, with NDS, I would just do an ldp_bind to the proper tree, with a
> username and password, and testing for that would tell me if the
> Username/Password combination is valid, or would there be something further
> I'd have to do?
> 
> Thanks!
> Richard W.
> 
> 


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




[PHP] html tables, php, other URL's...

2002-09-11 Thread Anthony Ritter

I'm trying to take a certain string from a USGS site that gives real time
water levels and water heights for a certain location and insert it into a
table using php.

I'd like to open and read some of the lines in the USGS table - but not all.

The output from the script - which doesn't have the fopen() and fread()
commands below - gives me the string and then the table headers.

I'd like to transpose it so that the table headers appear first and then the
data from the USGS file is inserted within the columns below.

Thank you.
Tony Ritter


";
echo "USGS
StationLocationDateTimeLevel";

$words1="01427510  DELAWARE RIVER AT CALLICOON NY   09/11 13:15  2.88";
$regexp="0.[A-Z,a-z,0-9]
.";
if (ereg($regexp,$words1,$reg))
echo "$reg[0]";
echo "";
?>







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




Re: [PHP] header question

2002-09-11 Thread Chris Shiflett

You should always use a full URL in a Location header. Though browsers 
may handle improper uses of this header, it is still a bad practice.

Happy hacking.

Chris

Krzysztof Dziekiewicz wrote:

>>On Wed, 11 Sep 2002, Meltem Demirkus wrote:
>>
>>
>>>I want to know if there is any way to send data in
>>>header("Location:login.php") .I know how to send like this   >>href=\"login.php?id=$ID\">  but I need to use header and I dont know howto
>>>do this?...
>>>  
>>>
>>header( "Location: login.php?id=${ID}" );
>>
>>
>What for {} ?
>Rather: header( "Location: login.php?id=$ID" );
>


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




Re: [PHP] Extracting Numbers from a string.

2002-09-11 Thread Zak Greant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On September 11, 2002 16:31, Jason Caldwell wrote:
> I need to extract the numbers only from a field.
>
> For example:  I have an AMOUNT field and so that I can filter out any user
> typo's I would like to extract the numbers only.
>
> If the user enters $56.55 for example or just $56 then I would like to be
> able to remove the "$" and the "." keeping just the 56 or 5655.
>
> Can I use eregi_replace() to do this -- I've been trying but it doesn't
> seem to work right.

  Hey Jason,

  You can strip out all non-numeric values with this regular expression:
  $v = ereg_replace('[^0-9]', '', $v);


  If you want to keep the decimal place, then use this
  $v = ereg_replace('[^.0-9]', '', $v);


  And finally, if you want a regular expression that recognizes monetary
  values, try this :)

  $regex  = '^' # match the start of a string
. '('   # capture any text that matches the regex
. '[^0-9]*' # match any character that is not 0-9
. ')'   # stop capturing text
# Capture match so that we can see if
# they used a currency symbol :)
. '?'   # Optionally match the preceding bracketed text

. '('   # capture any text that matches the regex
. '[0-9]+'  # match an integer number
.'|[,.][0-9]{0,2}'# or match a decimal value
.'|[0-9]+[,.][0-9]{0,2}'  # match integer and decimal
.')'# Stop capturing text

.'([^0-9]+)'# Capture any trailing text (like USD or CAD)
. '?';  # Optionally match the preceding bracketed text

  if( ereg($regex, $possible_numeric_value, $captured_text) ) {
echo "$possible_numeric_value might be a monetary value.";
var_dump ($captured_text);

  } else {
echo "$possible_numeric_value is probably not a monetary value.";
  }


Cheers!
- --zak

Cheers!
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9f89Cb6QONwsK8bIRAsP4AJ9X6RqWUDJYtagcJvZ37f/UoRJaYgCfbg1S
22ioG6nALcALqXd6xjGxOrQ=
=IbP1
-END PGP SIGNATURE-


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




Re: [PHP] Extracting Numbers from a string.

2002-09-11 Thread Dan Ostrowski

A simple:

eregi_replace("[^0-9]", "", $myvar);

should do it. it says.. replace everything that is not a number ( character class 
"[^0-9]" which means Character class "["  NOT "^" of Decimal "0-9" end character class 
"]" ) with a NULL string, thereby ripping out all non-numeric components and leaving 
you with a totally numeric string. ( in theory ).

I haven't tested the code so you may have to play with it, but it's pretty simple.

dan


On Wed, 11 Sep 2002 15:31:22 -0700
"Jason Caldwell" <[EMAIL PROTECTED]> wrote:

> I need to extract the numbers only from a field.
> 
> For example:  I have an AMOUNT field and so that I can filter out any user
> typo's I would like to extract the numbers only.
> 
> If the user enters $56.55 for example or just $56 then I would like to be
> able to remove the "$" and the "." keeping just the 56 or 5655.
> 
> Can I use eregi_replace() to do this -- I've been trying but it doesn't seem
> to work right.
> 
> Thanks.
> Jason
> 
> 
> 
> -- 
> 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] Session example at OSCON2002

2002-09-11 Thread jacob

A friend of mine took a tutorial at OSCON 2002 (he thinks it was "Intorduction 
to PHP") and said that Rasmus had provided a full working version of a class 
to handle sessions. While I was at the conference I did not go to that 
tutorial (or was it a session?) and so I did not see it. I am wondering if 
anyone has a link to it. I looked at pres.php.net and couldn't see anything

Thanks!


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




Re: [PHP] Re: Extracting Numbers from a string.

2002-09-11 Thread Brad Bonkoski

Of course they may not always know that the user would insert a '$' or a
'.' which is what you are keying off of.  I am not all that familiar
with ereg* functions, I might attack it with stepping through charater
by charater and is is_numeric($c) returns true, place it applend it to
another variable, which at the end would have strictly the numbers...
That would be my initial approach, but I'm sure there are many,many
others...
-Brad

M1tch wrote:
> 
> it doesn't use ereg, but it (should) would work:
> 
> $mystring = "I have $56.55 dollars, don't you know";
> $mystring = substr($mystring, strpos($mystring, "$"));//strip out after
> the $ sign
> $mystring = substr($mystring, 0, strpos($mystring, " "));//keep only
> till first space
> 
> //mystring now contains $56.55
> if you want it split into two variables, of '$56', and '55' use:
> $a = explode(".", $mystring);
> //$a[0'] = $56
> //$a[1] = 55
> 
> (by the way, there may be functions that work better than using the
> substr+strpos functions, I just can't remember off the top of my head!)
> 
> Of course, ereg might well work better!
> 
> "Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I need to extract the numbers only from a field.
> >
> > For example:  I have an AMOUNT field and so that I can filter out any user
> > typo's I would like to extract the numbers only.
> >
> > If the user enters $56.55 for example or just $56 then I would like to be
> > able to remove the "$" and the "." keeping just the 56 or 5655.
> >
> > Can I use eregi_replace() to do this -- I've been trying but it doesn't
> seem
> > to work right.
> >
> > Thanks.
> > Jason
> >
> >
> 
> --
> 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] Re: Extracting Numbers from a string.

2002-09-11 Thread M1tch

it doesn't use ereg, but it (should) would work:

$mystring = "I have $56.55 dollars, don't you know";
$mystring = substr($mystring, strpos($mystring, "$"));//strip out after
the $ sign
$mystring = substr($mystring, 0, strpos($mystring, " "));//keep only
till first space

//mystring now contains $56.55
if you want it split into two variables, of '$56', and '55' use:
$a = explode(".", $mystring);
//$a[0'] = $56
//$a[1] = 55

(by the way, there may be functions that work better than using the
substr+strpos functions, I just can't remember off the top of my head!)

Of course, ereg might well work better!



"Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I need to extract the numbers only from a field.
>
> For example:  I have an AMOUNT field and so that I can filter out any user
> typo's I would like to extract the numbers only.
>
> If the user enters $56.55 for example or just $56 then I would like to be
> able to remove the "$" and the "." keeping just the 56 or 5655.
>
> Can I use eregi_replace() to do this -- I've been trying but it doesn't
seem
> to work right.
>
> Thanks.
> Jason
>
>



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




Re: Fw: [PHP] Re:[PHP]question

2002-09-11 Thread timo stamm

Hi Meltem,


the second one was a better description of your problem.
Attached is the most convenient approach can come up with for 
this problem. It is not optimized, but should be easy to 
understand.


Timo



 
'.$f_a_err.'
 
'.$f_b_err.'
 
'.$f_c_err.'


');
};

if(@$fields_complete) {
echo ("all fields filled");
};

?>


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




[PHP] Extracting Numbers from a string.

2002-09-11 Thread Jason Caldwell

I need to extract the numbers only from a field.

For example:  I have an AMOUNT field and so that I can filter out any user
typo's I would like to extract the numbers only.

If the user enters $56.55 for example or just $56 then I would like to be
able to remove the "$" and the "." keeping just the 56 or 5655.

Can I use eregi_replace() to do this -- I've been trying but it doesn't seem
to work right.

Thanks.
Jason



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




Re: [PHP] Will return break loop?

2002-09-11 Thread Kevin Stone

Thanks for really quick replies to my really quick question, everyone.  Much
appreciated.  :)
-Kevin

- Original Message -
From: "David Buerer" <[EMAIL PROTECTED]>
To: "'Kevin Stone'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, September 11, 2002 3:42 PM
Subject: RE: [PHP] Will return break loop?


> really quik answer...
>
> yes.
>
> really long answer...
> from php manual:
>
> "the return() statement immediately ends execution of the current
function,
> and returns its argument as the value of the function call."
>
>
> -Original Message-
> From: Kevin Stone [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 11, 2002 2:57 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Will return break loop?
>
>
> Really quick question.  Will "return" break a loop inside a function?
>
> Example..
> myfunc()
> {
> while($val=0)
> {
> if ($i=128)
> {
> return true;  //<-break or no?
> }
> }
> }
>
> I know I could easily figure this out my own but I do not have the means
to
> test it right now.  :)
>
> Much thanks!
> Kevin
>
>
> --
> 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] Will return break loop?

2002-09-11 Thread Zak Greant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On September 11, 2002 15:57, Kevin Stone wrote:
> Really quick question.  Will "return" break a loop inside a function?
>
> Example..
> myfunc()
> {
> while($val=0)
> {
> if ($i=128)
> {
> return true;  //<-break or no?
> }
> }
> }
>
> I know I could easily figure this out my own but I do not have the means to
> test it right now.  :)

  Yes - return will break a loop.

Cheers!
- --zak
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9f74qb6QONwsK8bIRAl+hAJwI4VaBj6IYtbjgHxGQkmq+Lg2iggCfYqOT
gsTebidZ6s5u2tc5SC60IyM=
=bywU
-END PGP SIGNATURE-


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




RE: [PHP] Will return break loop?

2002-09-11 Thread David Buerer

really quik answer...

yes.

really long answer...
from php manual:

"the return() statement immediately ends execution of the current function,
and returns its argument as the value of the function call."


-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 2:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Will return break loop?


Really quick question.  Will "return" break a loop inside a function?

Example..
myfunc()
{
while($val=0)
{
if ($i=128)
{
return true;  //<-break or no?
}
}
}

I know I could easily figure this out my own but I do not have the means to
test it right now.  :)

Much thanks!
Kevin


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




RE: [PHP] Will return break loop?

2002-09-11 Thread SHEETS,JASON (Non-HP-Boise,ex1)

I tested this on PHP 4.2.3 and in my case return does break a while loop.

Jason

-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 11, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Will return break loop?

Really quick question.  Will "return" break a loop inside a function?

Example..
myfunc()
{
while($val=0)
{
if ($i=128)
{
return true;  //<-break or no?
}
}
}

I know I could easily figure this out my own but I do not have the means to
test it right now.  :)

Much thanks!
Kevin


-- 
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] Variable Variables

2002-09-11 Thread Mike Smith

I am stumped on a project for a receiving system. I'm not sure how to handle
receiving more than one line item. I can UPDATE ... WHERE id=$detid when I
have 1 item, but how would I get the SQL to fire X times depending on the
number of line items I have AND UPDATE the appropriate record.

Currently I have the following:

index.php->results.php->recv.php
Search for |Results of PO|Page to receive/back order
PO  ($ponum|Search  |items.
or $vendor)

The code below displays the line items from the PO:

...
$myServer = "myserver";
$myUser = "login";
$myPass = "password";
$myDB = "db";

$s = @mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");

$d = @mssql_select_db($myDB, $s)
or die("Couldn't open database $myDB");

$sql="SELECT tbl_po.poid, tbl_po.vend_name, tbl_podet.qty,
tbl_podet.unitqty, tbl_podet.um, tbl_podet.partnum, tbl_podet.partdesc FROM
tbl_po INNER JOIN tbl_podet ON tbl_po.poid = tbl_podet.ponum WHERE
(((tbl_po.poid)=$ponum))";

$result = mssql_query($sql);
$numRows = mssql_num_rows($result);
...
[HTML Table header]
...
while($row = mssql_fetch_array($result)) {

echo "";
echo "" . $row[0] . "";
echo "" . $row[1] . "";
echo "" . $row[2] . "";
echo "" . $row[3] . "";
echo "" . $row[4] . "";
echo "" . $row[5] . "";
echo "" . $row[6] . "";
echo "";
echo "";
echo "";
echo "";
echo "";
}
echo "";
echo "";

The last 2 boxes in the table are for Recvd qty and Back Order Qty. The
problem is I could have 1 line item or I could have 10 line items. So if I
have 1 item and my SQL is "UPDATE tbl_podetail SET bkorder=$bkord WHERE
id=$detid" that will work fine, but if I have 10 items, the same UPDATE
statement will only update the LAST $detid, it won't fire 10 times for item.
I could add another column with a button next to each line item to save the
changes, but would (for simplicity) rather have the one "Receive" button.


Regards,
Mike Smith



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




[PHP] Will return break loop?

2002-09-11 Thread Kevin Stone

Really quick question.  Will "return" break a loop inside a function?

Example..
myfunc()
{
while($val=0)
{
if ($i=128)
{
return true;  //<-break or no?
}
}
}

I know I could easily figure this out my own but I do not have the means to
test it right now.  :)

Much thanks!
Kevin


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




Re: [PHP] Query result to an array

2002-09-11 Thread Zak Greant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On September 11, 2002 15:21, Christian Ista wrote:
> > while( $temp = mysql_fetch_row($mysql_result_handle) ) {
> > $array[] = array(
> > 'key0' => array(
> > 'keya' => $temp[0],
> > 'keyb' => $temp[1]
> > ),
> > 'key1' => array(
> > 'keya' => $temp[2],
> > 'keyb' => $temp[3]
> > )
> > );
> > }
>
> I corrected this error myself but that's not work.
>
> Why that twice ? (only the key change)
>
> 'key0' => array(
>   'keya' => $temp[0],
>   'keyb' => $temp[1]
>   ),
>
> when I do echo($array[0][1]) I receive array unknown.

  Ok - if you want a numeric array, then do something like this:

  array(
array( $temp[0], $temp[1] ),
array( $temp[1], $temp[2] )
  )

  --zak
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9f7p3b6QONwsK8bIRAhEpAJ4vU+f/AovqfUkHvdnBf6le47N9AACfdK7K
L6Ub877d4ZUwbxSXF6gl9qY=
=Vnxt
-END PGP SIGNATURE-


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




[PHP] Re: Text from web form

2002-09-11 Thread nicos

Hi,

If you have register global off on your php.ini, you should do:
$name = $_POST['name'];
$message = $_POST['message'];
at the top of your script to enable the variables.

--

Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de sites Internet

"Rick King" <[EMAIL PROTECTED]> a écrit dans le message de
news: [EMAIL PROTECTED]
> Apache: 1.3.26
> PHP: 4.2.3
> OS: HPUX-11
>
> Hello PHP Guru's!
>
> After successfully installing PHP and viewing the phpinfo page, I decided
to
> create a simple web-form. Just a basic "Name" "Message" web-form, when the
> form is complete it is emailed to an account. Everything works, except I
> don't see the filled in contents in the email message. I don't see the
what
> the person filled out. But I see "Name:" ane "Message:"
>
> Any ideas?
>
> Here's my config line for installing PHP:
> CC=gcc ./configure --prefix=/opt/php \
> --without-mysql \   (didn't have MySQL installed)
> --with-apxs=/opt/apache/bin/apxs
>
> Here's my config line for installing Apache:
> CC=gcc ./configure --prefix=/opt/apache \
> --enable-module=most \
> --enable-shared=max
>
> Any help would be greatly appreciated!
>
> Rick
>
>



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




[PHP] Re: Text from web form

2002-09-11 Thread Jome

> Hello PHP Guru's!
>
> After successfully installing PHP and viewing the phpinfo page, I decided
to
> create a simple web-form. Just a basic "Name" "Message" web-form, when the
> form is complete it is emailed to an account. Everything works, except I
> don't see the filled in contents in the email message. I don't see the
what
> the person filled out. But I see "Name:" ane "Message:"
>
> Any ideas?

Could this be an register_globals issue?

Read on
http://www.php.net/manual/en/language.variables.predefined.php#language.vari
ables.superglobals - it may resolve your problem.

  Jome



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




[PHP] Re: PHP help needed

2002-09-11 Thread nicos

Hi,

is it a free assistance or a non-free one?

--

Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de sites Internet


"Michael Plasse" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Hello,
>
> I need a PHP programmer to assist me with updates to childrens website.
>
>
> Mike
>
>



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




[PHP] Re: is php-4.2.3 a stable version?

2002-09-11 Thread nicos

Sure 4.2.3 is a stable and portable version, feel free to upgrade.

--

Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de sites Internet

"Anil Garg" <[EMAIL PROTECTED]> a écrit dans le message de news:
018701c259c3$83778c60$[EMAIL PROTECTED]
> Hi,
>
> i am using freebsd4.2
> I couldnt find if the latest php-versiono 4.2.3 a stable version ?? i mean
> shall i use 4.2.2 or 4.2.3 ?
>
> thanx and regards
> anil
>



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




[PHP] Text from web form

2002-09-11 Thread Rick King

Apache: 1.3.26
PHP: 4.2.3
OS: HPUX-11

Hello PHP Guru's!

After successfully installing PHP and viewing the phpinfo page, I decided to
create a simple web-form. Just a basic "Name" "Message" web-form, when the
form is complete it is emailed to an account. Everything works, except I
don't see the filled in contents in the email message. I don't see the what
the person filled out. But I see "Name:" ane "Message:"

Any ideas?

Here's my config line for installing PHP:
CC=gcc ./configure --prefix=/opt/php \
--without-mysql \   (didn't have MySQL installed)
--with-apxs=/opt/apache/bin/apxs

Here's my config line for installing Apache:
CC=gcc ./configure --prefix=/opt/apache \
--enable-module=most \
--enable-shared=max

Any help would be greatly appreciated!

Rick



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




Re: [PHP] installing php-4.2.3

2002-09-11 Thread Brad Bonkoski

unzip that and cd into it and read the INSTALL file
tar -xzvf php-4.2.3.tar.gz
cd php-4.2.3
less INSTALL

HTH
-Brad

Anil Garg wrote:
> 
> hi,
> 
> i am a newbie to php...
> i have downloaded php-4.2.3.tar.gz from http://www.php.net/downloads.php
> can someone please point me to the right documentaion from where i can know
> what to do next..
>  I am using FreeBSD-4.2.
> 
> thanx and regards
> anil
> 
> --
> 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] installing php-4.2.3

2002-09-11 Thread Anil Garg

hi,

i am a newbie to php...
i have downloaded php-4.2.3.tar.gz from http://www.php.net/downloads.php
can someone please point me to the right documentaion from where i can know
what to do next..
 I am using FreeBSD-4.2.

thanx and regards
anil


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




RE: [PHP] Query result to an array

2002-09-11 Thread Christian Ista

> while( $temp = mysql_fetch_row($mysql_result_handle) ) {
>   $array[] = array(
>   'key0' => array(
>   'keya' => $temp[0],
>   'keyb' => $temp[1]
>   ),
>   'key1' => array(
>   'keya' => $temp[2],
>   'keyb' => $temp[3]
>   )
>   );
> }

I corrected this error myself but that's not work.

Why that twice ? (only the key change)

'key0' => array(
'keya' => $temp[0],
'keyb' => $temp[1]
),

when I do echo($array[0][1]) I receive array unknown.

Bye


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




Re: [PHP] open_basedir without safe mode?

2002-09-11 Thread Rasmus Lerdorf

safe mode and open_basedir are completely separate.

On Thu, 12 Sep 2002, Ville Mattila wrote:

> Hi there,
>
> I was wondering if there is a possibility to get open_basedir preferences
> (also set via .htaccess) active in a server running not PHP in open_basedir.
> I should create a small home site space for some users with PHP equipped,
> but I don't like to put safe mode on as there are some other advanced (not
> runnable in safe mode) scripts on the same machine. open_basedir would limit
> the user's access to their own directories, but it seems not to work wihtout
> safe mode.
>
> Any ideas?
>
> Ville
>
>
> --
> 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] Query result to an array

2002-09-11 Thread Zak Greant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On September 11, 2002 15:05, Christian Ista wrote:
> > while( $temp = mysql_fetch_row($mysql_result_handle) ) {
> > $array[] = array(
> > 'key0' = array(
> > 'keya' => $temp[0],
> > 'keyb' => $temp[1],
> > ),
> > 'key1' = array(
> > 'keya' => $temp[2],
> > 'keyb' => $temp[3],
> > )
> > );
> > }
>
> Hello,
>
> Thanks for your help. But that's not work at all.

  Dear Christian,

  I assume that you encountered some syntax errors in the code?
  (or was there another problem?)

  Anyhow, here is the corrected version

while( $temp = mysql_fetch_row($mysql_result_handle) ) {
$array[] = array(
'key0' => array(
'keya' => $temp[0],
'keyb' => $temp[1]
),
'key1' => array(
'keya' => $temp[2],
'keyb' => $temp[3]
)
);
}

- --zak
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9f7K3b6QONwsK8bIRAiATAJ9TPv/28hZiF136TePF5SXTgDinUACgkg6w
BJVDvRVsVzqplDLOD/u5u4E=
=NbgV
-END PGP SIGNATURE-


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




[PHP] Re: How do I upgrade my version of PHP?

2002-09-11 Thread nicos

You should use the patch command, feel free to "man patch".

--

Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de sites Internet

"Monty" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> I've downloaded the patch file for 4.2.2 to 4.2.3 from the PHP website,
but,
> not sure what to do with this file. I have a Linux 7.x server. Can anyone
> tell me how to patch my version of PHP or point me to a source that
explains
> how this is done?
>
> Thanks!
>



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




[PHP] open_basedir without safe mode?

2002-09-11 Thread Ville Mattila

Hi there,

I was wondering if there is a possibility to get open_basedir preferences
(also set via .htaccess) active in a server running not PHP in open_basedir.
I should create a small home site space for some users with PHP equipped,
but I don't like to put safe mode on as there are some other advanced (not
runnable in safe mode) scripts on the same machine. open_basedir would limit
the user's access to their own directories, but it seems not to work wihtout
safe mode.

Any ideas?

Ville


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




RE: [PHP] Query result to an array

2002-09-11 Thread Christian Ista

> while( $temp = mysql_fetch_row($mysql_result_handle) ) {
>   $array[] = array(
>   'key0' = array(
>   'keya' => $temp[0],
>   'keyb' => $temp[1],
>   ),
>   'key1' = array(
>   'keya' => $temp[2],
>   'keyb' => $temp[3],
>   )
>   );
> }

Hello,

Thanks for your help. But that's not work at all.

bye



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




Re: [PHP] ucwords()? and åäö

2002-09-11 Thread Zak Greant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Here is a quick replacement script* for ucwords() that can be made to handle 
accented characters or interesting casing rules. It is a bit uppercase happy 
- - uppercasing any letter that comes after a non-letter character.

*(Taken from the PHP Functions Essential Reference 
(http://fooassociates.com/phpfer/))

 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D',
   'e' => 'E', 'f' => 'F', 'g' => 'G', 'h' => 'H',
   'i' => 'I', 'j' => 'J', 'k' => 'K', 'l' => 'L',
   'm' => 'M', 'n' => 'N', 'o' => 'O', 'p' => 'P',
   'q' => 'Q', 'r' => 'R', 's' => 'S', 't' => 'T',
   'u' => 'U', 'v' => 'V', 'w' => 'W', 'x' => 'X',
   'y' => 'Y', 'z' => 'Z'
);

$string = <<<_JABBERWOCKY_
"and, has thou slain the jabberwock?
come to my arms, my beamish boy!
o frabjous day! callooh! callay!"
he chortled in his joy.
_JABBERWOCKY_;

echo custom_ucwords($map, $string);
?>


Cheers!
- --zak



On September 11, 2002 08:27, Ville Mattila wrote:
> I can't say correct answer to this, but want also notify that
> strtoupper() -function doesn't affect to those special charters å, ä and ö
> that are very common in Finnish language.
>
> Ville
>
>
> -Original Message-
> From: Tommi Virtanen [mailto:[EMAIL PROTECTED]]
> Sent: 11. syyskuuta 2002 17:14
> To: [EMAIL PROTECTED]
> Subject: [PHP] ucwords()?
>
>
> Hi!
>
> I'll try to convert field first char to upper by using ucwords(). Well,
> this doesn't
> seem to work correct.
>
> Well maybe error came, because that characteres are not standard (they
> are special characterers, finnish language).
>
> Example:
>
> $work_text = "perhepäivähoitaja";
>
> $work_text = ucwords (strtolower ($work_text);
>
> print $work_name -> PerhepäIväHoitaja). Every char after finnish-ä is
> upper.
>
>
> How I can correct this error??
>
> gustavus
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9f6nlb6QONwsK8bIRAhANAJ9Xab9JmsjKxlp+KF01822QmK8zFQCbBXW+
92J2XRJgKmRXRAlhp7QbwTM=
=QEMR
-END PGP SIGNATURE-


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




[PHP] cookie problem...

2002-09-11 Thread rtrt

we are using apache 1.3.12 server, php 4.2.3 on linux.
Before, we didn't write cookies.txt on harddisk. We changed some
configuration in httpd.conf like.
We disabled  mod_proxy module and then cookie had been wrote. But now, we
are not reading
cookie variables from cookies.txt (Netscape). I konw problem could be very
easy but.
I am unsleepy two days.


Tansel Akgul




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




Re: [PHP] Displaying value different from actual value

2002-09-11 Thread Zak Greant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On September 11, 2002 07:57, Dave Rosenberg wrote:
> I'm not sure this is possible, but here's what I'd like to do:
> I know that in order for a set of records from MySQL to display in
> numerical order on a web page, you need to make the column type
> "Integer," but here's my situation:
>
> I'm creating a database of contracts that my organization has.
> Normally, there is a dollar amount on these contracts, and I'd like to
> be able to sort by that value (therefore the Integer column type).
> However, we have some fee-based contracts, and I'd like a way to display
> the amount as "Fee Based" even though I can't enter this in the database
> because of the column type.  Is there a way in PHP to have it display
> this although with some kind of if/then statement or something of that
> sort?
>
> Contract A  Fee-based
> Contract B  7
> Contract C   1250
> Contract D  5

  Hi Dave,

  You can also do this in your SQL query.

  For example:

  If your table contains this:
+--+-+
| contract | amount  |
+--+-+
| Jillco   | 100 |
| Jackco   |   1 |
| ChrisInc |NULL |
+--+-+

  The the following select:

SELECT contract, IFNULL(amount, "Fee Based") amount FROM contracts;

  will return:
Jillco  100
Jackco  1
ChrisincFee Based

Cheers!
- -- 
Zak Greant <[EMAIL PROTECTED]>
MySQL Community Advocate

Feed the Dolphin! Order MySQL support from the MySQL developers at
https://order.mysql.com/?ref=mzgr

"Gosh, Batman! The nobility of the almost-human porpoise." --Robin
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9f6iab6QONwsK8bIRAjoJAJ9rswcUKNzR5z9wD7HaKqJ42raiwgCeOzVs
TMSVwY5J18Y3zeEmRut9Wyg=
=G1gi
-END PGP SIGNATURE-


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




Re: [PHP] Query result to an array

2002-09-11 Thread Zak Greant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On September 11, 2002 14:12, Christian Ista wrote:
> Hello,
>
> A query return x rows, by rows there are 4 fields. I'd like to put the
> result in an array, a 2 dimensions array. Could you tell me how to do
> that ?

  Something like this may work for you:

# Connect to db, make query, etc.

while( $temp = mysql_fetch_row($mysql_result_handle) ) {
$array[] = array(
'key0' = array(
'keya' => $temp[0],
'keyb' => $temp[1],
),
'key1' = array(
'keya' => $temp[2],
'keyb' => $temp[3],
)
);
}

Good luck!
- --zak
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9f6tAb6QONwsK8bIRAvjKAJwKN0yvbGaztQzZOKYiy22FMqQ5EgCeP3AH
4sGpVTTX6gUJp8fZJ8xXEfQ=
=eaeg
-END PGP SIGNATURE-


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




[PHP] Query result to an array

2002-09-11 Thread Christian Ista

Hello,

A query return x rows, by rows there are 4 fields. I'd like to put the
result in an array, a 2 dimensions array. Could you tell me how to do
that ?

Bye



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




RE: [PHP] help with making an xslt class

2002-09-11 Thread Geoff

I am using the sablotron xslt library I just want to make a class to 
minimize the code I need to write and make it easier to maintain.

When I do it like so:
// create XSLT processor 
$xh = xslt_create();

// call xslt processor
// Process the document
$result = xslt_process($xh, 'arg:/_xml', $xmldoc->xslstr, NULL,
$arguments); 
if ($result) {
print $result;
}
else {
print "Sorry, the xml could not be transformed by the xsl into";
print "  the \$result variable the reason is that " . xslt_error($xh)
. 
print " and the error code is " . xslt_errno($xh);
}
xslt_free($xh);
it works fine. I just don't seem to be able to make it work in a class.


On Wed, 2002-09-11 at 14:18, Brian V Bonini wrote:
> Isn't this what the salbatron library is for?
> 
> > -Original Message-
> > From: Geoff [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 11, 2002 2:52 PM
> > To: php list
> > Subject: [PHP] help with making an xslt class
> > 
> > 
> > I am trying to make a class to process xslt transformations.
> > 
> > Here is the class:
> > class xslTransformer extends makexml{
> > var $xh;
> > function xslTransformer($xslfile)   {
> > $this->xh = xslt_create();
> > $result=xslt_process($this->xh,$this->xmlstr,$xslfile); 
> > //errorsif
> > ($result) {
> > print $result;
> > }
> > else {
> > print "Sorry, the xml could not be transformed by the xsl 
> > into";  print
> > "  the \$result variable the reason is that . "xslt_error($this->xh) . 
> > print " and the error code is " . xslt_errno($this->xh);
> > }
> > xslt_free($this->xh);
> > }
> > } 
> > 
> > I call it as 
> > 
> > $this->xmlstr is valid xml (I have checked) the makexml class works fine
> > as well.
> > 
> > Here is the error I get:
> > Warning: Sablotron error on line 1: XML parser error 3: no element found
> > in /usr/lib/apache/htdocs/xml/clsmakexml.php on line 200
> > Sorry, the xml could not be transformed by the xsl into and the error
> > code is 2 the $result variable the reason is that XML parser error 3: no
> > element found
> > 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Mail system with folders?

2002-09-11 Thread Leonid Mamtchenkov

Dear Leif K-Brooks,

Once you wrote about "[PHP] Mail system with folders?":
> I'm designing a site, and I want to put mail with folders on it.  Fairly 
> simply, but I'm not sure what to do for the default folders.  I want to 
> have three precreated folders: inbox, trash, and sent.  I'm not sure 
> about the best way to do these.  Any ideas?

I think you should investigate more on the subject of "web mail" if that
is what you need to do.  Usually, php (or any other language) is used to
create an interface for an operational mail server, which can be
accessed via IMAP.  You can find lots of examples at
http://www.freshmeat.net or any other software repository.

Do not reinvent the wheel. ;)

-- 
Best regards,
  Leonid Mamtchenkov, RHCE
  System Administrator
  Francoudi & Stephanou Ltd.

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




[PHP] How do I upgrade my version of PHP?

2002-09-11 Thread Monty

I've downloaded the patch file for 4.2.2 to 4.2.3 from the PHP website, but,
not sure what to do with this file. I have a Linux 7.x server. Can anyone
tell me how to patch my version of PHP or point me to a source that explains
how this is done?

Thanks!


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




RE: [PHP] help with making an xslt class

2002-09-11 Thread Brian V Bonini

Isn't this what the salbatron library is for?

> -Original Message-
> From: Geoff [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 11, 2002 2:52 PM
> To: php list
> Subject: [PHP] help with making an xslt class
> 
> 
> I am trying to make a class to process xslt transformations.
> 
> Here is the class:
> class xslTransformer extends makexml  {
>   var $xh;
>   function xslTransformer($xslfile)   {
>   $this->xh = xslt_create();
>   $result=xslt_process($this->xh,$this->xmlstr,$xslfile); 
> //errors  if
> ($result) {
>   print $result;
>   }
>   else {
>   print "Sorry, the xml could not be transformed by the xsl 
> into";print
> "  the \$result variable the reason is that . "xslt_error($this->xh) . 
>   print " and the error code is " . xslt_errno($this->xh);
>   }
>   xslt_free($this->xh);
>   }
> } 
> 
> I call it as 
> 
> $this->xmlstr is valid xml (I have checked) the makexml class works fine
> as well.
> 
> Here is the error I get:
> Warning: Sablotron error on line 1: XML parser error 3: no element found
> in /usr/lib/apache/htdocs/xml/clsmakexml.php on line 200
> Sorry, the xml could not be transformed by the xsl into and the error
> code is 2 the $result variable the reason is that XML parser error 3: no
> element found
> 
> 
> 
> 
> 
> 
> -- 
> 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] is php-4.2.3 a stable version?

2002-09-11 Thread MET

PHP 4.2.3 is mainly fixes to 4.2.2 but yes it is stable and a suggested
update.

~ Matthew

-Original Message-
From: Anil Garg [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 11, 2002 2:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] is php-4.2.3 a stable version?


Hi,

i am using freebsd4.2
I couldnt find if the latest php-versiono 4.2.3 a stable version ?? i
mean shall i use 4.2.2 or 4.2.3 ?

thanx and regards
anil


-- 
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] help with making an xslt class

2002-09-11 Thread Geoff

I am trying to make a class to process xslt transformations.

Here is the class:
class xslTransformer extends makexml{
var $xh;
function xslTransformer($xslfile)   {
$this->xh = xslt_create();
$result=xslt_process($this->xh,$this->xmlstr,$xslfile); //errorsif
($result) {
print $result;
}
else {
print "Sorry, the xml could not be transformed by the xsl into";print
"  the \$result variable the reason is that . "xslt_error($this->xh) . 
print " and the error code is " . xslt_errno($this->xh);
}
xslt_free($this->xh);
}
} 

I call it as 

$this->xmlstr is valid xml (I have checked) the makexml class works fine
as well.

Here is the error I get:
Warning: Sablotron error on line 1: XML parser error 3: no element found
in /usr/lib/apache/htdocs/xml/clsmakexml.php on line 200
Sorry, the xml could not be transformed by the xsl into and the error
code is 2 the $result variable the reason is that XML parser error 3: no
element found






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




[PHP] is php-4.2.3 a stable version?

2002-09-11 Thread Anil Garg

Hi,

i am using freebsd4.2
I couldnt find if the latest php-versiono 4.2.3 a stable version ?? i mean
shall i use 4.2.2 or 4.2.3 ?

thanx and regards
anil


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




Re: [PHP] PHP and Special Characters

2002-09-11 Thread Adam Williams

use stripslashes() or turn on magic quotes in php.ini

On Wed, 11 Sep 2002, Rick King wrote:

> Apache: 1.3.23
> PHP: 4.1.2
>
> Hello PHP Guru's!
>
> I have created a simple web form. When the form is complete and submitted,
> the results are emailed to an email account. But I have noticed that the '
> character is escaped.
> Example: John O\ 'Connor, instead of getting John O'Connor.
>
> Is this a problem within PHP or HTML?
> Has anyone else encountered this problem before? If so, what was the
> workaround?
>
> Any help would be greatly appreciated!
>
> Rick
>
>
>
>


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




[PHP] PHP and Special Characters

2002-09-11 Thread Rick King

Apache: 1.3.23
PHP: 4.1.2

Hello PHP Guru's!

I have created a simple web form. When the form is complete and submitted,
the results are emailed to an email account. But I have noticed that the '
character is escaped.
Example: John O\ 'Connor, instead of getting John O'Connor.

Is this a problem within PHP or HTML?
Has anyone else encountered this problem before? If so, what was the
workaround?

Any help would be greatly appreciated!

Rick



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




[PHP] Re: Sending Attachements through php email form

2002-09-11 Thread Manuel Lemos

Hello,

On 09/10/2002 11:07 AM, Heidi Belal wrote:
> Hi,
> 
> I was wondering if anybody could tell me the best way and how to code sending an 
>attachement with an email form.  I want the user to be able to browse and select the 
>file he wants to attach, and i want the reciepent to be able to see the file that has 
>been attached with the email.

You may want to try this class that lets you do what you want:

http://www.phpclasses.org/mimemessage


-- 

Regards,
Manuel Lemos


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




Re: [PHP] PHP And Apache

2002-09-11 Thread Glenn

ok then...

thanks

"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Use the latest Apache 1.3.x and the latest PHP.  Works just fine.  Apache
> 2.0.x is a completely different beast.
>
> -Rasmus
>
> On Wed, 11 Sep 2002, Glenn wrote:
>
> > Can anyone tell me if the latest version of PHP works with the latest
Apache
> > web server?  When I try to build the server it says its not, but I
wondered
> > if there were any patches or changes I could make for them to work
properly?
> >
> > Thanks,
> >
> > glenn
> >
> >
> >
> > --
> > 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] PHP help needed

2002-09-11 Thread Michael Plasse

Hello,

I need a PHP programmer to assist me with updates to childrens website.


Mike



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




[PHP] Need PHP programmer ASAP..

2002-09-11 Thread Michael Plasse

Hello,

I need a PHP programmer ASAP to help with site updates on large childrens
webiste.

Please reply to: [EMAIL PROTECTED]



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




Re: [PHP] PHP And Apache

2002-09-11 Thread Rasmus Lerdorf

Use the latest Apache 1.3.x and the latest PHP.  Works just fine.  Apache
2.0.x is a completely different beast.

-Rasmus

On Wed, 11 Sep 2002, Glenn wrote:

> Can anyone tell me if the latest version of PHP works with the latest Apache
> web server?  When I try to build the server it says its not, but I wondered
> if there were any patches or changes I could make for them to work properly?
>
> Thanks,
>
> glenn
>
>
>
> --
> 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] PHP And Apache

2002-09-11 Thread Glenn

Can anyone tell me if the latest version of PHP works with the latest Apache
web server?  When I try to build the server it says its not, but I wondered
if there were any patches or changes I could make for them to work properly?

Thanks,

glenn



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




Re: [PHP] IPlanet Webserver

2002-09-11 Thread Henrik Hudson

Make sure you're accessing your variables correctly as well. Remember, 
register_globals is now off by default, so you can't just access POST and GET 
vars by variable name, but insterad use $_POST[varname] or $_GET[varname]

On Wednesday 11 September 2002 10:42, Chris Boget wrote:
> Do any of you guys have experience setting PHP up
> with the IPlanet webserver?  We are trying it out (for
> a client) and we can't seem to get to so that PHP
> gets the POST or GET variables passed from a form
> and would like to talk with someone who's had experience
> working with or around this problem.
>
> Chris

-- 

Henrik Hudson
[EMAIL PROTECTED]

Note:  Beware of Dragons - Thou art crunchy and taste good with ketchup.


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




Re: [PHP] Mail() function problem

2002-09-11 Thread Alva Chew

Hi,

does that mean I can do nothing about it?

Alva

"Pekka Saarinen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 9/10/2002, you wrote:
> >Hi Everyone,
> >
> >I did a simple test with this script:
> >
> > >mail("[EMAIL PROTECTED]", "test", "this is a test mail");
> >echo "done";
> >?>
> >
> >I run the script from web accounts on different servers. I can receive
the
> >test mail from some but not from others. Is there any configurations that
I
> >am missing here?
>
> My guesses:
>
> Many mail servers are configured so that they send mail only if the sender
> receives mail at the same time. One other possible pitfall is that reverse
> IP lookup is not working correctly and your server rejects the mail as it
> cannot verify the sender host. Also, many (well configured) servers do not
> send when there is no live account for that sender.
>
>
> -
> Pekka Saarinen
> http://photography-on-the.net
> -
>
>



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




[PHP] Re: IPlanet Webserver

2002-09-11 Thread Neophyte

If PHP is setup and working fine and simply not getting POST or GET vars, it
can depend on the PHP version you have installed. but the

$HTTP_POST_VARS and $HTTP_GET_VARS should work on any version of PHP4.

If your still having trouble and using those arrays then im unsure as to
what else could be wrong without seeing the code.

"Chris Boget" <[EMAIL PROTECTED]> wrote in message
00fc01c259a9$e4eede40$8c01a8c0@ENTROPY">news:00fc01c259a9$e4eede40$8c01a8c0@ENTROPY...
> Do any of you guys have experience setting PHP up
> with the IPlanet webserver?  We are trying it out (for
> a client) and we can't seem to get to so that PHP
> gets the POST or GET variables passed from a form
> and would like to talk with someone who's had experience
> working with or around this problem.
>
> Chris
>
>
>



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




Re: [PHP] question

2002-09-11 Thread Adam Williams

I just wanted to chime in here and say that Julie Meloni's books are
awesome.  I have PHP Essentials and her Teach yourself PHP in 24 hours
book.  I plan to buy her PHP Fast and Easy 2nd edition very soon.

Adam

On Wed, 11 Sep 2002, Miles Thompson wrote:

> Julie Meloni to the rescue again - http://www.thickbookcom, you'll find a
> tutorial on custom error messages.
> In fact, after working on that you may rethink your approach.
>
> Miles Thompson
>
> At 04:31 PM 9/11/2002 +0300, Meltem Demirkus wrote:
> >Hi,
> >I am working on a process which turn to the previous page when the user
> >enter something wrong in the form on a page .But I also want to warn the
> >user with an error message on this page ...I know using heder : location but
> >I couldn't  add the message ...
> >can anybody help me ? How can I add this message to the page..
> >thanks alot
> >
> >metos
> >
> >
> >--
> >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] Session Vars problem

2002-09-11 Thread Krispi

Hi,

I have a problem when registering Session variables.
Let me describe.

I have 2 files. In the first one initialization is done and some session
registering.
The second one is my main application. If I call a method from the first
file in my main file , variables are not registered. I use session_start in
both files.


Thx,

  Krispi



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




[PHP] Illegal characters in HTML form element names.

2002-09-11 Thread Jared Williams

Hi,
The HTML standard defines the set of characters that are valid in form
element names. It does not include [ or ] and yet this seems to be the only
way to get a set of form elements grouped into an array for server side
processing.

Why doesnt PHP do (Perl/ASP) automatically create an array when there is
more than one form element with the same name in the post/get data?




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




RE: [PHP] is php4.2 supported on freebsd-4.2

2002-09-11 Thread MET

I'm guessing that pages requiring passing data isn't working correctly
right?  If so here's what you do.

cd php-4.2.2

./configure  (whatever options you want here)

make && make install && make clean

(add the appropriate lines to your httpd.conf file, the ones you have
from 4.1.2 should be just fine)

cp /path/to/php/php-4.2.2/php.ini-dist /usr/local/lib/php.ini

Open /usr/local/lib/php.ini in your prefered text editor and search for
this "register_globals"

Change the value of 'register_globals' to On from Off

...And then your done.

And read this so you understand why this was done:
http://www.zend.com/zend/art/art-sweat4.php


~ Matthew


-Original Message-
From: Anil Garg [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 11, 2002 11:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP] is php4.2 supported on freebsd-4.2


Hi,
i am using php.4.1.2. on freebsd 4.2
i  want to upgrade from 4.1.2 to 4.2.2...

The problem is:
1. Is php 4.2.2 supported on freebsd-4.2 ?
2. Can this happen that after upgrade(of php).some code doesnt work
on 4.2.2 which was working on 4.1.2.

thanx and regards
anil


-- 
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




  1   2   >