[PHP-DB] Help needed

2004-10-04 Thread Manoj Japher
hi,
 I am new to PHP and I am not sure if this is the right forum.

 I am trying to run PHP thro webmin using CGI scripts. PHP runs fine except that when 
I am trying to read variables coming thro' a form after hitting the submit button, I 
get NULL values.

 I can read and write to the database without any trouble. The problem is reading the 
form values.

Any help would be greatly appreciated.

Many Thanks,

Manoj


Life,it is not a problem to be solved, but 
a process to be managed.


Re: Re: [PHP-DB] Number Conversion

2002-10-18 Thread Manoj Japher
hi,
 thanks ryan, marco and matias for your quick response. Solved 
my
problem. Thanks once again.

Best Regards,

Manoj

On Fri, 18 Oct 2002 Marco Tabini wrote :
number_format():

http://ca.php.net/manual/en/function.number-format.php


On Thu, 2002-10-17 at 14:52, Manoj Japher wrote:
 hi,
   I would like to format my output. I would like to represent 
my
 integer outputs as 2,000 instead of 2000 which it prints by
 default.

 For e.g. I want 200 to be printed as 2,000,000

 Do we have any functions which does that?

 Thanks in advance,

 Best Regards,

 Manoj



 Life,it is not a problem to be solved, but
 a process to be managed.


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




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




Life,it is not a problem to be solved, but
a process to be managed.


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




[PHP-DB] Number Conversion

2002-10-18 Thread Manoj Japher
hi,
 I would like to format my output. I would like to represent my
integer outputs as 2,000 instead of 2000 which it prints by 
default.

For e.g. I want 200 to be printed as 2,000,000

Do we have any functions which does that?

Thanks in advance,

Best Regards,

Manoj



Life,it is not a problem to be solved, but
a process to be managed.


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



[PHP-DB] A Doubt

2002-08-28 Thread Manoj Japher

hi,
   I have a question. Hoping someone may help me out.

  Can a PHP page say file abcd.php access a variable $xyz which 
is
used in another file mnop.php? I mean can I refer to a 
variable
whose value has been set in some other file.
  The point is that the file mnop.php after finishing its query 
and
on a particular case loads abcd.php.

  The reason is, I need to check everytime the file abcd.php 
is
loaded, I should be able to determine that it was loaded by 
mnop.php
and not by typing in the complete URL to abcd.php on the Web 
Browser.

Hoping someone could tell me how if it is possible

Best Regards,

Manoj


'I have miles to go before I sleep, and promises to keep'

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




[PHP-DB] Mail Function

2002-08-27 Thread Manoj Japher

hi,
  I know this question is in the wrong group, but I hope someone 
maybe
able to help me out. I need to use the mail() function in my code 
to
send out mails which I am able to do successfully. But I am not 
able
to set the 'from address' in the mail I sent. It always varies. 
Can I
set the from address field as to my liking.

  I tried the following code

?
 $toaddress = [EMAIL PROTECTED];
 $fromaddress = [EMAIL PROTECTED];
 $subject = Test Mail;
 $content = Your username and password as you requested 
\n
.Username = user \n
.Password = pass \n;
 mail($toaddress, $subject ,$content, $fromaddress);
 echo  Your username and password has been mailed to you 
;
 ?

And the mail I got had the from address as
[EMAIL PROTECTED]

Can someone help me out please

Best Regards,

Manoj


'I have miles to go before I sleep, and promises to keep'

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




[PHP-DB] Date Subtraction

2002-08-21 Thread Manoj Japher

hi,
  Is there any way I can get previous day's date, like we get 
current
date by using getdate() or date() function. I mean is there some
in-built function in PHP which can subtract date to give me
yesterday's date.
  I am currently calculating it using some code, which I have 
written
and it is very tirng and recursive to check for each possible 
case.

  If someone has solved this before pls let me know.

Thanks,

Regards,

Manoj


'I have miles to go before I sleep, and promises to keep'

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




Re: Re: [PHP-DB] Date Subtraction

2002-08-21 Thread Manoj Japher

hi,
  hey you are bang on target. It did solve my problem.

Thanks a lot,

Manoj

On Wed, 21 Aug 2002 [EMAIL PROTECTED] wrote :

if you really just want yesterday, i use date(Y-m-d, time() -
86400);

that way you'll get the correct info, no matter if it spans 
weeks,
months,
years etc

i realize there could be flaws with this b/c it just subtracts
24hours, but
it works



 Manoj  Japher
 manojjapher@redif   To:
[EMAIL PROTECTED]
 fmail.com   cc:
  Subject: 
[PHP-DB]
Date Subtraction
 08/21/2002 02:23
 PM
 Please respond to
 Manoj  Japher






hi,
   Is there any way I can get previous day's date, like we get
current
date by using getdate() or date() function. I mean is there 
some
in-built function in PHP which can subtract date to give me
yesterday's date.
   I am currently calculating it using some code, which I have
written
and it is very tirng and recursive to check for each possible
case.

   If someone has solved this before pls let me know.

Thanks,

Regards,

Manoj


'I have miles to go before I sleep, and promises to keep'

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






'I have miles to go before I sleep, and promises to keep'

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




[PHP-DB] Help Needed

2002-08-01 Thread Manoj Japher

hi,
  I have started working with PHP-MySQL recently. I have been 
getting a
warning message which i am not able to debug. Could some one  pls 
help
me out?

The message is
Warning: mysql_num_rows(): supplied argument is not a valid 
MySQL
result resource in /usr/local/apache2/htdocs/verify.php on line 
37

The code is
   
$db=mysql_pconnect(localhost:/var/lib/mysql/mysql.sock,,);
 

   if(!$db)
   {
echo  The Server is Busy. Please Try Later ;
exit;
   }


  mysql_select_db(userinfo);

  $query = select * from userinfo;

  $mysql_results = mysql_query($query,$db);

line 37:$num_result = mysql_num_rows($mysql_results);

  if($num_result == 0)
   {
 echo PInvalid Username or Password entered/P;
 exit;
   }

Regards,

Manoj


'I have miles to go before I sleep, and promises to keep'

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