Re: [PHP] Creating table in mySQL db

2002-03-24 Thread TV Karthick Kumar

Hi,

That's very simple. All you have to do it, connect to the mysql on the
host and then execute the 'create table..' querty, that's all... You can
find good tutorials at webmonkey.com and devshed.com.. and lot more

Hope this helps.

Hth,
Karthick


- Original Message -
From: Piotr Skorupski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 24, 2002 8:58 PM
Subject: [PHP] Creating table in mySQL db


Hello

Is there a way to create a teble in mySQL database by PHP?



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: [PHP] mail

2002-03-20 Thread TV Karthick Kumar

Yeah, just add Cc:[EMAIL PROTECTED] to your headers, that's
it...

Karthick


- Original Message -
From: Sven Jacobs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 20, 2002 11:51 AM
Subject: [PHP] mail


 hey

 Is it possible to put somebody in CC when you use the mail() function ???



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Fw: [PHP] 100% repeatable problem with PHP 4.0.1 in WIN2k environment.

2002-03-19 Thread TV Karthick Kumar


- Original Message -
From: TV Karthick Kumar [EMAIL PROTECTED]
To: Balaji Ankem [EMAIL PROTECTED]
Sent: Tuesday, March 19, 2002 12:35 PM
Subject: Re: [PHP] 100% repeatable problem with PHP 4.0.1 in WIN2k
environment.


 Hi,

 From the surface leve, it looks like your php.exe corrupted and
probably
 crashed ?. Or doesn't works properly with your webserver, PWS, Apache or
 whatever you have ?. But I don't know how did you manage to work with such
a
 *thing* for the past 1 year ?.

 Karthick


 
  Hi,
I am able to produce the following problem 100% in WINDOWS.
 
Problem is u can not produce success message in new browser context ..
 
  Error: php.exe has generated some errors and will be closed by
  windows.
 
I am facing this problem from last 1 year.
 
  Files
 
  Login.html
  ==
 
  !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en
  html
 
  body ONLOAD=document.login.emp_id.focus()
  font face=arial 
 brbrcenter  h1 WELCOME TO LOGIN PAGE /h1/centerbrbr
  center
   form name=login method=post action=./authentication.php
   table border=0 width=100%
   center
   trtd width=50% align=rightbfont size=2
  face=ArialEmployee Nonbsp;/font/b/tdtd width=5%/tdtd
  width=50%input type=text size=10 name=emp_id maxlength=10
  value=/td/tr
   trtd width=50% align=rightbfont size=2
  face=ArialPasswordnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/font/
  b/tdtd width=5%/tdtd width=50% input type=password
  size=10 name=emp_pass maxlength=10 value=/td/tr
   tr
td width=50% align=right
p align=left
 
