[PHP] Help needed

2003-06-30 Thread Nirmala P
Hi All,

I am new to  PHP world.

Could any body tell me how to call any function(written in PHP) 
from  Java script.
Actually my PHP function return a string value  which i need to 
access in my java script code.

Thanks in Advance..

Nirmala
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Help needed

2003-06-30 Thread Nirmala P
Hi All,

I am new to  PHP world.

Could any body tell me how to call any function(written in PHP) 
from  Java script.
Actually my PHP function return a string value  which i need to 
access in my java script code.

Thanks in Advance..

Nirmala
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Help needed

2003-06-30 Thread Haseeb
hi,
here is how you do it
?
$strJavaScriptValue=Hello;
?
script language=JavaScript
alert('? echo $strJavaScriptValue?');
/script

this will alert Hello!. i think you get the point.
Haseeb

- Original Message - 
From: Nirmala P [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 30, 2003 10:45 AM
Subject: [PHP] Help needed


 Hi All,
 
 I am new to  PHP world.
 
 Could any body tell me how to call any function(written in PHP) 
  from  Java script.
 Actually my PHP function return a string value  which i need to 
 access in my java script code.
 
 Thanks in Advance..
 
 Nirmala
 ___
 Click below to experience Sooraj Barjatya's latest offering
 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
 Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com
 
 
 -- 
 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] php.net's custom 404 scripts

2003-06-30 Thread olinux
here's a couple:

Custom Error 404 Documents with PHP
http://www.phpfreaks.com/tutorials/21/0.php

Creating Custom PHP 404 Error Pages
http://www.phpbeginner.com/columns/ray/404/1

depending what you are doing this might help too ...
Building Dynamic Pages With Search Engines in Mind
http://www.phpbuilder.com/columns/tim2526.php3

olinux


--- Justin French [EMAIL PROTECTED] wrote:
 Hi all,
 
 I used to have a bookmark for how php.net's custom
 404/redirect/search
 script worked, but I can't find it now, and can't
 see it on php.net... has
 anyone got a link?
 
 Not sure if it was on zend.com or php.net.
 
 
 TIA
 Justin
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



[PHP] UPS

2003-06-30 Thread Daryl Meese
If anybody has implemented UPS's shipping registration software using PHP 
Curl and found away around the error the xml document is poorly formed
when it was not please let me know how.

Sorry for the lack of detail but UPS is FULL OF Lawyers and I don't want to
violate the license agreement.

Another question, are there any characters that would break the
CurlOPT_POSTFIELDS operation.  I think some characters in the input they are
requesting back may be causing the failure.

Thanks,

Daryl


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



[PHP] Curl

2003-06-30 Thread Daryl Meese
Is there any good way to see exactly what Curl is sending as a request?

Daryl

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



RE: [PHP] Passing form value into another form value?

2003-06-30 Thread Miranda, Joel Louie M
Hello,

My script is working now. I tried a different approach


--
Louie

-Original Message-
From: Miranda, Joel Louie M 
Sent: Monday, June 30, 2003 1:49 PM
To: 'Leif K-Brooks'
Cc: 'Tom Rogers'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Passing form value into another form value?


Dude,

As far as my first email is concerned im a newbie, so please bear w/ me if
you want to.


--
Louie

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 30, 2003 1:32 PM
To: Miranda, Joel Louie M
Cc: 'Tom Rogers'; '[EMAIL PROTECTED]'
Subject: Re: [PHP] Passing form value into another form value?


Miranda, Joel Louie M wrote:

This is what I have made, im not sure if its correct.

---
form action method=GET name=
enter name: input type=text name=namebr
enter email: input type=text name=email
?php
$value_name = $_post['name']
$value_email = $_post['email']
?
brbr
input type=submit value=Collect Data
/form
---

Believe it or not, creating a variable called $value_* isn't going to 
magically set an input box's value.  Did you even read the example?!

-- 
The above message is encrypted with double rot13 encoding.  Any unauthorized
attempt to decrypt it will be prosecuted to the full extent of the law.



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



[PHP] Using Different Fonts on Web Via generated Image

2003-06-30 Thread Miranda, Joel Louie M
Hello,

Can I generate an image using a different font? For example my font will be
Anonymous and we all know that on the client side if you don't have the
anonymous font it will display another font. But can we generate an image
using that font via php?

Thanks



--
Louie

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



RE: [PHP] Using Different Fonts on Web Via generated Image

2003-06-30 Thread Sævar Öfjörð
Try this:
http://is2.php.net/manual/en/function.imagettftext.php


