Re: [PHP-DB] weird php error

2003-08-29 Thread Kieu D. Trang
try

if (isset($_GET['login']) AND $_GET['login'] == 'forgot')
KD

On Fri, 29 Aug 2003, Tiberiu Ardeleanu wrote:

 Try:

  if ($_GET['login'] == 'forgot')


 - Original Message -
 From: OpenSource [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 29, 2003 7:38 AM
 Subject: [PHP-DB] weird php error


  Hi guys,
 
  This is weird to me..
  I got this script
  ---
  ?php
 
  if ($_GET[login] == 'forgot')
  {
  echo Sorry  I forgot my password;
  }
  else { echo you are good to go; }
 
  ?
  -
  when ran, it gives me this error
 
  
  Notice: Use of undefined constant login - assumed 'login' in
  G:\Inetpub\wwwroot\test\index.php on line 3
 
  Notice: Undefined index: login in G:\Inetpub\wwwroot\test\index.php on
  line 3 good to go
 
  What is this all about?
  The script look fine to me.
 
  Thanks in advance for your support
 
 

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



Re: [PHP-DB] mysql_fetch_array issues.

2003-07-09 Thread Kieu D. Trang
this error only means that your msql_query($result) was correct, but did
not have any result...  meaning, there was nothing to select, there for
there is nothing to fetch...  hence you can not do a msql_fetch_array() on
an empty result set.

KD


On Wed, 9 Jul 2003, Greg Hetrick wrote:

 Yup, I have all permissions -- it appears that I can access mysql but not
 the database itself.

 Gary Every [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 .
  Do you have select permissions on that DB/table?
 
  If you have GRANT permissions, try
  GRANS SELECT, INSERT, UPDATE, DELETE ON db.tablename to
  'youruser'@'your.ip.address' IDENTIFIED BY 'yourpassword';
 
  your.ip.address can be substituted with localhost if you're on the same
 box.
 
 
  Gary Every
  Sr. UNIX Administrator
  Ingram Entertainment
  (615) 287-4876
  Pay It Forward
  mailto:[EMAIL PROTECTED]
  http://accessingram.com
 
 
   -Original Message-
   From: Greg Hetrick [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, July 09, 2003 12:31 PM
   To: [EMAIL PROTECTED]
   Subject: Re: [PHP-DB] mysql_fetch_array issues.
  
  
   I do not have the die statment -- the DB is the same except
   the name and I
   have double checked that I just did a back up of the previous
   db and moved
   it to the new server. I have done some more digging, my query
   appears to
   work, but I almost appears that I have a problem with selecting the
   database --
   if I comment out the mysql_select -- statment I get the same
   error, perhaps
   I just can't get to that DB.
   intresting.
  
   I guess I can assume at this point there is something flaky with my DB
  
  
   Jeffrey N Dyke [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
   
Do you have an 'or die(mysql_error())'  statement following your
mysql_query($result) line.  99% of the time, this error
   means your query
failed.  if it works on another serverare the fields
   the same, the
dbname, the tablename?
   
hth
jeff
   
   
   
  Greg Hetrick
  [EMAIL PROTECTED]To:
   [EMAIL PROTECTED]
  net cc:
   Subject:  [PHP-DB]
   mysql_fetch_array issues.
  07/09/2003 12:04
  PM
   
   
   
   
   
   
I am getting the following error when attempting to pull
   data out of a
mysql
DB
   
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
   result
resource in
   /home/pffl/public_html/pffl/webpage/html/dataentry.php on line
125
   
I can take this same code to a different web server and it
   is pulling
correctly!
   
I am currently running Apache 2.0.46 with PHP 4.3.2 I was
   running Apache
1.3.x with PHP 4.3.1 and getting the same thing, any ideas?
   here is the
chunk of code where I use the function.
   
while ($myrow=mysql_fetch_array($result))
{
?
option value=?print $myrow['name'];?, ?print
$myrow['team'];? ? echo $myrow[name]; ?/option
?
}
   
Any Ideas.
   
   
   
--
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
  
 



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



[PHP-DB] ideas for Affiliate Program.....

2003-06-24 Thread Kieu D. Trang
Hello all,

I am working on an Affiliate Program and need ideas or suggestions...
please email me if you have any suggestion

for now my program will keep track of an affiliate_id and the client_ip
address for future reward...  (i.e if the client buys anything, the
affiliate_id gets a credit...) but this system won't reward an affiliate
if for example, many clients use the same computer (same ip address) to
buy products...  then the affiliate_id is only credited once

Have anyone ever done anything similar and have other suggestions?  I am
working on it, but is still looking for better ways of doing it...  thanks
in advance..
KD


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



Re: [PHP-DB] ideas for Affiliate Program.....

2003-06-24 Thread Kieu D. Trang
Thanks Mike,
I downloaded and implemented that program to see how it works, but my
Affiliate Program will do so much more than that...  and is more
complicated  i know what to do... just have a little concern about not
paying Affiliates what they deserve...  I don't want to under pay or over
pay them...  just thought that i can't really think as good as many of
you...  so if you think there is a better way of tracking who gets what
credit, please let me know  as of right now, i am tracking them the
way i told you  Aff_id and Client_ip.
Thanks anyway..
KD


On Tue, 24 Jun 2003, mike karthauser wrote:

 on 24/6/03 4:59 pm, Kieu D. Trang at [EMAIL PROTECTED] wrote:

  Have anyone ever done anything similar and have other suggestions?  I am
  working on it, but is still looking for better ways of doing it...  thanks
  in advance..

 You want to look on sourceforge for a project called php affiliate. I think
 that should save you some time ;-)

 --
 Mike Karthauser
 Managing Director - Brightstorm Ltd

 Email[EMAIL PROTECTED]
 Web  http://www.brightstorm.co.uk
 Tel  0117 9426653 (office)
07939 252144 (mobile)

 SnailmailUnit 8, 14 King Square,
Bristol BS2 8JJ


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



Re: [PHP-DB] array fill/sort question

2003-06-10 Thread Kieu D. Trang
hi,

you can add the ip2long() function into your SELECT statement and have
an ORDER BY clause at the end like this...

SELECT s_id, subnet_name, ip2long('subnetaddr'), subnetmask,dnsdomain,
location, contact, ccn FROM subnets ORDER BY subnetaddrr;

hope it helps.
KD


On Tue, 10 Jun 2003, Snijders, Mark wrote:

 hi,

 I'm working on a ipaddres/subnet programm

 now i have a talbe with a lot of information about ip-addresses

 i'm having this query:

 SELECT s_id, subnet_name,subnetaddr,subnetmask,dnsdomain, location, contact,
 ccn FROM subnets

 the subnetaddr field looks like this : 100.20.20.1  and is ofcourse a
 varchar field

 BUT before displaying it on the screen i have to sort it by subnetaddr and
 then show it

 but i have to sort it as integer, so i use the php-function ip2long();

 so you get a decimal...

 so what i have to do:

 do the query make a decimal field of the 'subnetaddr' put it in an array,
 sort it and display it


 BUT how can i put ALL of the fields in the query in an array, sort it, and
 then display it?

 please help me, I can't work it out :(

 thanks, Mark



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