/td
td width=5%
/td
td width=50%
p align=left input type=submit
  Value=LOGIN/td
   /tr
 
   /center
  /table
  /center
  /form
  /body
  /html
  ===
 
  Authentication.php
  
  ?php
 
  // Connect to MySQL
 
  if (isset ($HTTP_POST_VARS{emp_id})  isset
  ($HTTP_POST_VARS{emp_pass}))
  {
  $connection=mysql_connect( 'localhost', 'balaji',
  'pingpong' )
  or die ( 'Unable to connect to server.'
  );
 
  // Select database on MySQL server
 
  mysql_select_db( 'amerm' ) or die ( 'Unable to select
  database.' );
 
  // Formulate the query
 
 
  $sql = SELECT * FROM employee WHERE emp_id = '$emp_id'
  AND  emp_pass = PASSWORD('$emp_pass');
 
  // Execute the query and put results in $result
 
  $result = mysql_query( $sql )   or die ( 'Unable to
  execute query.' );
 
  // Get number of rows in $result.
 
  $num = mysql_numrows( $result );
 
 
 
  if ( $num != 0 )
  {
  $row = mysql_fetch_object($result);
 
  // A matching row was found - the user is
  authenticated.
  //start a new session by registering the
  employee number.
  session_start();
  session_register(user,pw);
  $user=$emp_id;
  $pw  =$emp_pass;
 
  //This is the value from employee table ..just
  simplified for simulating this problem
 
$n=2;
 
  if ($n==2)
  {
  //close mysql connection
  mysql_close($connection);
  header(Location: success.php);
  exit;
  }
  }
 
  else
  {
  //close mysql connection
  mysql_close($connection);
  //User does not exist or not authenticated.
  header(Location:not_authorized.html);
  exit;
  }
  }
 
  else
  {
  //User does not exist or not authenticated.
  header(Location:wrongusage.html);
  exit;
  }
  ?
  =
 
  Success.php
  
 
  ?php
 
 
  echo you have logged in successfully!br;
 
  echo Session variablesbr;
 
  echo $HTTP_SESSION_VARS[user].$HTTP_SESSION_VARS[pw];
 
  ?
 
  ===
 
  Can anybody tell me what is causing the problem.
 
  Any help would be very appreciable.
 
  Thanks in advance
  Balaji
 
 


 --
--
 


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



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: [PHP] Changed localhost?

2002-02-27 Thread TV Karthick Kumar

Hi,

Did you try http://localhost , instead of 127.0.0.1, or with your
machine, if you have changed any, recently.  Or else just check if it
conflicts with the port(s) if you have PWS also installed on your machine.

If you don't get any solutions, alternatively post your query to the PHP
Windows mailing list also.

Hth,
Karthick


 All of a sudden Apache is nor running correctly under Windows 98.

 It appears that somehow localhost was changed from 127.0.0.1 to something
else.

 Does the fact that I now have a 24/7cable connection to the Net cause the
 problem?

 Thanks!

 Anthony Rodriguez
 ([EMAIL PROTECTED])



 --
 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] HAPPY VALENTINES DAY

2002-02-13 Thread TV Karthick Kumar

Oh, ok when did PHP started celeberating valentine's day ?!?!?!?!?!?!!

Karthick


 Hi friends,
 Wish you all A very Happy Valentines Day!!!
 May this Day bring in lots of Joy, Happiness, Success, Love 
 May all your dreams come true 

 Warm Regards ,
 Balaji









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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] Search

2002-02-04 Thread TV Karthick Kumar

Hi all,

Is there any other way to search all the html pages in a website with a
given keyword and link to those pages, wihout using the udmsearch and
mnogo... if so, please let me know...

Thanks.

TIA,
Karthick



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: [PHP] mail() function not sending to Yahoo address

2002-02-03 Thread TV Karthick Kumar

 Hi,

I use a form on my website for the visitors to send me the feedback and
use the mail() to do this job for me. And I get mails without any
problems I am happy... :-)..

Karthick


 I've tried several PHP form processors, and all of
 them have trouble sending the form contents to a Yahoo
 address.  When I change the address to something other
 than a Yahoo account, it sends the form results with
 no problem.  Is there an issue with PHP's mail
 function and Yahoo email addresses?

 thanks,
 John

 __
 Do You Yahoo!?
 Great stuff seeking new owners in Yahoo! Auctions!
 http://auctions.yahoo.com

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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] Function

2001-06-28 Thread TV Karthick Kumar

Hi,

Is there any function to replace a character in an Array ??.

Thanx in adv.

~ Karthick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help - Lotus

2001-06-27 Thread TV Karthick Kumar

Hi List,

I am working on importing data from Lotus Organizer 5.0 to an ddress
book application, written in PHP.

If there's a space in the address field, it looks this when I see the
.vcf file, after creating it.

Note the  =0D=0A=0D=0A=  in:
NOTE;ENCODING=QUOTED-PRINTABLE:Description, Profile /
Note.=0D=0A=0D=0A=
~ Karthick=0D=0A

And some times, there's just a  =  symbol coming up in the field types
and values and here's an example:
ADR;HOME;ENCODING=QUOTED-PRINTABLE:;;3, Granby Row, Apartment 4,
Dubli=
n 1.;Home dublin city;Home dublin state;1;IE