-Original Message-
From: Miranda, Joel Louie M [mailto:[EMAIL PROTECTED] 
Sent: 30. júní 2003 07:41
To: '[EMAIL PROTECTED]'
Subject: [PHP] Using Different Fonts on Web Via generated Image

Hello,

Can I generate an image using a different font? For example my font will
be
Anonymous and we all know that on the client side if you don't have the
anonymous font it will display another font. But can we generate an
image
using that font via php?

Thanks



--
Louie

-- 
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: Re[2]: [PHP] File Uploads!

2003-06-30 Thread Jason Wong
On Monday 30 June 2003 07:06, Catalin Trifu wrote:

 I used MAX_FILE_SIZE too in the form which
 uploads the file (the input field is before the file field)
 and I am using IE6 for testing and still the file pass through to
 the server.

  *IF* the browser supports it then IT would stop the upload of files
  larger than MAX_FILE_SIZE.

It would only work IF the browser supported it. The fact that it didn't work 
(ie didn't prevent the upload) would suggest that IE doesn't support it?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
zeal, n.:
Quality seen in new graduates -- if you're quick.
*/


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



[PHP] which GD

2003-06-30 Thread Andrew McCombe
Hi

My hosting company has disabled phpinfo().  How can I find out which version
of GD they have installed?



Regards
Andrew McCombe



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



Re: [PHP] which GD

2003-06-30 Thread - Edwin -
Hi,

Andrew McCombe [EMAIL PROTECTED] wrote:

 Hi
 
 My hosting company has disabled phpinfo().  How can I find out which version
 of GD they have installed?
 

http://www.php.net/manual/en/function.gd-info.php ?

Or, you could just ask them ;)

- E -


__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/


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



[PHP] Licenses -- was Re: [PHP][PHP-DEV][PHP-QA] PHP 5.0.0 Beta 1

2003-06-30 Thread Joel Rees
 Hello,
 
 On 06/29/2003 04:16 PM, Sascha Schumann wrote:
   - Due to issues surrounding the MySQL 4.0 license, the MySQL libraries
 are no longer bundled with PHP.  For more information on these
 licensing changes please see the MySQL licensing policy [1]
 
 [1] http://www.mysql.com/products/licensing.html
 
 I read the licensing information in the above link, but I'm curious what
 exactly in it necessitated the need to unbundle MySQL? Anyone have a
 quick answer?
  
  
  Note that the bundled library code was removed due to being
  unmaintained.  The old bundled library code was in the public
  domain and thus not subject to the GPL.  Only the MySQL 4
  library is GPLed; the MySQL 3 library is not.
  
  It is unfortunate that some people try to confuse the public
  about this topic.

Well, in this particular case, the confusion may not be incorrect. (So
to speak.)

 Many people think that all Open Source software has a GPL license. I 
 guess it is that old Lenine say, if you repeat the same lie many times, 
 it becomes the truth, that today is known as propaganda. Credits for 
 this Open Source lie should go to RMS.

I'd lay the blame elsewhere. 

Stallman's writings are fairly direct and concise. He has helped clarify
the semantics of free, and he has contrasted the sort of freedom he
expounds with other concepts of freedom and openness. Whether you agree
with him or not, his arguments and ideas are useful in both intellectual
and business senses.

You don't have to agree with people to learn from them, and you don't
even have to agree with people to let them do their work, in general.

The FUD comes from other sources.

 Anyway, MySQL 3 library seems to work perfectly to connect to MySQL 4 
 servers. What are MySQL 4 client library advantages?

It's the maintenance issue.

 Anyone thought of keep the bundle of MySQL 3 library? Was there a 
 problem, or is this unbundling initiative a sort of protest to make 
 MySQL AB reconsider MySQL 4 client library licensing?

There was a long thread (more than one, in fact) on this subject on the
postgresql list(s), which referenced a thread on the php-dev list:

http://marc.theaimsgroup.com/?l=postgresql-generalm=105631920423234w=2
http://marc.theaimsgroup.com/?l=php-devm=105621207500778w=2

Of course, the issue of the license the driver falls under is mostly one
of convenience, at least for the application programmer and end-user, I
think. It doesn't really alter the legal status of most projects using
MySQL and PHP (when the parts are assembled correctly), nor does it
alter the moral/enlightened-self-interest obligations to pass some of
the action back to the producers of free/open tools that help one make
money.

For MySQL AB, it will likely mean taking a slip in market share, since
they lose their favored status in the PHP community. From what I've
seen, Monty's a fairly sharp guy. For all I know, this may be a
deliberate move to level the playing field and let the free/open source
community get a broader view of some of the alternatives to the DB
software sold by the primary source of the FUD.

(my JPY 2)

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


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



[PHP] Re: [PEAR-DEV] Re: [PHP] PHP 5.0.0 Beta 1

2003-06-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-29 14:53:40 -0400:
 On Sun, 2003-06-29 at 14:19, Sterling Hughes wrote:
 
- Due to issues surrounding the MySQL 4.0 license, the MySQL libraries
  are no longer bundled with PHP.  For more information on these
  licensing changes please see the MySQL licensing policy [1]
 
  [1] http://www.mysql.com/products/licensing.html
 
 I read the licensing information in the above link, but I'm curious what
 exactly in it necessitated the need to unbundle MySQL? Anyone have a
 quick answer?

1. Free use for those who are 100% GPL

IOW, it's not free for PHP

2. Free use for those who never copy, modify or distribute

IOW, it's not free for PHP

3. GPL would infect the whole PHP tree

http://www.gnu.org/copyleft/gpl.html

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.see http://www.eyrie.org./~eagle/faqs/questions.html

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



[PHP] PHP Sessions and Cookies

2003-06-30 Thread Matt MacLeod
Guys/Gals,
I've built a registration page on a site that stores a unique id for a 
user when they register. That id is then stored in a database and set as 
a session variable and as a cookie and is used to register personal user 
preferences.

The reason I use both is that I don't really want to make people log in 
everytime they revisit the site. I use the session so that people who 
have cookies turned off can still benefit from the personalisation. The 
cookie is used so that when a user revisits the site, they don't have to 
log in again.

I then have a script that I call in every page that checks for the 
session variable and the cookie. I have been testing the script using

echo $_SESSION['usr']; and
echo $_COOKIE['usr'];
and I get correct values for both. Unfortunately if I then close the 
browser, reopen it and visit the site, both the cookie and the session 
produce no values. Obviously, the session value should be blank, but the 
cookie should produce a value.

This is my 'global' cookie/session checker script:

?php
session_start();
// CHECK IF SESSION EXISTS.
if (!isset($_SESSION['usr'])) {
// IF NO, THEN CHECK FOR COOKIE
   if (isset($_COOKIE['usr'])) {
// IF 'YES' THEN START SESSION
   $_SESSION['usr'] = $_COOKIE['usr'];
   }
  
// IF 'YES' THEN QUIT   
   }
   else {
   // IF THE SESSION EXISTS, MAKE SURE [EMAIL PROTECTED] VALUE MATCHES THAT OF THE 
COOKIE
   setcookie(usr, $_SESSION['usr'], 
mktime(21,00,0,12,31,2014),/,bigbarn0.kbnet.net, 0);
// END
}

?

If anyone can point out an error, please do!

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


[PHP] How do I use $HTTP_*_VARS[]

2003-06-30 Thread Ivan Carey
Hello,
I would like to be able to use $HTTP_*_VARS[].

When I was using  PHP 4.0.4PL1 I had no provlems sending form variables or
any other type of variables such as url variables from one page to another.
Now with PHP 4.2.3 I am unable to send variables from one page to another
unless I turn on register_globals.

How do I use $HTTP_*_VARS[] without a lot of recoding of all pages or do I
simply leave register_globals on.
Or is ther another way?

Thankyou,
Ivan


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



[PHP] Re: How do I use $HTTP_*_VARS[]

2003-06-30 Thread Catalin Trifu
   Hi,

I presume in the previous version you used register_globals=On
the trick is that you will have to chenge most of the scripts now.
Now that you have moved to 4.2.3 version,
you should use the $_SERVER, $_REQUEST, $_POST, etc...
variables instead of $HTTP_*_VARS
Btw. It's agood idea to leave register_globals off.

Cheers,
Catalin

Ivan Carey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,
 I would like to be able to use $HTTP_*_VARS[].

 When I was using  PHP 4.0.4PL1 I had no provlems sending form variables or
 any other type of variables such as url variables from one page to
another.
 Now with PHP 4.2.3 I am unable to send variables from one page to another
 unless I turn on register_globals.

 How do I use $HTTP_*_VARS[] without a lot of recoding of all pages or do I
 simply leave register_globals on.
 Or is ther another way?

 Thankyou,
 Ivan




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



[PHP] Help needed

2003-06-30 Thread Nirmala P
Hi list,
This time i am pasting my code could any body tell where wrong I 
am ?

?
  function LangItem($field,$lang)
  {
   $db = mysql_connect(localhost, root);
   /*Check For Connection to local host*/
   if(!$db) echo(Connect to localhost mysql database failed);

   if(!mysql_select_db(eshop,$db)) echo (Selection of eshop 
failed on MySQL database);

   $Sql = SELECT  . $field . FROM language where LangCode = 
.'.$lang.';

   $result = mysql_query($Sql,$db);

   if($result)
   {
 $myrow = mysql_fetch_array($result);
 $value = $myrow[$field];
   }
   else echo (h1 No Record Found/h1);
   return($value);
  }
?
script language=JavaScript
  FieldName = Material;
  LangName = E;
  alert(? LangItem(FieldName,LangName)?);
/script
Loking for help..
Nirmala
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Help needed

2003-06-30 Thread Pete Morganic
Nirmala P wrote:
Hi list,
This time i am pasting my code could any body tell where wrong I am ?
?
  function LangItem($field,$lang)
  {
   $db = mysql_connect(localhost, root);
   /*Check For Connection to local host*/
   if(!$db) echo(Connect to localhost mysql database failed);

   if(!mysql_select_db(eshop,$db)) echo (Selection of eshop failed on 
MySQL database);

   $Sql = SELECT  . $field . FROM language where LangCode = 
.'.$lang.';

   $result = mysql_query($Sql,$db);

   if($result)
   {
 $myrow = mysql_fetch_array($result);
 $value = $myrow[$field];
// return valus
return($value);
   }
   else echo (h1 No Record Found/h1);
   
  }
?

script language=JavaScript
  FieldName = Material;
  LangName = E;
// included in quotes and php tag

  alert('?php LangItem(FieldName,LangName)?');

/script

Loking for help..
Nirmala
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com


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


[PHP] please help

2003-06-30 Thread Nabil
I have a form like:

select size=1 name=area
.
.
while($row = mysql_fetch_array($result))
{
?
option value=?=$row['area']??=$row['area']?/option
?
.
.

1- if the fetched is only one word, i have no problem BUT
2- When i have $row=['area']  ecual to happy day  that came form MySQL (as
two word with a space).
3- I have a problem when submit the form , if i echo $_POST['area']  in the
action file .. i got only happy  without day

Please help me , because i m going to pull my hair off...

Nabil



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



[PHP] Re: please help

2003-06-30 Thread Shivanischal A
option value=?=$row['area']??=$row['area']?/option

is the culprit. instead use

option value=?=$row['area']??=$row['area']?/option

what u missed were the double quotes around the value. u HAVE TO do that for
values with space in between .

regards,
-shiva




Nabil [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have a form like:

 select size=1 name=area
 .
 .
 while($row = mysql_fetch_array($result))
 {
 ?
 option value=?=$row['area']??=$row['area']?/option
 ?
 .
 .

 1- if the fetched is only one word, i have no problem BUT
 2- When i have $row=['area']  ecual to happy day  that came form MySQL
(as
 two word with a space).
 3- I have a problem when submit the form , if i echo $_POST['area']  in
the
 action file .. i got only happy  without day

 Please help me , because i m going to pull my hair off...

 Nabil





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



[PHP] Re: File Uploads!

2003-06-30 Thread Catalin Trifu
Hi,

In case someone is interested I found the workaround.
1. IE6 does not take into consideration MAX_FILE_SIZE,
so one can not rely on it on client side.
2. If the uploaded file exceeds the post_max_size, the PHP
engine (4.3.1 in my case) does not give you any error in the PHP
script which handles the upload, nor does it take into consideration
MAX_FILE_SIZE. It simply logs the error as shown and does
not even parse the post data anymore.
So, the workaround is to make the post_max_size large enough
so that it fits, like 100MB and the PHP will take into consideration
the MAX_FILE_SIZE, discard the upload and give you the
$_FILES['userfile']['error'] = UPLOAD_ERR_FORM_SIZE
I for one consider this a flaw in the engine.
Anyway, hope this helps,

Catalin

Catalin Trifu [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 This is the error I get in the log file:
 [error] PHP Warning:  POST Content-Length of 11184886 bytes exceeds the
 limit of 8388608 bytes in Unknown on line 0

 This is absolutely correct. The problem is
 this error does not reach my PHP script and I
 have no idea how can I tell my user he posted
 a file which exceds the size.
 The $_FILES is empty, same for $HTTP_...
 Any idea is appreciated.

 Cheers,
 Catalin





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



Re: [PHP] Re: Help needed

2003-06-30 Thread Nirmala P
Hi Pete Morganic ,
Thanks for reply. But the code is not solving my problem. May be I 
did not epress my problem clearly.
Actually I wanted to store the returned value so that I can write 
it on page like
{ test = ?php LangItem(FieldName,LangName)?');
 document.write(test);
}
and moreover the value I am passing is  material  and E is not 
getting parsed to PHP function. PHP function input for $field and 
$lang  will be FieldName and LangName only.

looking for help
regards
Nirmala P.
On Mon, 30 Jun 2003 Pete Morganic wrote :
Nirmala P wrote:
Hi list,
This time i am pasting my code could any body tell where wrong I 
am ?

?
  function LangItem($field,$lang)
  {
   $db = mysql_connect(localhost, root);
   /*Check For Connection to local host*/
   if(!$db) echo(Connect to localhost mysql database 
failed);

   if(!mysql_select_db(eshop,$db)) echo (Selection of eshop 
failed on MySQL database);

   $Sql = SELECT  . $field . FROM language where LangCode = 
.'.$lang.';

   $result = mysql_query($Sql,$db);

   if($result)
   {
 $myrow = mysql_fetch_array($result);
 $value = $myrow[$field];
// return valus
return($value);
   }
   else echo (h1 No Record Found/h1);
 }
?
script language=JavaScript
  FieldName = Material;
  LangName = E;
// included in quotes and php tag

  alert('?php LangItem(FieldName,LangName)?');

/script

Loking for help..
Nirmala
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com


-- PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Help needed

2003-06-30 Thread Pete Morganic
Where does thejavascript fit ?

Nirmala P wrote:
Hi Pete Morganic ,
Thanks for reply. But the code is not solving my problem. May be I did 
not epress my problem clearly.
Actually I wanted to store the returned value so that I can write it on 
page like
{ test = ?php LangItem(FieldName,LangName)?');
 document.write(test);
}
and moreover the value I am passing is  material  and E is not 
getting parsed to PHP function. PHP function input for $field and $lang  
will be FieldName and LangName only.

looking for help
regards
Nirmala P.
On Mon, 30 Jun 2003 Pete Morganic wrote :

Nirmala P wrote:

Hi list,
This time i am pasting my code could any body tell where wrong I am ?
?
  function LangItem($field,$lang)
  {
   $db = mysql_connect(localhost, root);
   /*Check For Connection to local host*/
   if(!$db) echo(Connect to localhost mysql database failed);

   if(!mysql_select_db(eshop,$db)) echo (Selection of eshop failed 
on MySQL database);

   $Sql = SELECT  . $field . FROM language where LangCode = 
.'.$lang.';

   $result = mysql_query($Sql,$db);

   if($result)
   {
 $myrow = mysql_fetch_array($result);
 $value = $myrow[$field];
// return valus
return($value);
   }
   else echo (h1 No Record Found/h1);
 }
?
script language=JavaScript
  FieldName = Material;
  LangName = E;
// included in quotes and php tag

  alert('?php LangItem(FieldName,LangName)?');


/script

Loking for help..
Nirmala
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com


-- PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com


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


[PHP] preg_match?

2003-06-30 Thread Brian S. Drexler
Ok, here is my problem.  I have a Postscript file that looks something like
this:

%!PS-Adobe-3.0
%%Title: Q-111BSD
%%Creator: Windows NT 4.0
%%CreationDate: 8:31 6/30/2003
%%Pages: (atend) .

And I want to get the Q-111BSD into a variable but I can't figure out how to
keep it from grabbing the next line as well.  Does anyone have any idea how
I can do this?  Thanks in advance!

Brian


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



RE: [PHP] preg_match? [SOLVED]

2003-06-30 Thread Brian S. Drexler
Sorry.  Must be Monday or something :-)

preg_match('/%%Title:(.*?)%%/i',$contents,$matches);



-Original Message-
From: Brian S. Drexler [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 8:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] preg_match?


Ok, here is my problem.  I have a Postscript file that looks something like
this:

%!PS-Adobe-3.0
%%Title: Q-111BSD
%%Creator: Windows NT 4.0
%%CreationDate: 8:31 6/30/2003
%%Pages: (atend) .

And I want to get the Q-111BSD into a variable but I can't figure out how to
keep it from grabbing the next line as well.  Does anyone have any idea how
I can do this?  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] preg_match? [SOLVED]

2003-06-30 Thread Adam Voigt
Sounds like someone has a case of the Monday's.


On Mon, 2003-06-30 at 08:40, Brian S. Drexler wrote:
 Sorry.  Must be Monday or something :-)
 
 preg_match('/%%Title:(.*?)%%/i',$contents,$matches);
 
 
 
 -Original Message-
 From: Brian S. Drexler [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 30, 2003 8:35 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] preg_match?
 
 
 Ok, here is my problem.  I have a Postscript file that looks something like
 this:
 
 %!PS-Adobe-3.0
 %%Title: Q-111BSD
 %%Creator: Windows NT 4.0
 %%CreationDate: 8:31 6/30/2003
 %%Pages: (atend) .
 
 And I want to get the Q-111BSD into a variable but I can't figure out how to
 keep it from grabbing the next line as well.  Does anyone have any idea how
 I can do this?  Thanks in advance!
 
 Brian
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP] time calcs

2003-06-30 Thread Wendell Brown
On Mon, 30 Jun 2003 07:31:59 -0500, Wendell Brown wrote:

On Sun, 29 Jun 2003 15:19:56 -0400, Larry R. Sieting wrote:

I want to output the difference as a difference expressed in time 
format:  10:05:23 - 09:45:32 = 00:39:51

Try this:

?PHP

$tot_time = ($data['end_time'] - $data['start_time']);

echo strftime( %H:%M:%S, $end_time ) .  - ;
echo strftime( %H:%M:%S, $start_time ) .  = ;
echo gmstrftime( %H:%M:%S, $tot_time );

?

E I used the wrong variables in the previous message.  I also
assumed that the start and end times are actually TIME and not strings
(which appears to be the case since you are subtracting one from the
other).  If the start and end AREN'T time types you would have to
convert them first.  You should be able to use 'strtotime' or mktime to
convert them to time type.

Also, the gmstrtime used above would limit the time to 24 hours.  If
there is a possibility that the difference in time might be more than
24 hours you can do something like this:

  printf( %d days %s,  (int)($tot_time / 86400),   gmstrftime(
%H:%M:%S, $tot_time ) );

So, here is what I probably should have posted:

?PHP

$tot_time = ($data['end_time'] - $data['start_time']);

echo strftime( %H:%M:%S, $data['end_time'] ) .  - ;
echo strftime( %H:%M:%S, $data['start_time'] ) .  = ;
printf( %d days %s,  (int)($tot_time / 86400),   
gmstrftime( %H:%M:%S, $tot_time ) );

?



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



[PHP] Else If/Elseif

2003-06-30 Thread Stevie Peele
What is the difference between else if and elseif?

Thanks

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: [PHP] Else If/Elseif

2003-06-30 Thread Mario Oberrauch
 What is the difference between else if and elseif?
 
 
 Thanks

quote of http://www.php.net/manual/en/control-structures.elseif.php

In PHP, you can also write 'else if' (in two words) and the behavior
would be identical to the one of 'elseif' (in a single word). The
syntactic meaning is slightly different (if you're familiar with C, this
is the same behavior) but the bottom line is that both would result in
exactly the same behavior.

therefore: a space :o)