How do I overcome this problem and make it work properly ?. Pls. let me
know.

Thanks in adv.

~ Karthick
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Unix timestamp

2001-05-10 Thread TV Karthick Kumar

Hi List..

How do I convert this Sep 20 2000 00:00:00 into UNIX timestamp so that I
can use the toDate() function to again convert it to the earlier format. I
need to do this becoz I am moving from one table to another table where I
get error, if I already have the converted date value with me.

Pls. help. Thanks in adv.

~ Karthick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] foreach ?!

2001-04-05 Thread TV Karthick Kumar

Hi List..

I have the following code, which actually sets up the value of of the
hidden variable and passes onto the next page and there I manipulate the
data and send them emails.

But passing the hidden variables depends upon the mem_id, that is the
hidden variable has to be passed for 'n' number of records. For example, if
I have two records then the I am checking the first record and finding out
the available email id (the various chances are home_email1, home_email2,
work_email1, work_email2 etc. and I have max. 4 email addresses in each
record) and passing it as an hidden variable to the next page. Here it's
very important to note that, at times, 4 emails will be available or 4
emails will NOT be available (it'll be empty) and sometimes only 1 or 2 will
be available. There are possibilities like this.

Now, as I have this code in place, what's happening is : when I pass any
of the email address of the first record, it's getting passed, where the
home_email1 is available and then when I pass any of the email address of
the second record, it's getting passed - BUT it's getting overwritten and I
have the value of the second record and I lost the first one.

What I want is - I want the hidden variables to be passed and kept for
the number of records selected and then I would use pass them as hidden
variables and use it in the next page. I know that I have to use Arrays for
this, but what's next ?.

Here's my code:

 if ($mem_obj-home_email1!=='')
  $vars["home_email1"] = "input type=hidden name=home_email1
value=$mem_obj-home_email1";

 if ($mem_obj-home_email2!=='')
  $vars["home_email2"] = "input type=hidden name=home_email2
value=$mem_obj-home_email2";

 if ($mem_obj-work_email1!=='')
  $vars["work_email1"] = "input type=hidden name=work_email1
value=$mem_obj-work_email1";

 if ($mem_obj-work_email2!=='')
  $vars["work_email2"] = "input type=hidden name=work_email2
value=$mem_obj-work_email2";

Any help is much useful to me.

Thanks in advance.

~ Karthick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] foreach ?!

2001-04-05 Thread TV Karthick Kumar

Hi List..

I have the following code, which actually sets up the value of of the
hidden variable and passes onto the next page and there I manipulate the
data and send them emails.

But passing the hidden variables depends upon the mem_id, that is the
hidden variable has to be passed for 'n' number of records. For example, if
I have two records then the I am checking the first record and finding out
the available email id (the various chances are home_email1, home_email2,
work_email1, work_email2 etc. and I have max. 4 email addresses in each
record) and passing it as an hidden variable to the next page. Here it's
very important to note that, at times, 4 emails will be available or 4
emails will NOT be available (it'll be empty) and sometimes only 1 or 2 will
be available. There are possibilities like this.

Now, as I have this code in place, what's happening is : when I pass any
of the email address of the first record, it's getting passed, where the
home_email1 is available and then when I pass any of the email address of
the second record, it's getting passed - BUT it's getting overwritten and I
have the value of the second record and I lost the first one.

What I want is - I want the hidden variables to be passed and kept for
the number of records selected and then I would use pass them as hidden
variables and use it in the next page. I know that I have to use Arrays for
this, but what's next ?.

Here's my code:

 if ($mem_obj-home_email1!=='')
  $vars["home_email1"] = "input type=hidden name=home_email1
value=$mem_obj-home_email1";

 if ($mem_obj-home_email2!=='')
  $vars["home_email2"] = "input type=hidden name=home_email2
value=$mem_obj-home_email2";

 if ($mem_obj-work_email1!=='')
  $vars["work_email1"] = "input type=hidden name=work_email1
value=$mem_obj-work_email1";

 if ($mem_obj-work_email2!=='')
  $vars["work_email2"] = "input type=hidden name=work_email2
value=$mem_obj-work_email2";

Any help is much useful to me.

Thanks in advance.

~ Karthick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] any other way ?

2001-04-04 Thread TV Karthick Kumar

Hi

Following is the piece of code, which I am struggling with, now  the
problem is:

I just want to display 4 email address in a textarea and mail them. The
case here is, the available email address has to displayed and as I have
maximum 4 email addresses coming up dynamically, I might get all the
combinations, like 12, 13, 14, 23, 34 etc. Depending upon that I just
want to split them up, with a separation and that's a comma (,).

If I have the following piece of code executed, it just prints two
commas in between, in the case of 1st email address and the 4th email
address - like this: [EMAIL PROTECTED],,[EMAIL PROTECTED] (note
two commas in between the email addresses)

Instead I would like to get rid of one comma in between the email
address and just display and sepearte it with only comma, instead of two
commas and it should work for all the combinations that's possible.

What are the possible ways to do that ?. Even I am trying out here.

My Code:

   if ($svars[home_email1]!=='')
   {
$vars["send_email"] .= $svars["home_email1"];
   }
   if ($svars[home_email2]!=='')
   {
$vars["send_email"] .= $comma;
$vars["send_email"] .= $svars["home_email2"];
   }
   if ($svars[work_email1]!=='')
   {
$vars["send_email"] .= $comma;
$vars["send_email"] .= $svars["work_email1"];
   }
   if ($svars[work_email2]!=='')
   {
$vars["send_email"] .= $comma;
$vars["send_email"] .= $svars["work_email2"];
   }

Thanks in advance.

~ Karthick
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Monthly Drawing Winner!

2001-04-04 Thread TV Karthick Kumar

Can't we just get rid of this spam: [EMAIL PROTECTED] and not allow to
continue.
I am sure the list master (in php.net) can do it, for the sake of the list.
Hope he's hearing !.
It's a requisition.

Thanks in adv.

~ Karthick

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 04, 2001 5:17 PM
Subject: [PHP] Monthly Drawing Winner!



 Dear PhpList wives (E-mail),

 Congratulations! You just won US$10.00!!

 We just gave away US$25,000.00!!  And you PhpList wives (E-mail) are among
the lucky 2500 people
 randomly selected to receive a FREE US$10.00 Trial Account at
TheCasino.com - the
 Internet's Premier Online Casino!

 Account Status for PhpList wives (E-mail):
 Live Account Balance: US$5.00  (your cash account)
 Live Buffer Balance:  US$5.00  (for extended play!)

 To access your "Winning Account", please go to:


http://special.TheCasino.com/drawing.cs?winner=PhpListlastname=(E-mail)add
[EMAIL PROTECTED]


 Again, congratulations to you PhpList wives (E-mail), and to the rest of
our
 most recent instant money winners!!

 Enjoy your VIP visit to TheCasino.com!

 Sincerely,

 Ms. Kaara Moore
 Director of Relations
 [EMAIL PROTECTED]
 http://www.TheCasino.com

 TheCasino.com - Better Than Life!! (TM)
 Serving Winners since 1999 - Now with 100% Bonus on Every Deposit!


 ==
 If you no longer wish to be considered for future Prize Give-Aways, please
click on the
 following link to remove yourself from our drawings:

 http://www.TheCasino.com/remove.me?[EMAIL PROTECTED]
 ==


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] test

2001-03-26 Thread TV Karthick Kumar

Is the list alive ?

~ K



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Fw: test

2001-03-26 Thread TV Karthick Kumar


- Original Message - 
From: "TV Karthick Kumar" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 26, 2001 3:16 PM
Subject: test


 Is the list alive ?
 
 ~ K
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PWS PHP

2001-02-16 Thread TV Karthick Kumar

Hi

First you have to down the NT version of php from php.net and also
configure it and make it work. Then if you want any database to be working
with it, then you should also download mysql from mysql.com and start the
server and try to connect to mysql from php. Then you are done and you can
thereafter go ahead with your programming.