-- 
Mario Oberrauch

---
CREATO - creative online systems - Spindler KEG
Hafenstrasse 47 - 51, 4020 Linz, Austria
Tel:  +43 (0) 732/9015 5940
Fax:  +43 (0) 732/9015 5949
Email:[EMAIL PROTECTED]
---


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



Re: [PHP] Else If/Elseif

2003-06-30 Thread Reuben D. Budiardja
On Monday 30 June 2003 09:30 am, Stevie Peele wrote:
 What is the difference between else if and elseif?

none

-RDB

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



[PHP] Re: Else If/Elseif

2003-06-30 Thread Tularis
Stevie Peele wrote:
What is the difference between else if and elseif?

Thanks

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

else if shouldn't be used, use elseif, and the difference is non-existant

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


Re: [PHP] Else If/Elseif

2003-06-30 Thread Brian V Bonini
On Mon, 2003-06-30 at 09:30, Stevie Peele wrote:
 What is the difference between else if and elseif?
 
 

chr(32).. bwahahahah!!! Sorry. couldn't resist


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



[PHP] Forms

2003-06-30 Thread Simon Chappell
Hi can anyone help me with this?

I have been failing to get any forms working with PHP now I have run out of 
ideas? Having bought 3 books the latest one being php  mysql for 
dummies(which might be appropriate for me) I am still failing at this hurdle.

the following script is a classic example taken straight out of the book, I 
get round the $PHP_SELF problem ok but then all the script does is loop back 
to itself? 

!-- Program Name:  mysql_send.php
 Description: PHP program that sends an SQL query to the
  MySQL server and displays the results.
--
html
head
titleSQL Query Sender/title
/head
body
?php
 $user=root;
 $host=localhost;
 $password=;

 /* Section that executes query */
 if (@$form == yes)
 {
   mysql_connect($host,$user,$password);
   mysql_select_db($database);
   $query = stripSlashes($query) ;
   $result = mysql_query($query);
   echo Database Selected: b$database/bbr
  Query: b$query/b
  h3Results/h3
  hr;
   if ($result == 0)
  echo(bError  . mysql_errno() . :  . mysql_error() . /b);

   elseif (@mysql_num_rows($result) == 0)
  echo(bQuery completed. No results returned./bbr);
   else
   {
 echo table border='1'
   thead
tr;
 for ($i = 0; $i  mysql_num_fields($result); $i++) 
 {
 echo(th . mysql_field_name($result,$i) . /th);
 }
 echo  /tr
   /thead
   tbody;
 for ($i = 0; $i  mysql_num_rows($result); $i++)
 {
echo tr;
$row = mysql_fetch_row($result);
for ($j = 0; $j  mysql_num_fields($result); $j++)
{
  echo(td . $row[$j] . /td);
}
echo /tr;
 }
 echo /tbody
  /table;
   }
   echo hrbr
 form action=$PHP_SELF method=post
  input type=hidden name=query value=\$query\
  input type=hidden name=database value=$database
  input type=submit name=\queryButton\ value=\New Query\
  input type=submit name=\queryButton\ value=\Edit Query\
 /form;
   unset($form);
   exit();
 }

 /* Section that requests user input of query */
 @$query = stripSlashes($query);
 if (@$queryButton != Edit Query)
 {
   $database =  ;
   $query =  ;
 }
?

form action=?php echo $PHP_SELF ??form=yes method=post
 table
  tr
   td align=rightbType in database name/b/td
   td
 input type=text name=database value=?php echo $database ? 
   /td
  /tr
  tr
   td align=right valign=topbType in SQL query/b/td
 tdtextarea name=query cols=60 rows=10?php echo $query 
?/textarea
   /td
  /tr
  tr
   td colspan=2 align=centerinput type=submit value=Submit 
Query/td
  /tr
 /table
/form
 
/body
/html

Any ideas would be greatly appreciated as I am floundering badly!

Simon


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



Re: [PHP] Re: Else If/Elseif

2003-06-30 Thread Reuben D. Budiardja
On Monday 30 June 2003 09:41 am, Tularis wrote:
 Stevie Peele wrote:
  What is the difference between else if and elseif?
 
 
  Thanks
 
  _
  STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
  http://join.msn.com/?page=features/junkmail

 else if shouldn't be used, use elseif, and the difference is non-existant

why not? If there's no difference, there is no difference. Meaning you can use 
one or the other. It's user preference. 

RDB


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



Re: [PHP] Forms

2003-06-30 Thread Petre Agenbag
Have you checked register_globals = on/off in your php.ini?
If register_globals=off, then you must access your POST variables by:

$_POST['whatever'];

and your get (the stuff you put at the end of your URL's):

$_GET['whatever'];


On Mon, 2003-06-30 at 15:48, Simon Chappell wrote:
 Hi can anyone help me with this?
 
 I have been failing to get any forms working with PHP now I have run out of 
 ideas? Having bought 3 books the latest one being php  mysql for 
 dummies(which might be appropriate for me) I am still failing at this hurdle.
 
 the following script is a classic example taken straight out of the book, I 
 get round the $PHP_SELF problem ok but then all the script does is loop back 
 to itself? 
 
 !-- Program Name:  mysql_send.php
  Description: PHP program that sends an SQL query to the
   MySQL server and displays the results.
 --
 html
 head
 titleSQL Query Sender/title
 /head
 body
 ?php
  $user=root;
  $host=localhost;
  $password=;
 
  /* Section that executes query */
  if (@$form == yes)
  {
mysql_connect($host,$user,$password);
mysql_select_db($database);
$query = stripSlashes($query) ;
$result = mysql_query($query);
echo Database Selected: b$database/bbr
   Query: b$query/b
   h3Results/h3
   hr;
if ($result == 0)
   echo(bError  . mysql_errno() . :  . mysql_error() . /b);
 
elseif (@mysql_num_rows($result) == 0)
   echo(bQuery completed. No results returned./bbr);
else
{
  echo table border='1'
thead
 tr;
  for ($i = 0; $i  mysql_num_fields($result); $i++) 
  {
  echo(th . mysql_field_name($result,$i) . /th);
  }
  echo  /tr
/thead
tbody;
  for ($i = 0; $i  mysql_num_rows($result); $i++)
  {
 echo tr;
 $row = mysql_fetch_row($result);
 for ($j = 0; $j  mysql_num_fields($result); $j++)
 {
   echo(td . $row[$j] . /td);
 }
 echo /tr;
  }
  echo /tbody
   /table;
}
echo hrbr
  form action=$PHP_SELF method=post
   input type=hidden name=query value=\$query\
   input type=hidden name=database value=$database
   input type=submit name=\queryButton\ value=\New Query\
   input type=submit name=\queryButton\ value=\Edit Query\
  /form;
unset($form);
exit();
  }
 
  /* Section that requests user input of query */
  @$query = stripSlashes($query);
  if (@$queryButton != Edit Query)
  {
$database =  ;
$query =  ;
  }
 ?
 
 form action=?php echo $PHP_SELF ??form=yes method=post
  table
   tr
td align=rightbType in database name/b/td
td
  input type=text name=database value=?php echo $database ? 
/td
   /tr
   tr
td align=right valign=topbType in SQL query/b/td
tdtextarea name=query cols=60 rows=10?php echo $query 
 ?/textarea
/td
   /tr
   tr
td colspan=2 align=centerinput type=submit value=Submit 
 Query/td
   /tr
  /table
 /form
  
 /body
 /html
 
 Any ideas would be greatly appreciated as I am floundering badly!
 
 Simon
 


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



[PHP] Re: IsSet() and $_SESSION

2003-06-30 Thread John Manko
None of these worked for me.  ok, if you look at the code, the part 
where echo $_SESSION['uid']; is actually works.
I get a print out of the variable.  if i call session_start() before 
anything, set variables in $_SESSION, and check it on another page, the 
session variables do not exist.  in fact, the session isnt even started, 
cause I get an Undefined variable _SESSION.  so, it looks like the 
session is not spamming page requests.  Do I have to call 
session_start() on every page to read the $_SESSION variables set in 
another?

Shivanischal A wrote:

John,

I can think of 3 problems...
1. I'm not sure, but try inserting a 'session_start()' in file.php
2. in ur validateadminlogin() method, the mysql_close() never seems to get
called.
3. try $_SESSION['uid'] . use ' instead of .  seema to cause problems in
some cases.
best of luck,
-shiva
- Original Message -
From: John Manko [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Monday, June 30, 2003 6:49 AM
Subject: IsSet() and $_SESSION
 

I'm having a problem with the value that isset returns on $_SESSION
variables.  For some reason, even if $_SESSION['uid'] is set, isset
returns FALSE.  Here is the code:
-- file1.php ---
include file2.php;
if (!isset($_SESSION[uid])) {
// This first time $_SESSION[uid] is check, we should
// end up in here.  However, ValidAdminLogin (next test)
// will set $_SESSION[uid] so next time we will not
// get here.
if ( !ValidAdminLogin($_POST[adminid],$_POST[adminpass]))
forceadminlogin();
} elseif ( !ValidAdminSession() )
forceadminlogin();
// this is done to show that $_SESSION[uid] is being set
// but isset still returns false
echo $_SESSION[uid];
-- file2.php ---
function ValidAdminLogin($user, $pass){
global $_SESSION;

if (The_MYSQL_Stuff_Is_NOT_OK) return false;
else
{
 session_start();
 $_SESSION[logged] = true;
 $_SESSION[username] = $user;
 $_SESSION[adminlogin] = true;
 $_SESSION[fname] = $fname;
 $_SESSION[lname] = $lname;
 $_SESSION[email] = $email;
 $_SESSION[uid] = session_id();
  return true;
}
mysql_close();

}



   



DISCLAIMER: This email is bound by the terms and conditions described at 
http://www.subexgroup.com/mail-disclaimer.htm



 



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


RE: [PHP] Re: IsSet() and $_SESSION

2003-06-30 Thread Ford, Mike [LSS]
 -Original Message-
 From: John Manko [mailto:[EMAIL PROTECTED]
 Sent: 30 June 2003 15:14
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: IsSet() and $_SESSION
 
 
 None of these worked for me.  ok, if you look at the code, the part 
 where echo $_SESSION['uid']; is actually works.
 I get a print out of the variable.  if i call session_start() before 
 anything, set variables in $_SESSION, and check it on another 
 page, the 
 session variables do not exist.  in fact, the session isnt 
 even started, 
 cause I get an Undefined variable _SESSION.  so, it looks like the 
 session is not spamming page requests.  Do I have to call 
 session_start() on every page to read the $_SESSION variables set in 
 another?

Yes.  Every page that needs access to the session variables must call session_start(). 
 That's what it means on http://www.php.net/session-start when it says creates a 
session or resumes the current one.

In practice, this means every page, as even if you don't access any session variables 
you may still need the session ID in order to pass it along to the next page (even if 
only implicitly via session.use_trans_sid).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Curl

2003-06-30 Thread Daryl Meese
Well, I have printed the variable but, I thinks some character in my post
may be messing things up.  So, while I know the variable I need to see if
that is actually what is sent.

Daryl

-Original Message-
From: Suhas Pharkute [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 8:29 AM
To: Daryl Meese
Subject: Re: [PHP] Curl


You can form the url forst in a variable echo it for testing
and then u can send variable to curl
Suhas

- Original Message -
From: Daryl Meese [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 30, 2003 1:32 AM
Subject: [PHP] Curl


 Is there any good way to see exactly what Curl is sending as a request?

 Daryl

 --
 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] web site security: how to hide login info for mysql-connection

2003-06-30 Thread Mark
How do you handle storing the login info then? Do you encrypt the
file and decrypt it on the fly? Where would you store the key? I'm in
the process of setting up a new application, and I've always used the
login info outside the webroot method but if there's something more
I can do, I'd like to know...


--- Jaap van Ganswijk [EMAIL PROTECTED] wrote:
 At 2003-06-29 17:21 +0100, Avvio - Frank wrote:
 basically you need to append to your include_path and you can
 probably
 create a local .htaccess file and set an include path in there
 (look up
 php_value syntax for .htaccess)
 
 otherwise start your script with a customised version of the
 following:
 
 ini_set(include_path,ini_get(include_path).:.
 /your/path/here/);
 
 then include/require as normal
 
 I think you can also use an include statement
 like this:
 include ../../php/include/file.inc;
 
 The same mechanism can also be used for data
 files that also shouldn't be in the WWW accessible
 directory tree, I think. (But I'm not an expert.)
 
 I always try to write my programs very portable
 and I have found that using ../application_data/file.txt
 isn't a problem, but using ../../xxx/application_data/file.txt
 is usually a problem, because you don't want to
 hardcode the name of the directory above the current
 directory (in this case 'xxx'). Sometimes however
 you have to go two levels up to go out of the
 WWW-acessable directory three.
 
 By the way, I think it's unwise to keep the MySQL
 login data uncoded on the Unix system, because
 other users or the system managers could read it.
 Generally these files have to be readable by Apache
 and therefore other users on the system can often
 also read them.
 
 Greetings,
 Jaap
 
 
 - Original Message - 
 From: anders thoresson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, June 29, 2003 4:33 PM
 Subject: Re: [PHP] web site security: how to hide login info for
 mysql-connection
 
 
   Be aware that wherever you store the settings folder, your
 php.ini
 should
   have that path in it's include_directories setting, and the
 webserver
   must
   have read permissions for that file.
 
   I don't have access to php.ini on my ISP's web server. Is there
 a way for
  a user to make their own set ow include_directories?
 
  -- 
  anders thoresson
 
  -- 
  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
 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a right unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



php-general Digest 30 Jun 2003 14:34:21 -0000 Issue 2148

2003-06-30 Thread php-general-digest-help

php-general Digest 30 Jun 2003 14:34:21 - Issue 2148

Topics (messages 153356 through 153411):

Re: A simpler question involving http_user_agent
153356 by: Mike Migurski
153357 by: - Edwin -

Re: File Uploads!
153358 by: Tom Rogers
153382 by: Jason Wong
153392 by: Catalin Trifu

Re: php.net's custom 404 scripts
153359 by: - Edwin -
153361 by: David Otton
153374 by: olinux

Re: Japanese text not displaying correctly.
153360 by: - Edwin -

Re: Full Text Search of M$ Office Documents
153362 by: - Edwin -

Passing form value into another form value?
153363 by: Miranda, Joel Louie M
153364 by: Tom Rogers
153367 by: Miranda, Joel Louie M
153368 by: Leif K-Brooks
153369 by: Miranda, Joel Louie M
153379 by: Miranda, Joel Louie M

Re: PHPSESSID Length?
153365 by: Jason Sheets

Re: Close Connection to Browser
153366 by: Jason Sheets

Re: PHP5 with MySQL on windows
153370 by: John Coggeshall

Help needed
153371 by: Nirmala  P
153372 by: Nirmala  P
153373 by: Haseeb
153388 by: Nirmala  P
153389 by: Pete Morganic
153393 by: Nirmala  P
153394 by: Pete Morganic

Licenses -- was Re: [PHP][PHP-DEV][PHP-QA] PHP 5.0.0 Beta 1
153375 by: Joel Rees

Re: [PEAR-DEV] Re: [PHP] PHP 5.0.0 Beta 1
153376 by: Roman Neuhauser

UPS
153377 by: Daryl Meese

Curl
153378 by: Daryl Meese
153410 by: Daryl Meese

Using Different Fonts on Web Via generated Image
153380 by: Miranda, Joel Louie M
153381 by: Sævar Öfjörð

which GD
153383 by: Andrew McCombe
153384 by: - Edwin -

PHP Sessions and Cookies
153385 by: Matt MacLeod

How do I use $HTTP_*_VARS[]
153386 by: Ivan Carey
153387 by: Catalin Trifu

please help
153390 by: Nabil
153391 by: Shivanischal A

preg_match?
153395 by: Brian S. Drexler

[NEW] XML-PHP Forums
153396 by: sterling.bumblebury.com

Re: preg_match? [SOLVED]
153397 by: Brian S. Drexler
153398 by: Adam Voigt

Re: time calcs
153399 by: Wendell Brown

Else If/Elseif
153400 by: Stevie Peele
153401 by: Mario Oberrauch
153402 by: Reuben D. Budiardja
153403 by: Tularis
153404 by: Brian V Bonini
153406 by: Reuben D. Budiardja

Forms
153405 by: Simon Chappell
153407 by: Petre Agenbag

Re: IsSet() and $_SESSION
153408 by: John Manko
153409 by: Ford, Mike   [LSS]

Re: web site security: how to hide login info for  mysql-connection
153411 by: Mark

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]


--
---BeginMessage---
Would anyone happen to know what http_user_agent would be if the user is
visitng from an internet enabled cell phone (e.g. sprint pcs phone or
similar)?

It may or may not be one of these:
http://www.thewirelessfaq.com/useragents.asp



-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

---End Message---
---BeginMessage---

Brian J. Celenza [EMAIL PROTECTED] wrote:

 Would anyone happen to know what http_user_agent would be if the user is
 visitng from an internet enabled cell phone (e.g. sprint pcs phone or
 similar)?

Try Google or the archives. Maybe this will help:

  http://marc.theaimsgroup.com/?l=php-generalm=104394135908378w=2

Or, better yet, try the cellphone's (company's) site--they should have some info on 
what http_user_agent strings their cellphones are using (mine does)...

- E -


__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

---End Message---
---BeginMessage---
Hi,

Monday, June 30, 2003, 4:14:02 AM, you wrote:
JW On Sunday 29 June 2003 20:40, Tom Rogers wrote:

 Maybe you have to wind up the post_max_size in php.ini and then control
 with MAX_FILE_SIZE in the form for the error to show up in the $_FILES
 array

JW MAX_FILE_SIZE in the form is client-side, for the benefit of the browser. 
JW *IF* the browser supports it then IT would stop the upload of files larger 
JW than MAX_FILE_SIZE.

JW -- 
Jason Wong - Gremlins Associates - www.gremlins.biz
JW Open Source Software Systems Integrators
JW * Web Design  Hosting * Internet  Intranet Applications Development *
JW --
JW Search the list archives before you post
JW http://marc.theaimsgroup.com/?l=php-general
JW --
JW /*
JW The early bird gets the coffee left over from the night before.
JW */

php also checks for 

[PHP] MapPoint and PHP

2003-06-30 Thread Stephane Desmarquest
Hello,

Is it possible to use Microsoft MapPoint Webservice with PHP. If so, any
hint (or tutorial) on how to use it ?

Thanks

Stephane Desmarquest
Vcube Inc.



Re: [PHP] Re: Why Can't I get this to work

2003-06-30 Thread Jeff Harris
On Jun 28, 2003, Ron Clark claimed that:

|OK, normally I do not respond to my own posts, but I have been shown that I
|did not get the whole script. So here it is:
|
|for ($i=0; $i$number_of_alerts; $i++) {
|
|// Split each line
|
|$line = explode( , $ipfwlog[$i]);
|
|$line[1] = intval($line[1]);
|
|$IPFWsql = INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel,
|fw_engine, rule_number, action, protocol, src_ip_port, dst_ip_port,
|direction, via, interface) VALUES ('$line[0]', '$line[1]', '$line[2]',
|'$line[3]', '$line[4]', '$line[5]', '$line[6]','$line[7]', '$line[8]',
|'$line[9]', '$line[10]', '$line[11]', '$line[12]');
|
|$results = mysql_query($IPFWsql) or die (Could not execute query);
|
|}
|Again, any help with this issue is appreciated.

|Thanks,
|
|Ron Clark
|

Could it be the fact that 1) `date` and `time` are reserved mysql keywords
and should be enclosed in back ticks, and 2) you're listing 14 columns
and adding 13 values?

-- 
Registered Linux user #304026.
lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import
Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.



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



[PHP]inheritance

2003-06-30 Thread Yury B .
Hi

I'm with PHP for 4 years now but have feeling that my code doesn't 
have much order. I only started to use functions, it helped me a lot 
but I believe if I would learn to wirk with classes that would be 
what I need. 
The question: 
I have class A, class B, and class C
now class C extends B
that means I can use all variables and functions of class B in class 
C like $this-B();
but what to do if I also need functions and variables of class A in 
class C? Can I do class B extends class A and class C extends 
class B and then to use functions and variables of class A in class 
C like $this-B()-A(); ? 
I think I can't do it this way but still would like to ask it in 
here. 
If I can't do it this way - tell me how can I do it?

Thank you,

Yury

God is our provider 
http://www.body-builders.org/


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



Re: [PHP] Re: Weird comparison error.

2003-06-30 Thread Rob Adams

Lars Torben Wilson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Sat, 2003-06-28 at 11:28, Bobby Patel wrote:
  In PHP there are two operators for comparisons, the double and triple
  equivalance.
 
  Double equivalance just check's the boolean type so if (0 == 'n') is
  translated to if (False == False), where as triple equivalance checks
the
  data types as well so if (0==='n') becomes if
(Int(False)==String(False))
  but since the data types don't match that would be False.
 
  to get a better reference check PHP.net for 'Bolean Types' , because  I
  think I dodn't explain the double equivalance right, and also it will
  clarify situations of the Null type.
 
  Bobby

 You got pretty close, but not quite. :) In the case of the equality
 operator '==', there is nothing specific to do with boolean evaluation
 going on. It just converts the string to its integer value implicitly
 before checking for equality, and according to the string-integer
 conversion rules, the string ends up being (int) 0 so the whole thing
 matches.

 Also, it might be easier to think about the identical operator '===' as
 just testing whether two values are identical, meaning that they are
 both of the same type, and that they both have the same value.


Yeah, I understand the difference between the double and triple '='.  I was
just surprised to find that when comparing what was two string values,
because one of the strings was '0', it decided to convert both strings to an
integer.  I'll just have to use the '===' or strcmp from now on.


 More information:

 http://www.php.net/manual/en/language.types.type-juggling.php

http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion

 ...in fact, the whole 'Language' section of the manual has a bunch of
 stuff on this.


 Hope this helps,

Thanks.


 Torben


  -- Rob




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



[PHP] enable/disable per directory

2003-06-30 Thread Micha Silver
Using apache 1.3.20 and php 4.0.2
Can I enable / disable posting of php scripts per directory?
i.e. no php allowd from /home/username/public_html

TIA

Micha Silver
Arava Development Co.
tel:  (972) 8-6592270
cellular:  (972) 5-3665918


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



Re: [PHP] enable/disable per directory

2003-06-30 Thread Jason Wong
On Tuesday 01 July 2003 00:12, Micha Silver wrote:
 Using apache 1.3.20 and php 4.0.2
 Can I enable / disable posting of php scripts per directory?

Not sure what you mean by 'posting'.

If you really meant execution of php scripts then yes.

 i.e. no php allowd from /home/username/public_html

With a standard Apache setup you have something like:

 IfModule mod_php4.c
   AddType application/x-httpd-php .php4 .php3 .phtml .php .inc
   AddType application/x-httpd-php-source .phps
 /IfModule

in your default server/host section. You just have to remove it and add it 
into the VirtualHost or Directory containers wherever they're needed.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
If God had not given us sticky tape, it would have been necessary to invent 
it.
*/


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



[PHP] PHP and Apache

2003-06-30 Thread Mike At Spy

Recently, I had Apache upgraded on my linux redhat 7.3 server from 1.2.3 to
1.3.27.

PHP stopped working when trying to process html files with php in them.  In
the httpd.conf file, I have AllowOverride set to All.  In the Virtual Host
settings I have 'AddType application/x-httpd-php .html'.

HTML documents, which did process before the upgrade, no longer do.  Does
anyone know of any reason for this?  I've been searching on the web, but
most people go back to the ol' AllowOverride thing, which isn't the issue in
this case.

Thanks,

-Mike



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



[PHP] disabling functions

2003-06-30 Thread Daryl Meese
Can I edit the disabled_functions setting on a per directory bases.

If the answer is yes, what will be the impact on scripts that:

1. are in another directory where the functions are allowed.
and
2. are included into a script in the directory where it is not allowed

will those functions operate when included into the disabled directory
because the directory they are in is enabled?

Daryl


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