Also look at tutorials and mail archives at:
hotwired.com
devshed.com
mysql.com
php.net
phpbuilder.com
marc.theaimsgroup.com
webmonkey.com
zdnet.com
and many more..

Hope this helps.

~ Karthick

- Original Message -
From: B Satish , Gurgaon [EMAIL PROTECTED]
To: Ankur Verma [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, February 16, 2001 12:52 PM
Subject: RE: [PHP] PWS  PHP





 Dear sir

 i am working on windows NT PC and i want to run PHP programs on that
 and i have Personal Web server in my Pc.
 to run PHP Applications what should i need to download?
 some sort of PHP compiler or intepreter to compile and execute.
 can you please suggest me the name of that and the url's .


 Thanks in advace
  This has been extensively covered in a step by step process in the PHP
  Manual Installation Chapter
 
  http://www.php.net/manual/en/install.iis.php
 
  follow the steps and you will have php working just fine with PWS
 
  best regards
 
  Ankur Verma
  HCL Technologies
  A1CD, Sec -16
  Noida, UP
  India
 
 
  - Original Message -
  From: "kaab kaoutar" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Thursday, February 15, 2001 5:00 PM
  Subject: [PHP] PWS  PHP
 
 
  
   Hi!
   How can i make my web server PWS parse html file into PHP? cause it
  shows
   nothing when i include php in an html file.However it works when i put
  it
  in
   a php file !
   Thanks
  
  
 
_
   Get Your Private, Free E-mail from MSN Hotmail at
  http://www.hotmail.com.
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Hosting in UK

2001-02-07 Thread TV Karthick Kumar

Hi List,

Can any body suggest / recommend me a good web hosting provider ?.
I want to register some domains and host with the same provider which
essentially has php, mysql, postgresql  good support.

Pls. let me know.

Thanks in adv.

~ Karthick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP4 Changelog

2001-02-07 Thread TV Karthick Kumar

Hi List

As I am working on the upgradation of my system into PHP 4.0 from the
lower version, I want the Change log in a good format. A word document or
some other good format which comprises the complete the Change log would be
great for me to look through and do the upgradation process in the right
direction. As I got the change log from php.net, I couldn't format them
perfectly as I wanted, bcoz I want print it out also. But the formation is
not good enough.

Could some body send the good formatted change log to me (if you have),
so that it'll b helpful to me for the upgradation process.

Thanks in adv.

~ Karthick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Any good way ?

2001-01-19 Thread TV Karthick Kumar

Hi all

I have written the following code, but I dont' think it's a good way to
write like this. Is there some other way to do good programming for this ?!


**
   if ($f)
   {
$SQL .= " (FIRST_NAME like '%$f%') AND ";
   }
   if ($l)
   {
$SQL .= " (LAST_NAME like '%$l%') AND ";
   }
   if ($em)
   {
$SQL .= " (HOME_EMAIL1 like '%$em%') OR (HOME_EMAIL2 like '%$em%') OR
(WORK_EMAIL1 like '%$em%') OR (WORK_EMAIL2 like '%$em%') ";
   }

**

Any help is appreciated very much.

Thanks in adv.

~ Karthick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Any good way ?

2001-01-19 Thread TV Karthick Kumar

Hi

Thanks for your mail. But this is okay if I have only one variable, in
this case as per the manual it is: $i , but what'll happen if I have more
than two, and now I have three variables in my form to be checked and can it
be done in the Switch method ?. If yes, then pls. tell me how.

Pls. help me. Thanks in advance.

~ Karthick

 maybe I'm over simplifying... my apologies if I am but it looks like
you're
 testing each variable as a boolean value i.e. if(TRUE) so why not use a
 switch/case statement... easier to write and saved on extraneous curly
 syntax... look here

 http://www.php.net/manual/en/control-structures.switch.php



 -Original Message-
 From: TV Karthick Kumar [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 19, 2001 10:40 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP] Any good way ?


 Hi all

 I have written the following code, but I dont' think it's a good way
to
 write like this. Is there some other way to do good programming for this
?!



 **
if ($f)
{
 $SQL .= " (FIRST_NAME like '%$f%') AND ";
}
if ($l)
{
 $SQL .= " (LAST_NAME like '%$l%') AND ";
}
if ($em)
{
 $SQL .= " (HOME_EMAIL1 like '%$em%') OR (HOME_EMAIL2 like '%$em%') OR
 (WORK_EMAIL1 like '%$em%') OR (WORK_EMAIL2 like '%$em%') ";
}


 **

 Any help is appreciated very much.

 Thanks in adv.

 ~ Karthick



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Urgent: Special Characters

2001-01-12 Thread TV Karthick Kumar

Hi all,

I have a problem while converting the string into upper case by using
the strtoupper function.

I want to convert the string which has some special characters in it.
For example, med vnlig hlsning, Antnio etc. There are lots of strings /
words with some special characters in it. It cannot be listed.

As I want to convert them into upper case, I tried.
strtoupper(hlsning), it's just converting it as: HLSNING and then writes
onto the database. But I want that special character - '  ' also to be
converted into upper case and then onto the database. How do I get rid of
this problem and convert into upper case ?.

PLS. HELP ME.

Thanks in advance.

~ Karthick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Special Characters

2001-01-12 Thread TV Karthick Kumar

Thanks a million for your mail. It's very helpful for me.

This is fine. But can I use this for all the Special Characters. I mean,
this should NOT be working only with one language or so. I want this to be
working with all the Special Characters and Languages available in this
world.

Pls. give me more info on this.

Thanks,
~ Karthick


You wrote a swedish sentence :-)

U can use strtr to exchange characters in a string, based on a list of chars
to be changed, like:

?
$string = "Vnlig hlsning Andr";
$newstring = strtoupper(strtr( $string, "",
"" ));
echo $newstring;
?

Probably
-----Original Message-
From: TV Karthick Kumar [mailto:[EMAIL PROTECTED]]
Sent: 12. januar 2001 13:20
To: Bryne Jrg Vidar
Subject: Re: [PHP] Urgent - Special Characters


Hi

Can you write me in English ?. It seems that you are helping me. But I
want to get it in English.

PLEASE HELP ME.

Thanks,
~ Karthick

- Original Message -
From: Bryne Jrg Vidar [EMAIL PROTECTED]
To: TV Karthick Kumar [EMAIL PROTECTED]
Sent: Friday, January 12, 2001 12:06 PM
Subject: RE: [PHP] Urgent - Special Characters


Hva med en rask lsning:
strtr( "Vnlig", "", "" )


-Original Message-
From: TV Karthick Kumar [mailto:[EMAIL PROTECTED]]
Sent: 12. januar 2001 13:02
To: [EMAIL PROTECTED]
Subject: [PHP] Urgent - Special Characters


Hi all,

I have a problem while converting the string into upper case by using
the strtoupper function.

I want to convert the string which has some special characters in it.
For example, med vnlig hlsning, Antnio etc. There are lots of strings /
words with some special characters in it. It cannot be listed.

As I want to convert them into upper case, I tried.strtoupper(hlsning),
it's just converting it as: HLSNING and then writes
onto the database. But I want that special character - '  ' also to be
converted into upper case and then onto the database. How do I get rid of
this problem and convert into upper case ?.

PLS. HELP ME.

Thanks in advance.

~ Karthick



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Special Characters

2001-01-11 Thread TV Karthick Kumar

PHP 3.0.17 with Oracle db

Hi all,

I am working on a search functionality where in I dont' get the exact
search results if the user types in a name with special characters like: med
vnlig hlsning, Antnio etc. and characters like: 

I dont' know whether there's any built in functions for recognising
these special characters or not. If yes, pls. tell me where can I get the
information about that from ?, and if not, how can I go about it ?. I dont'
want to hard code all the special characters either. Whatever special
characters I enter, it should cross check the database and give me the
results properly. If this is not clear, pls. let me know so that I can
explain you all once again.

Pls. help me out in this issue.

Thanks in advance.

~ Karthick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]