Re: [PHP] disabling functions

2003-06-30 Thread Derick Rethans
On Mon, 30 Jun 2003, Daryl Meese wrote:

 Can I edit the disabled_functions setting on a per directory bases.

No, you can not do that. Due to performance reasons it won't be 
implemented either.

Derick

-- 
Interpreting what the GPL actually means is a job best left to those
that read the future by examining animal entrails.
-
 Derick Rethans http://derickrethans.nl/ 
 International PHP Magazine  http://php-mag.net/
-


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



[PHP] Concatenate

2003-06-30 Thread Ryan Vennell
how can i concatenate two strings?  i cant seem to find the function...  thanks :)


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



Re: [PHP] Concatenate

2003-06-30 Thread Derick Rethans
On Mon, 30 Jun 2003, Ryan Vennell wrote:

 how can i concatenate two strings?  i cant seem to find the function...  thanks :)

With .

Derick

-- 
Interpreting what the GPL actually means is a job best left to those
that read the future by examining animal entrails.
-
 Derick Rethans http://derickrethans.nl/ 
 International PHP Magazine  http://php-mag.net/
-


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



Re: [PHP] Concatenate

2003-06-30 Thread Chris Sherwood
you can do it by assigning them to a single string or by adding the second
to the firsst

$youroriginalfirststring .= $thestringyouwanttoadd;
please note the .

Chris
- Original Message -
From: Derick Rethans [EMAIL PROTECTED]
To: Ryan Vennell [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, June 30, 2003 8:32 AM
Subject: Re: [PHP] Concatenate


 On Mon, 30 Jun 2003, Ryan Vennell wrote:

  how can i concatenate two strings?  i cant seem to find the function...
thanks :)

 With .

 Derick

 --
 Interpreting what the GPL actually means is a job best left to those
 that read the future by examining animal entrails.
 -
  Derick Rethans http://derickrethans.nl/
  International PHP Magazine  http://php-mag.net/
 -


 --
 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] disabling functions

2003-06-30 Thread Daryl Meese
Ok, that being said how can I keep some functions available for use with my
scripts and disable their use by others.  Even while allowing the others to
include my scripts into their own and still have the functions operate?

For example, I write a script that calls exec(), my script needs to be able
to run the function, even when my script is included into another users
script who cannot themselves run the function.

My initial thought is that it would be nice if we could declare a security
string in the php.ini file.  If this string is left null (the default) all
functions would operate as normal.  If the string was not blank, then the
user would have to pass that variable into the secured functions as another
argument.  if the security string is set to 1234 then exec(mycommand)
would need to be exec(mycommand, 1234) to work.

It sucks, but we often need to be able to use functions that should be off
limits to others.

Daryl

-Original Message-
From: Derick Rethans [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 10:28 AM
To: Daryl Meese
Cc: Php-General
Subject: Re: [PHP] disabling functions


On Mon, 30 Jun 2003, Daryl Meese wrote:

 Can I edit the disabled_functions setting on a per directory bases.

No, you can not do that. Due to performance reasons it won't be
implemented either.

Derick

--
Interpreting what the GPL actually means is a job best left to those
that read the future by examining animal entrails.
-
 Derick Rethans http://derickrethans.nl/
 International PHP Magazine  http://php-mag.net/
-



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



[PHP] Small Error in Login Script

2003-06-30 Thread Pushpinder Singh Garcha
Hello All,

 I am trying to setup a simple login script on my development server 
running Mac OS Jaguar. I keep getting an error

Parse error: parse error in /Users/psgarcha/Sites/CRM/ADMIN-LOGIN.php 
on line 2. I am at a complete loss !

Here is the source code. Please help.

-

?
session_start();
error_reporting(E_ALL);

if ( (isset($_POST['validuser']))  (isset($_POST['password']))  )  {

  mysql_connect( 'localhost', 'abc', 'pwd' )
 or die ( 'Unable to connect to server.' );
  // Select database on MySQL server
  //  mysql_select_db( 'masterstream' )
   or die ( 'Unable to select database' );
  // Formulate the query

  //  $sql1 = SELECT * from `admin` where `admin`.username = 
$_POST['validuser'] AND `admin`.password = $_POST['password'];

$result1 = mysql_query($sql1)
or die ( 'Database Error has occured.');

$num_results = mysql_num_rows($result1);


if ($num_results == 1 ) {
echo Success!br;
   if(!isset($_SESSION['validuser']))
  $_SESSION['validuser'] = $_POST['validuser'];
}
  else{
echo Please try again laterbr;
  }
  }
?

html
head
titleADMIN-LOGIN/title
/head
?

if (isset($_SESSION['validuser']))
  {
  echo You are already logged into the system !!!;
   }
else {
   echo test;
}
echo 
body bgcolor=\aa\
form name=\form1\ method=\post\ action=\ADMIN-LOGIN.php\
  table width=\713\ height=\132\ border=\1\ cellpadding=\1\ 
cellspacing=\1\ bgcolor=\#FF\
tr
  td width=\787\ height=\119\ table width=\707\ 
border=\1\ cellspacing=\3\ cellpadding=\2\
  tr bgcolor=\99ccff\
td colspan=\2\div align=\center\strongfont 
color=\#FF\ size=\2\ face=\Verdana, Arial, Helvetica, 
sans-serif\Please
enter your Username and Password 
/font/strong/div/td
  /tr
  tr bgcolor=\#E7E7E7\
td width=\214\strongfont color=\#66\ 
size=\1\ face=\Verdana, Arial, Helvetica, 
sans-serif\Login/font/strong/td
td width=\549\font size=\1\
  input name=\validuser\ type=\text\ id=\validuser2\
  /font/td
  /tr
  tr bgcolor=\#E7E7E7\
tdstrongfont color=\#66\ size=\1\ 
face=\Verdana, Arial, Helvetica, 
sans-serif\Password/font/strong/td
tdfont size=\1\
  input name=\password\ type=\password\ 
id=\password\
  /font/td
  /tr
  tr bgcolor=\#E7E7E7\
td height=\24\ colspan=\2\div align=\center\
input type=\submit\ name=\Submit\ value=\Submit\
  /div/td
  /tr
/table/td
/tr
  /table
/form
;
?

/body
/html


Thanks in advance.
Pushpinder


Re: [PHP] Concatenate

2003-06-30 Thread Philip Olson
 how can i concatenate two strings?  i cant seem to find the
 function...  thanks :)

Read this:

 http://www.php.net/manual/en/language.operators.string.php

And then this:

 http://www.php.net/manual/en/language.types.string.php

Regards,
Philip


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



[PHP] Timezone functions?

2003-06-30 Thread Mark McCulligh
I am working on a project that I have to convert the date/time to different
timezone include daylight saving time (DST).  This project will be on a
Windows server for a lot of the functions I have found on PHP.net don't work
right.

I am storing all the dates on the database in GMT time, thus I take the
users input dates and convert them to GMT based on their timezone. Plus
convert from GMT to their timezone.  I would also like a function that can
tell me to offset with DST.  Example; I give it EST it would right now
return -4, not -5 because of DST.

I have looked a the PEAR Date_TimeZone class, it looks good, but there is no
doc or examples on how to use it.

Can someone recommend some good functions to using, that work on a windows
platform.

Thanks, Mark.



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



RE: [PHP] enable/disable per directory

2003-06-30 Thread Micha Silver
Hello Jason:
Thanks for the quick reply...

 -Original Message-
 From: Jason Wong [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 30, 2003 5:21 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] enable/disable per directory
 
 
 On Tuesday 01 July 2003 00:12, Micha Silver wrote:
  Using apache 1.3.20 and php 4.0.2
  Can I enable / disable posting of php scripts per directory?
 
 Not sure what you mean by 'posting'.
 
 If you really meant execution of php scripts then yes.

Yes, I meant executing.

 
  i.e. no php allowd from /home/username/public_html
 
 With a standard Apache setup you have something like:
 
  IfModule mod_php4.c
AddType application/x-httpd-php .php4 .php3 .phtml .php .inc
AddType application/x-httpd-php-source .phps
  /IfModule


So the AddType directive can be in each Directory/Directory section
separately??


Thanks again.


 
 in your default server/host section. You just have to remove 
 it and add it 
 into the VirtualHost or Directory containers wherever 
 they're needed.
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications 
 Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 If God had not given us sticky tape, it would have been 
 necessary to invent 
 it.
 */
 
 
 -- 
 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: Concatenate

2003-06-30 Thread Ryan Vennell
lol, thanks guys.  i'm a complete idiot.  i've already used .= and such like 5 times 
in this very script.  i honestly have no idea what i was thinking.  a total brainfart 
(excuse the expression)

-Ryan



 Ryan Vennell[EMAIL PROTECTED] 06/30/03 10:31AM 
how can i concatenate two strings?  i cant seem to find the function...  thanks :)




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



Re: [PHP] Small Error in Login Script ~~SOLVED

2003-06-30 Thread Pushpinder Singh Garcha
Thanks ...I figured out something myself



--Pushpinder



On Monday, June 30, 2003, at 11:41 AM, Pushpinder Singh Garcha wrote:

Hello All,

 I am trying to setup a simple login script on my development server 
running Mac OS Jaguar. I keep getting an error

Parse error: parse error in /Users/psgarcha/Sites/CRM/ADMIN-LOGIN.php 
on line 2. I am at a complete loss !

Here is the source code. Please help.

-

?
session_start();
error_reporting(E_ALL);

if ( (isset($_POST['validuser']))  (isset($_POST['password']))  )  {

  mysql_connect( 'localhost', 'abc', 'pwd' )
 or die ( 'Unable to connect to server.' );
  // Select database on MySQL server
  //  mysql_select_db( 'masterstream' )
   or die ( 'Unable to select database' );
  // Formulate the query

  //  $sql1 = SELECT * from `admin` where `admin`.username = 
$_POST['validuser'] AND `admin`.password = $_POST['password'];

$result1 = mysql_query($sql1)
or die ( 'Database Error has occured.');

$num_results = mysql_num_rows($result1);


if ($num_results == 1 ) {
echo Success!br;
   if(!isset($_SESSION['validuser']))
  $_SESSION['validuser'] = $_POST['validuser'];
}
  else{
echo Please try again laterbr;
  }
  }
?

html
head
titleADMIN-LOGIN/title
/head
?

if (isset($_SESSION['validuser']))
  {
  echo You are already logged into the system !!!;
   }
else {
   echo test;
}
echo 
body bgcolor=\aa\
form name=\form1\ method=\post\ action=\ADMIN-LOGIN.php\
  table width=\713\ height=\132\ border=\1\ cellpadding=\1\ 
cellspacing=\1\ bgcolor=\#FF\
tr
  td width=\787\ height=\119\ table width=\707\ 
border=\1\ cellspacing=\3\ cellpadding=\2\
  tr bgcolor=\99ccff\
td colspan=\2\div align=\center\strongfont 
color=\#FF\ size=\2\ face=\Verdana, Arial, Helvetica, 
sans-serif\Please
enter your Username and Password 
/font/strong/div/td
  /tr
  tr bgcolor=\#E7E7E7\
td width=\214\strongfont color=\#66\ 
size=\1\ face=\Verdana, Arial, Helvetica, 
sans-serif\Login/font/strong/td
td width=\549\font size=\1\
  input name=\validuser\ type=\text\ 
id=\validuser2\
  /font/td
  /tr
  tr bgcolor=\#E7E7E7\
tdstrongfont color=\#66\ size=\1\ 
face=\Verdana, Arial, Helvetica, 
sans-serif\Password/font/strong/td
tdfont size=\1\
  input name=\password\ type=\password\ 
id=\password\
  /font/td
  /tr
  tr bgcolor=\#E7E7E7\
td height=\24\ colspan=\2\div align=\center\
input type=\submit\ name=\Submit\ 
value=\Submit\
  /div/td
  /tr
/table/td
/tr
  /table
/form
;
?

/body
/html


Thanks in advance.
Pushpinder


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


[PHP] Variable from the form

2003-06-30 Thread Gladk
Hi!
I'm getting result from the form. Are there any differences between
using these 2 forms:


$_POST['my_variable']

or just

$my_variable


Is it more safety to use the first one?


Thanks


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



RE: [PHP] Variable from the form

2003-06-30 Thread Dan Joseph
Hi,

 I'm getting result from the form. Are there any differences between
 using these 2 forms:


 $_POST['my_variable']

 or just

 $my_variable

 Is it more safety to use the first one?

You have to use the first one if you have register_globals set to off.  If
you have it on, you can use either, however, the second is more insecure.

-Dan Joseph


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



[PHP] php5 and mysql licences

2003-06-30 Thread Christopher Speer
Hello,

i just read the news on php.net and wondered what it says about php5 and
MySQL.
They say that the libs for using a mysql server are not implemented any
more,... so my question is: does that mean i (we) have to buy the licences
to be allowed to use the mysql libs for php?

kind regards
Christopher Speer ( Europe - Germany )



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



Re: [PHP] php5 and mysql licences

2003-06-30 Thread Derick Rethans
On Mon, 30 Jun 2003, Christopher Speer wrote:

 i just read the news on php.net and wondered what it says about php5 and
 MySQL.
 They say that the libs for using a mysql server are not implemented any
 more,... so my question is: does that mean i (we) have to buy the licences
 to be allowed to use the mysql libs for php?

No, that is not true. You will only need to buy a MySQL license if your
script uses PHP's MySQL 4.x support (ie, linking to libmysql 4.x), you
distribute your script AND you do not want to distribute your set of
script under the GPL license (but under for example the BSD license or a
commerical license).

regards,
Derick

-- 
Interpreting what the GPL actually means is a job best left to those
that read the future by examining animal entrails.
-
 Derick Rethans http://derickrethans.nl/ 
 International PHP Magazine  http://php-mag.net/
-


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



RE: [PHP] php5 and mysql licences

2003-06-30 Thread Dan Joseph
Hi,

Is the mysql client library going to be put back in for future betas?  Or
are we mis-reading the change log and its still there?

-Dan Joseph

 -Original Message-
 From: Derick Rethans [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 30, 2003 1:05 PM
 To: Christopher Speer
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] php5 and mysql licences


 On Mon, 30 Jun 2003, Christopher Speer wrote:

  i just read the news on php.net and wondered what it says about php5 and
  MySQL.
  They say that the libs for using a mysql server are not implemented any
  more,... so my question is: does that mean i (we) have to buy
 the licences
  to be allowed to use the mysql libs for php?

 No, that is not true. You will only need to buy a MySQL license if your
 script uses PHP's MySQL 4.x support (ie, linking to libmysql 4.x), you
 distribute your script AND you do not want to distribute your set of
 script under the GPL license (but under for example the BSD license or a
 commerical license).

 regards,
 Derick

 --
 Interpreting what the GPL actually means is a job best left to those
 that read the future by examining animal entrails.
 -
  Derick Rethans http://derickrethans.nl/
  International PHP Magazine  http://php-mag.net/
 -


 --
 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 5 and 4 Incompatibilities?

2003-06-30 Thread Reuben D. Budiardja

Hello,
I tried to find this on the website but didn't find it. So, is there any known 
backward incompatibilities with PHP 4? If yes, anyone knows where we can find 
the list?
or PHP 4 code will mainly just work with PHP 5 ?

Thanks.
RDB
-- 
-
/\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format
 X   attachments.
/ \
-


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



[PHP] SQLyog 3.51 Released

2003-06-30 Thread Karam Chand
SQLyog v3.51 - The definitive Windows Front End for
MySQL, has been released. 

SQLyog is a superfast, compact and easy to use Front
End for MySQL.

Some of the new features added in SQLyog 3.51 are - 

-- Complete support for MySQL 4.1.
-- Improved SQL Editor.
-- Improved ODBC Import Tool.
-- BLOB data does not require double click for viewing
if the data is  255 bytes.
-- More compact and optimized executable ( 480 KB ). 
-- Lot of bugfixes and enhancements.

SQLyog 3.51 is available at an Introductory price of
$49.  

You can download a full featured Trial version of
SQLyog at http://www.webyog.com/sqlyog/download.html

Regards
Karam

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: [PHP] php5 and mysql licences

2003-06-30 Thread Derick Rethans
On Mon, 30 Jun 2003, Dan Joseph wrote:

 Is the mysql client library going to be put back in for future betas?  Or
 are we mis-reading the change log and its still there?

No, we will not bundle the library with PHP 5 anymore.

Derick

-- 
Interpreting what the GPL actually means is a job best left to those
that read the future by examining animal entrails.
-
 Derick Rethans http://derickrethans.nl/ 
 International PHP Magazine  http://php-mag.net/
-


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



RE: [PHP] php5 and mysql licences

2003-06-30 Thread Rasmus Lerdorf
On Mon, 30 Jun 2003, Dan Joseph wrote:
   Is the mysql client library going to be put back in for future betas?  Or
 are we mis-reading the change log and its still there?

There will always be MySQL support in PHP of one kind or another.  The
only change in PHP5 is that we are no longer bundling the client library
itself.  Some reasons in no particular order:

  1. Most systems these days already have the client library installed.
  2. Given 1, having multiple versions of the library can get messy.
 For example, if you link mod_auth_mysql against 1 version and PHP
 against another and then enable both in Apache, you get a nice fat
 crash.  Also, the bundled library didn't always play well with the
 installed server version the most obvious symptom of this being
 disagreement over where to find the mysql.socket unix domain socket
 file.
  3. Maintenance was somewhat lax and it was falling further and further
 behind the released version.
  4. Future versions of the library are under the GPL and thus we don't
 have an upgrade path since we cannot bundle a GPL'ed library in a
 BSD/Apache-style licensed project.  A clean break in PHP5 seemed like
 the best option.

This won't actually affect that many people.  UNIX users, at least the
ones who know what they are doing, tend to always build PHP against their
system's libmyqlclient library simply by doing --with-mysql=/usr when
building PHP.

For the beta1 release, it went out without a mysql.dll extension because
we haven't quite worked out how to handle it, not because the final PHP5
release will not have MySQL support.  Of course it will and Windows users
will not be affected.

-Rasmus

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



[PHP] Refreshing

2003-06-30 Thread Stephen
Hello,

I have a chat script. I want it to refresh the chat display area whenever there is a 
new message posted, but not every 10 seconds or so. How could I get the script to 
refresh only when there is a new entry into the database table?

Also, this may not be PHP but...does anyone know how to stop the annoying click on 
Internet Explorer when something refreshes?

With bubblegum in my shoe,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.



[PHP] Re: Refreshing

2003-06-30 Thread Alberto Ferrer
use pconnect?

--
--
Alberto Ferrer
[EMAIL PROTECTED]
  http://www.barrahome.org
--
Syntax Error in KITCHEN.H: COFFEE not found.
Stephen [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
Hello,

I have a chat script. I want it to refresh the chat display area whenever
there is a new message posted, but not every 10 seconds or so. How could I
get the script to refresh only when there is a new entry into the database
table?

Also, this may not be PHP but...does anyone know how to stop the annoying
click on Internet Explorer when something refreshes?

With bubblegum in my shoe,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.





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



RE: [PHP] Refreshing

2003-06-30 Thread Jay Blanchard
[snip]
I have a chat script. I want it to refresh the chat display area
whenever there is a new message posted, but not every 10 seconds or so.
How could I get the script to refresh only when there is a new entry
into the database table?

Also, this may not be PHP but...does anyone know how to stop the
annoying click on Internet Explorer when something refreshes?
[/snip]

1. Nope, not with PHP. Well, you could but it would require a script
running in a loop in the background, checking for new data, then calling
a header redirect of some sort. That is kludgy and would require the
looping doohickey for each conversation within the chat.

2. You can disable sounds in a themes thingie, depends on which windoze
version you own.

HTH!

Jay

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



Re: [PHP] Refreshing

2003-06-30 Thread Stephen
1. This way would probably end up sending out 500 little clicks every
minute...so... Could any client side script do this like JavaScript? I doubt
it could but just a question.

With bubblegum in my shoe,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.


- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: Stephen [EMAIL PROTECTED]; PHP List
[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 12:41 PM
Subject: RE: [PHP] Refreshing


[snip]
I have a chat script. I want it to refresh the chat display area
whenever there is a new message posted, but not every 10 seconds or so.
How could I get the script to refresh only when there is a new entry
into the database table?

Also, this may not be PHP but...does anyone know how to stop the
annoying click on Internet Explorer when something refreshes?
[/snip]

1. Nope, not with PHP. Well, you could but it would require a script
running in a loop in the background, checking for new data, then calling
a header redirect of some sort. That is kludgy and would require the
looping doohickey for each conversation within the chat.

2. You can disable sounds in a themes thingie, depends on which windoze
version you own.

HTH!

Jay




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



Re: [PHP] Refreshing

2003-06-30 Thread Marco Tabini
Try using Javascript to reload an image instead of an HTML file. Images
don't click, and you can check whether new data is available by the size
of the returned image (e.g.: 1 pixel, no new data, 2pixels, new data).
You will need a small PHP script on the backend that generates the image
based on whether the data is available or not.

Cheers,


Marco

--
php|architect -- The Magazine for PHP Professionals
Get your free copy today at http://www.phparch.com!

On Mon, 2003-06-30 at 13:50, Stephen wrote:
 1. This way would probably end up sending out 500 little clicks every
 minute...so... Could any client side script do this like JavaScript? I doubt
 it could but just a question.
 
 With bubblegum in my shoe,
 Stephen Craton
 Senior Executive Web Developer
 Mophus.com, Inc.
 
 
 - Original Message - 
 From: Jay Blanchard [EMAIL PROTECTED]
 To: Stephen [EMAIL PROTECTED]; PHP List
 [EMAIL PROTECTED]
 Sent: Monday, June 30, 2003 12:41 PM
 Subject: RE: [PHP] Refreshing
 
 
 [snip]
 I have a chat script. I want it to refresh the chat display area
 whenever there is a new message posted, but not every 10 seconds or so.
 How could I get the script to refresh only when there is a new entry
 into the database table?
 
 Also, this may not be PHP but...does anyone know how to stop the
 annoying click on Internet Explorer when something refreshes?
 [/snip]
 
 1. Nope, not with PHP. Well, you could but it would require a script
 running in a loop in the background, checking for new data, then calling
 a header redirect of some sort. That is kludgy and would require the
 looping doohickey for each conversation within the chat.
 
 2. You can disable sounds in a themes thingie, depends on which windoze
 version you own.
 
 HTH!
 
 Jay
 
-- 

Marco Tabini
President

Marco Tabini  Associates, Inc.
28 Bombay Avenue
Toronto, ON M3H 1B7
Canada

Phone: (416) 630-6202
Fax: (416) 630-5057
Web: http://www.tabini.ca


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



Re: [PHP] Refreshing

2003-06-30 Thread Stephen
Thank you for this method. I just have a few questions.

1. How could javascript reload the image? I'm not 100% familiar with
JavaScript really...
2. How could I use PHP to find the width of the image? I was reading up on
image manipulation last night but only got as far as creating an image.

With bubblegum in my shoe,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.


- Original Message - 
From: Marco Tabini [EMAIL PROTECTED]
To: Stephen [EMAIL PROTECTED]
Cc: Jay Blanchard [EMAIL PROTECTED]; PHP List
[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 12:52 PM
Subject: Re: [PHP] Refreshing


Try using Javascript to reload an image instead of an HTML file. Images
don't click, and you can check whether new data is available by the size
of the returned image (e.g.: 1 pixel, no new data, 2pixels, new data).
You will need a small PHP script on the backend that generates the image
based on whether the data is available or not.

Cheers,


Marco

--
php|architect -- The Magazine for PHP Professionals
Get your free copy today at http://www.phparch.com!

On Mon, 2003-06-30 at 13:50, Stephen wrote:
 1. This way would probably end up sending out 500 little clicks every
 minute...so... Could any client side script do this like JavaScript? I
doubt
 it could but just a question.

 With bubblegum in my shoe,
 Stephen Craton
 Senior Executive Web Developer
 Mophus.com, Inc.


 - Original Message - 
 From: Jay Blanchard [EMAIL PROTECTED]
 To: Stephen [EMAIL PROTECTED]; PHP List
 [EMAIL PROTECTED]
 Sent: Monday, June 30, 2003 12:41 PM
 Subject: RE: [PHP] Refreshing


 [snip]
 I have a chat script. I want it to refresh the chat display area
 whenever there is a new message posted, but not every 10 seconds or so.
 How could I get the script to refresh only when there is a new entry
 into the database table?

 Also, this may not be PHP but...does anyone know how to stop the
 annoying click on Internet Explorer when something refreshes?
 [/snip]

 1. Nope, not with PHP. Well, you could but it would require a script
 running in a loop in the background, checking for new data, then calling
 a header redirect of some sort. That is kludgy and would require the
 looping doohickey for each conversation within the chat.

 2. You can disable sounds in a themes thingie, depends on which windoze
 version you own.

 HTH!

 Jay

-- 

Marco Tabini
President

Marco Tabini  Associates, Inc.
28 Bombay Avenue
Toronto, ON M3H 1B7
Canada

Phone: (416) 630-6202
Fax: (416) 630-5057
Web: http://www.tabini.ca


-- 
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] Geting information from XML

2003-06-30 Thread Denis C(ahuk
Can someone tell how to get information from an XML file, without the F* 
commands, in PHP?

e.g.:
? xml version=1.0 ?
messages
subjectHello/subject
/messages
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Geting information from XML

2003-06-30 Thread Stephen
There are a lot of classes that parse XML files. I can send you a few
functions I made myself to parse a paticular type of XML file. It should
help you get started.

With bubblegum in my shoe,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.


- Original Message - 
From: Denis C (ahuk [EMAIL PROTECTED])
To: PHP List [EMAIL PROTECTED]
Sent: Monday, June 30, 2003 12:58 PM
Subject: [PHP] Geting information from XML


Can someone tell how to get information from an XML file, without the F*
commands, in PHP?

e.g.:
? xml version=1.0 ?
messages
subjectHello/subject
/messages


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

2003-06-30 Thread Marco Tabini
On Mon, 2003-06-30 at 13:57, Stephen wrote:
 Thank you for this method. I just have a few questions.
 
 1. How could javascript reload the image? I'm not 100% familiar with
 JavaScript really...

Set a timeout to x seconds (where x is the time you want to wait between
checks--say one or two seconds). When the timeout occurs cause the image
to reload by changing its src attribute (even to the same URL, of
course).

 2. How could I use PHP to find the width of the image? I was reading up on
 image manipulation last night but only got as far as creating an image.

You don't need PHP to check the width of the image. PHP *generates* the
image of a given width based on whether new data is available or not. On
the frontend, you can set the onload event of the image to fire a
function of your choosing when the image is reloaded, where you check
its dimensions and act accordingly. Once you've done that, you reset
your timer, and the cycle starts over.

Cheers,


Marco

--
php|architect -- The Magazine for PHP Professionals
Get your free copy today at http://www.phparch.com!


 
 With bubblegum in my shoe,
 Stephen Craton
 Senior Executive Web Developer
 Mophus.com, Inc.
 
 
 - Original Message - 
 From: Marco Tabini [EMAIL PROTECTED]
 To: Stephen [EMAIL PROTECTED]
 Cc: Jay Blanchard [EMAIL PROTECTED]; PHP List
 [EMAIL PROTECTED]
 Sent: Monday, June 30, 2003 12:52 PM
 Subject: Re: [PHP] Refreshing
 
 
 Try using Javascript to reload an image instead of an HTML file. Images
 don't click, and you can check whether new data is available by the size
 of the returned image (e.g.: 1 pixel, no new data, 2pixels, new data).
 You will need a small PHP script on the backend that generates the image
 based on whether the data is available or not.
 
 Cheers,
 
 
 Marco
 
 --
 php|architect -- The Magazine for PHP Professionals
 Get your free copy today at http://www.phparch.com!
 
 On Mon, 2003-06-30 at 13:50, Stephen wrote:
  1. This way would probably end up sending out 500 little clicks every
  minute...so... Could any client side script do this like JavaScript? I
 doubt
  it could but just a question.
 
  With bubblegum in my shoe,
  Stephen Craton
  Senior Executive Web Developer
  Mophus.com, Inc.
 
 
  - Original Message - 
  From: Jay Blanchard [EMAIL PROTECTED]
  To: Stephen [EMAIL PROTECTED]; PHP List
  [EMAIL PROTECTED]
  Sent: Monday, June 30, 2003 12:41 PM
  Subject: RE: [PHP] Refreshing
 
 
  [snip]
  I have a chat script. I want it to refresh the chat display area
  whenever there is a new message posted, but not every 10 seconds or so.
  How could I get the script to refresh only when there is a new entry
  into the database table?
 
  Also, this may not be PHP but...does anyone know how to stop the
  annoying click on Internet Explorer when something refreshes?
  [/snip]
 
  1. Nope, not with PHP. Well, you could but it would require a script
  running in a loop in the background, checking for new data, then calling
  a header redirect of some sort. That is kludgy and would require the
  looping doohickey for each conversation within the chat.
 
  2. You can disable sounds in a themes thingie, depends on which windoze
  version you own.
 
  HTH!
 
  Jay
 
 -- 
 
 Marco Tabini
 President
 
 Marco Tabini  Associates, Inc.
 28 Bombay Avenue
 Toronto, ON M3H 1B7
 Canada
 
 Phone: (416) 630-6202
 Fax: (416) 630-5057
 Web: http://www.tabini.ca
 
 
 -- 
 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] Refreshing

2003-06-30 Thread Jeremy Thibeaux
 [snip]
 I have a chat script. I want it to refresh the chat
 display area
 whenever there is a new message posted, but not
 every 10 seconds or so.
 How could I get the script to refresh only when
 there is a new entry
 into the database table?
 [/snip]
 
I have implemented something along these lines for an
online chess game (so the board would only refresh
when the other player moves).  It did require a loop,
as suggested.  I used a hidden IFRAME to check the
data.  Basically, I would refresh the page referred to
by the IFRAME every 10 seconds or so, and this page
contained JavaScript that invoked a function on the
containing page.  The JavaScript function on the
containing page would then refresh the page when the
parameter passed to it indicated that the other player
had moved.  I did implement the site using PHP, but
this really isn't a PHP specific approach.  

I imagine you would do something very similar for chat
(in fact, I had been considering implementing it for
the online chess site so that the users could send
messages to each other during the course of the game).

And there is a performance issue if you are going to
support a lot of users at one time; however, at least
it is not as bad as refreshing the entire page every
10 seconds (this would be particularly disastrous for
my chess board, which contained many images).

There are a number of references that talk about this
trick if you search on iframe rpc javascript in
google:

http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=iframe+rpc+javascript

You will still get the clicking, tho.  But users' can
disable it if it annoys them -- sometimes it is nice
to know that something is going on.

Hope this helps.

Jeremy


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



[PHP] MySQL Query

2003-06-30 Thread Pushpinder Singh Garcha
Hello ,

Can someone tell me what is wrong with the following querys ?  I am 
pretty sure its got something to do with the quotes around $_POST[] 
variables.

$sql1 = SELECT * from `admin` where `admin`.user = 
'$_POST['validuser']' AND `admin`.pwd = '$_POST['password']';

$sql1 = SELECT * from `admin` where user = $_POST['validuser'] AND 
pwd = $_POST['pass'];
   

Thanks in advance,

--Pushpinder

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


RE: [PHP] MySQL Query

2003-06-30 Thread Jay Blanchard
[snip]
$sql1 = SELECT * from `admin` where `admin`.user = 
'$_POST['validuser']' AND `admin`.pwd = '$_POST['password']';

$sql1 = SELECT * from `admin` where user = $_POST['validuser'] AND 
pwd = $_POST['pass'];
[/snip]

subtle differences

$sql1 = SELECT * from `admin` where `admin`.user = 
'.$_POST['validuser'].' AND `admin`.pwd = '.$_POST['password'].' ;

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



Re: [PHP] Geting information from XML

2003-06-30 Thread Jeremy Thibeaux
Have you tried using the DOM XML functions?

http://us3.php.net/manual/en/ref.domxml.php



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



RE: [PHP] MySQL Query

2003-06-30 Thread Ford, Mike [LSS]
 -Original Message-
 From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
 Sent: 30 June 2003 19:10
 
 Can someone tell me what is wrong with the following querys ?  I am 
 pretty sure its got something to do with the quotes around $_POST[] 
 variables.
 
 $sql1 = SELECT * from `admin` where `admin`.user = 
 '$_POST['validuser']' AND `admin`.pwd = '$_POST['password']';
 
 $sql1 = SELECT * from `admin` where user = $_POST['validuser'] AND 
 pwd = $_POST['pass'];

Too many quotes, not enough curly braces:

  $sql1 = SELECT * from `admin` where user = '{$_POST['validuser']}' AND
pwd = '{$_POST['pass']}';

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Refreshing

2003-06-30 Thread Marco Tabini
The image should take care of the click, and also reduce the amount of
information transmitted somewhat (although not necessarily, depending on
what you send to your iframe).

Cheers,


Marco

On Mon, 2003-06-30 at 14:09, Jeremy Thibeaux wrote:
  [snip]
  I have a chat script. I want it to refresh the chat
  display area
  whenever there is a new message posted, but not
  every 10 seconds or so.
  How could I get the script to refresh only when
  there is a new entry
  into the database table?
  [/snip]
  
 I have implemented something along these lines for an
 online chess game (so the board would only refresh
 when the other player moves).  It did require a loop,
 as suggested.  I used a hidden IFRAME to check the
 data.  Basically, I would refresh the page referred to
 by the IFRAME every 10 seconds or so, and this page
 contained JavaScript that invoked a function on the
 containing page.  The JavaScript function on the
 containing page would then refresh the page when the
 parameter passed to it indicated that the other player
 had moved.  I did implement the site using PHP, but
 this really isn't a PHP specific approach.  
 
 I imagine you would do something very similar for chat
 (in fact, I had been considering implementing it for
 the online chess site so that the users could send
 messages to each other during the course of the game).
 
 And there is a performance issue if you are going to
 support a lot of users at one time; however, at least
 it is not as bad as refreshing the entire page every
 10 seconds (this would be particularly disastrous for
 my chess board, which contained many images).
 
 There are a number of references that talk about this
 trick if you search on iframe rpc javascript in
 google:
 
 http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=iframe+rpc+javascript
 
 You will still get the clicking, tho.  But users' can
 disable it if it annoys them -- sometimes it is nice
 to know that something is going on.
 
 Hope this helps.
 
 Jeremy
-- 

Marco Tabini
President

Marco Tabini  Associates, Inc.
28 Bombay Avenue
Toronto, ON M3H 1B7
Canada

Phone: (416) 630-6202
Fax: (416) 630-5057
Web: http://www.tabini.ca


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



Re: [PHP] MySQL Query

2003-06-30 Thread Thorsten Körner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi
Am Montag, 30. Juni 2003 20:10 schrieb Pushpinder Singh Garcha:
 Hello ,

 Can someone tell me what is wrong with the following querys ?  I am
 pretty sure its got something to do with the quotes around $_POST[]
 variables.

 $sql1 = SELECT * from `admin` where `admin`.user =
 '$_POST['validuser']' AND `admin`.pwd = '$_POST['password']';

 $sql1 = SELECT * from `admin` where user = $_POST['validuser'] AND
 pwd = $_POST['pass'];
You have forgotten to set the 'dots' 8-)

$sql1 = SELECT * from `admin` where `admin`.user =
 ' . $_POST['validuser'] . ' 
- ---^
AND `admin`.pwd = ' . $_POST['password'] . ';
- ----^
That's it.

CU
Thorsten

have fun
- -- 
Thorsten Körner http://www.123tkShop.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/AIMZs5R35vLkl/cRAhzpAKCigPBeox92GTtjbGu8Ydiu5NlxIQCgqy27
SFw6/nEAUy4nsAvMzaQiFQk=
=Axl+
-END PGP SIGNATURE-


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



RE: [PHP] Forms

2003-06-30 Thread Petre Agenbag
Most books, specially the older ones will use this type of coding. It relies
completely on register_globals (and some other settings) to be enabled in
your php.ini.

However, many possible security risks has been identified with having
register_globals=on, so newer versions come with that feature disabled by
default.
This has been discussed to great depths in the archives, and arguably, if
you design your code with security in mind, turning register_globals on,
will and should not cause any problems. On the other hand, it is becoming a
standard, so unless you have your own server, or you know your ISP will
turn it on for you, then you are probably better off accessing your
variables through the POST and GET arrays.

As I said in my first post, it is basically in the way that you call your
variables.

If you look at your example:
You have a form that has the same page as the action, using the POST method,
meaning that all the names of form elements and the correlating values,
will be passed to the action page as POST variables. All these variables get
stored in the $_POST array.
So, as an example:
Your form has a input type=text name=var1 value=test
With your code in mind, hitting the submit on the form, will place a new
element in the $_POST array, called var1 ad associative value = test
And if you need to echo or use that variable/value, you should do so by
calling it like so:

echo $_POST[var1];

output - test

If you look closely at your code, you will see an If

 /* Section that executes query */
   if (@$form == yes)
   {


and you will also see that the form being shown on first load of the page,
has a get variable appended to it in the action:

form action=?php echo $PHP_SELF ??form=yes method=post
   table
tr
 td align=rightbType in database name/b/td
 td

that ?form=yes bit, creates a $_GET variable called $_GET[form] with a
value of yes

So, for your code to work, the IF statement should read:

 if ($_GET[form] == yes)
   {

Basically, the reason why it looks like your page is not doing anything, is
because the if cannot be satisfied...

You should thus go through that sample code and change the nameing of your
POST and GET variables (ie, the variables that are passed to the next page
to the abovementioned method and all should be fine.



-Original Message-
From: Simon Chappell [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 6:22 PM
To: Petre Agenbag
Subject: Re: [PHP] Forms


thanks for the reply

yes I have tried both on and off, it is currently off?
Where would i put those in my script? or do I have to start from scratch?
The reason I am asking, is that all the books I have seem to be doing the
same
out of date coding, and if it is possible to make a quick change that I can
carry with me through my learning then I can get use out of all the books
that i have bought! but if all the scripts are pointless then i might as
well
light a match or give them to my 6 year old and ask him to look after them!!

Many thanks

Simon

On Monday 30 Jun 2003 3:14 pm, Petre Agenbag wrote:
 Have you checked register_globals = on/off in your php.ini?
 If register_globals=off, then you must access your POST variables by:

 $_POST['whatever'];

 and your get (the stuff you put at the end of your URL's):

 $_GET['whatever'];

 On Mon, 2003-06-30 at 15:48, Simon Chappell wrote:
  Hi can anyone help me with this?
 
  I have been failing to get any forms working with PHP now I have run out
  of ideas? Having bought 3 books the latest one being php  mysql for
  dummies(which might be appropriate for me) I am still failing at this
  hurdle.
 
  the following script is a classic example taken straight out of the
book,
  I get round the $PHP_SELF problem ok but then all the script does is
loop
  back to itself?
 
  !-- Program Name:  mysql_send.php
   Description: PHP program that sends an SQL query to the
MySQL server and displays the results.
  --
  html
  head
  titleSQL Query Sender/title
  /head
  body
  ?php
   $user=root;
   $host=localhost;
   $password=;
 
   /* Section that executes query */
   if (@$form == yes)
   {
 mysql_connect($host,$user,$password);
 mysql_select_db($database);
 $query = stripSlashes($query) ;
 $result = mysql_query($query);
 echo Database Selected: b$database/bbr
Query: b$query/b
h3Results/h3
hr;
 if ($result == 0)
echo(bError  . mysql_errno() . :  . mysql_error() . /b);
 
 elseif (@mysql_num_rows($result) == 0)
echo(bQuery completed. No results returned./bbr);
 else
 {
   echo table border='1'
 thead
  tr;
   for ($i = 0; $i  mysql_num_fields($result); $i++)
   {
   echo(th . mysql_field_name($result,$i) . /th);
   }
   echo  /tr
 /thead
 tbody;
   for ($i = 0; $i  mysql_num_rows($result); $i++)
   {
  

[PHP] Query for MySQL

2003-06-30 Thread Didier McGillis
Question.

I am looking to try and pull the last modified date out and display it.  So 
lets say I have 1000 records.  I want to only display the date of the last 
modified time, I dont care about the id or the name or anything.  How do I 
query for that?

_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


RE: [PHP] Query for MySQL

2003-06-30 Thread Jay Blanchard
[snip]
I am looking to try and pull the last modified date out and display it.
So 
lets say I have 1000 records.  I want to only display the date of the
last 
modified time, I dont care about the id or the name or anything.  How do
I 
query for that?
[/snip]

If you have a lst modified date column you would ...

SELECT MAX(LastModifiedDate) FROM yourtable

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



Re: [PHP] Refreshing

2003-06-30 Thread Jeremy Thibeaux
The only problem I have with the image idea is that it
is not particularly generic and a bit unusual (i.e.
kindof a hack).  

The IFRAME would need only contain a simple JavaScript
function call, so it would be pretty small (the data
would probably be less than the HTTP header
information), and this would basically represent the
framework for implementing RPCs via JavaScript.  Once
you go down this path, you don't have to worry about
figuring out what image size means what or how to
generate these images, you just pass a meaningful
parameter to your RPC response handler.

But, I admit, I can get religious about these kind of
things.  In the end, sometimes practical realities
justify hacks.  And, really, it is all a matter of
degrees (I am not sure IFRAMES were designed for what
I am proposing you use them for either).

Jeremy

--- Marco Tabini [EMAIL PROTECTED] wrote:
 The image should take care of the click, and also
 reduce the amount of
 information transmitted somewhat (although not
 necessarily, depending on
 what you send to your iframe).
 
 Cheers,
 
 
 Marco
 

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



[PHP] php-general as REPLY TO

2003-06-30 Thread John Manko
Hello,

I'm wondering why the listed Reply To address is not 
[EMAIL PROTECTED] 
Thing would be so much easier to just reply than cut-n-paste when reply 
to the entire list on a subject (which is the norm).

Can the maintainer set this up?

John



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


Re: [PHP] php-general as REPLY TO

2003-06-30 Thread Matt Matijevich


 John Manko [EMAIL PROTECTED] 06/30/03 02:08PM 
Hello,

I'm wondering why the listed Reply To address is not 
[EMAIL PROTECTED] 
Thing would be so much easier to just reply than cut-n-paste when reply

to the entire list on a subject (which is the norm).

Can the maintainer set this up?

John



-- 
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] Nothing to do with PHP

2003-06-30 Thread Cesar Cordovez
But, I'm sure someone in this list have the answer to my question: I 
have written a lot of statements using the LIMIT clause in MySQL, like 
for example: SELECT * FROM system_users WHERE lastname like C% LIMIT 
0,10 ...and I love it. specially when you are doing next page, 
previous page kind of stuff.  One of my clients wants to install my 
system in (*^%$# MSSQL server. How can I do a LIMIT in MSSQL (or other?)

Any comments welcome.

TIA.

Cesar



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


Re: [PHP] php-general as REPLY TO

2003-06-30 Thread Derick Rethans
On Mon, 30 Jun 2003, John Manko wrote:

 I'm wondering why the listed Reply To address is not 
 [EMAIL PROTECTED] 
 Thing would be so much easier to just reply than cut-n-paste when reply 
 to the entire list on a subject (which is the norm).

That's an evil thing, and misusing e-mail. E-mail clients have the 
reply-all function for this.

Derick

-- 
Interpreting what the GPL actually means is a job best left to those
that read the future by examining animal entrails.
-
 Derick Rethans http://derickrethans.nl/ 
 International PHP Magazine  http://php-mag.net/
-


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



RE: [PHP] Nothing to do with PHP

2003-06-30 Thread Edward Peloke
I believe you would achieve the same results by saying select top 10 * from
system_users where lastnamelike C%

Eddie

-Original Message-
From: Cesar Cordovez [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 3:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Nothing to do with PHP


But, I'm sure someone in this list have the answer to my question: I
have written a lot of statements using the LIMIT clause in MySQL, like
for example: SELECT * FROM system_users WHERE lastname like C% LIMIT
0,10 ...and I love it. specially when you are doing next page,
previous page kind of stuff.  One of my clients wants to install my
system in (*^%$# MSSQL server. How can I do a LIMIT in MSSQL (or other?)


Any comments welcome.

TIA.

Cesar



--
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] Piping print_r output to a variable

2003-06-30 Thread Mike Mannakee
Hi all,

Is there a way I can pipe the output of print_r() into a variable for
further processing?

Mike





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



RE: [PHP] Piping print_r output to a variable

2003-06-30 Thread Jay Blanchard
[snip]

Is there a way I can pipe the output of print_r() into a variable for
further processing?
[/snip]

$variable = print_r();

Then use $variable?


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



Re: [PHP] Piping print_r output to a variable

2003-06-30 Thread Derick Rethans
On Mon, 30 Jun 2003, Mike Mannakee wrote:

 Hi all,
 
 Is there a way I can pipe the output of print_r() into a variable for
 further processing?

Use var_Export and set the 2nd parameter to TRUE

Derick

-- 
Interpreting what the GPL actually means is a job best left to those
that read the future by examining animal entrails.
-
 Derick Rethans http://derickrethans.nl/ 
 International PHP Magazine  http://php-mag.net/
-


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



Re: [PHP] Piping print_r output to a variable

2003-06-30 Thread Jason Wong
On Tuesday 01 July 2003 03:35, Jay Blanchard wrote:
 [snip]

 Is there a way I can pipe the output of print_r() into a variable for
 further processing?
 [/snip]

 $variable = print_r();

 Then use $variable?

With newer versions of php (check manual) you can specify an extra parameter 
like so:

  $output = print_r($some_var, 1) 

to have it return it's output.

If you're using older versions of php then you need to do something like:

  ob_start();
  print_r($some_var);
  $output = ob_get_contents();
  ob_end_flush();

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Do you mean that you not only want a wrong answer, but a certain wrong answer?
-- Tobaben
*/


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



Re: [PHP] MySQL Query ~~ SOLVED

2003-06-30 Thread Pushpinder Singh Garcha
Thanks to all you great ppl out there !!!

have a great weekend ;-) for those in north america

FYI : mine has just started !

cheers
--Pushpinder


On Monday, June 30, 2003, at 02:36 PM, Thorsten Körner wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi
Am Montag, 30. Juni 2003 20:10 schrieb Pushpinder Singh Garcha:
Hello ,

Can someone tell me what is wrong with the following querys ?  I am
pretty sure its got something to do with the quotes around $_POST[]
variables.
$sql1 = SELECT * from `admin` where `admin`.user =
'$_POST['validuser']' AND `admin`.pwd = '$_POST['password']';
$sql1 = SELECT * from `admin` where user = $_POST['validuser'] AND
pwd = $_POST['pass'];
You have forgotten to set the 'dots' 8-)

$sql1 = SELECT * from `admin` where `admin`.user =
 ' . $_POST['validuser'] . '
- ---^
AND `admin`.pwd = ' . $_POST['password'] . ';
- ----^
That's it.
CU
Thorsten
have fun
- --
Thorsten Körner http://www.123tkShop.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE/AIMZs5R35vLkl/cRAhzpAKCigPBeox92GTtjbGu8Ydiu5NlxIQCgqy27
SFw6/nEAUy4nsAvMzaQiFQk=
=Axl+
-END PGP SIGNATURE-
--
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] ftp_ssl_connect() Problem

2003-06-30 Thread Dean E. Weimer
I too am having problems getting ftp_ssl_connect() enabled, any help is very
appreciated.

What I am using is as follows, please let me know what it is I am missing..

PHP 4.3.0 installed as a Static Module with Apache 1.3.24

This is a re-configuration of an existing installation of PHP 4.3.0
I have never had problems reconfiguring PHP as I needed the other options
I use.

My configure command was
./configure \
 --enable-sockets \
 --enable-ftp \
 --with-mysql=/usr/local/mysql \
 --with-apache=../apache_1.3.24 \
 --with-png-dir=/root/backup/image/libpng-1.2.5 \
 --with-jpeg-dir=/root/backup/image/jpeg-6b \
 --with-gd=/usr/local/gd \
 --with-zlib-dir=/usr/local \
 --with-openssl=/usr/local/ssl

My infophp() says..

OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.6b [engine] 9 Jul 2001

However the general info says :

Build Date Feb 25 2003 11:00:45
(this was about the last time I made a successful change,
obviously not today)

[snip...]

I had a simular problem recently, with 4.3.3, I discovered that it wasn't
recompiling the ftp, since it was already installed.  I fixed this by
running the following:

make clean
./configure ...
make
make install

-- 
Thanks,
  Dean E. Weimer
  http://www.dwiemer.org/
  [EMAIL PROTECTED]

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



  1   2   >