[PHP-DB] login script

2004-04-26 Thread andy amol
hi,
  does anyone have a login script which will take data from the table and decide 
whether the given user is a admin or a normal user.
thanks in advance.
 
Also if there is some help on session variable I would like to know.


-
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

[PHP-DB] How to display table columns

2004-04-25 Thread andy amol
hi,
  I want to display the table coulumns along with those values below it. I am only 
able to display the table values, now I want to diplay the corresponding table 
attribut above the value.
 
eg : name age sex
   abc1m
   xyz 2f
 
I want to display name, age and sex.
 
I am using mysql as database.
 
thanks in advance.
 


-
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢

Re: [PHP-DB] Drop-down box in php

2004-04-20 Thread andy amol
hi,
   I am using the following code, but it is not populating my script. If you can help 
I would be grateful.
  I am using mysql as database.
$typedesc"; 
} 
?> 
 
 
 

thanks.

"John W. Holmes" <[EMAIL PROTECTED]> wrote:
From: "andy amol" 

> I would like to know how to create and populate drop down boxes in php.
> I want the value to be populated from database.
> What I am try to do is to provide the forign key value as combo box
option, so that I do not have to check for referential integrity.

You still have to check. Just because you provide a discreet number of
options in a  box doesn't mean that's really all the user can choosefrom. There are 
many ways to manipulate the data.That being said, just create a loop as you draw items 
from your database.echo '';
$sql = "SELECT name FROM products WHERE ...";
$result = query($sql);
while($row = fetch_assoc($result))
{ echo "{$row['name']}\n"; }
echo "";

I don't know what database you're using, so query() and fetch_assoc() are
generic.

---John Holmes...

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


-
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢

[PHP-DB] Drop-down box in php

2004-04-20 Thread andy amol
hi,
   I would like to know how to create and populate drop down boxes in php.
I want the value to be populated from database.
What I am try to do is to provide the forign key value as combo box option, so that I 
do not have to check for referential integrity.
 
Also if you can help me with a date validation program I will be grateful.
 
Thanks in advance.





-
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢

[PHP-DB] Drop-down box in php

2004-04-20 Thread andy amol
hi,
   I would like to know how to create and populate drop down boxes in php.
I want the value to be populated from database.
What I am try to do is to provide the forign key value as combo box option, so that I 
do not have to check for referential integrity.
 
Thanks in advance.




-
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢

Re: [PHP-DB] Re: Regular Expression

2004-04-19 Thread andy amol
hi,
  Thanks for the reply.
I want to know how to include char "-" i.e a dash . I want to test for it.
eg: COSC-3006.
I should be able to test that string as valid.
Also is there a way in which the form validation fails but when the user goes back to 
the same form its previous values are retained.
 
eg: Suppose the user enters its name, age and phone number.
 But the phone number is wrongly entered. Then he goes back, the old values should 
still be displayed. Only the phone number should be cleared.
 
Also how to program for such a back button.
In what I have done is simply called the previous form, so it clears all the values.
Any help in appreciated.
 
Thanks in advance.
bye.
Kelly Hallman <[EMAIL PROTECTED]> wrote:
Apr 18 at 11:01pm, Andy Ladouceur wrote:
> Andy Amol wrote:
> > I would like to test whether a given sting contains only character, it
> > should also support spaces. eg "Course Book String". I am able to test
> > "CourseBookString". Also I would like to know how can we avoid wild
> > chars like *, or any other char apart from alpha numeric char.
>
> A regexp like this should work:
> /^([a-zA-Z]|\s)+$/

/^[A-Za-z\s]+$/ would be a better way of putting it.
however, \s would match tabs (also CR and/or LF in some regex engines).

to only alpha or space, this would work best:
/^[A-Za-z ]+$/

-- 
Kelly Hallman

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


-
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢

[PHP-DB] Regular Expression

2004-04-18 Thread andy amol
Hi,
   I would like to test whether a given sting contains only character, it should also 
support spaces.
eg "Course Book String". I am able to test "CourseBookString".
 
Also I would like to know how can we avoid wild chars like *, or any other char apart 
from alpha numeric char.
 
Thanks.


-
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢

[PHP-DB] Basic Doubts

2004-04-16 Thread andy amol

hi,
   I want to know the following things.

1. How can we maintain referential integrity (rather check) using PHP
Any example code will be helpful.

2. I want to display the column of the tables, how to do that.

3. I want to align the text and the text box on the page.

4. I also want to check the validation of text(numerical or text)

Any example script would be helpful.

thanks in advance.


 


-
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th

[PHP-DB] Hi I am new to PHP

2004-04-15 Thread andy amol
Hi,
I have a problem with the second file. I am not able to update the 
data from the php program. Any help on that would be appreciated. 
Any modification which would be reduce the code like directly using the 
Update command would be appreciated.
thanks in advance.
 
My exact problem with second file is as follows:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource on 
line 15


Here are the 3 files.

File1
---
Book Update Form

";
print "\n";
while ($get_info = mysql_fetch_row($result)){ 
print "\n";
foreach ($get_info as $field) 
print "\t$field\n";
print "\n";
}
print "\n";
mysql_close($link);
//
?>



Enter ISBN Number to Edit: 






File 2
-
Book change form





Edit and Submit



">
ISBN:">
Title:   ">
Author:  ">
Edition: ">
Course Id:   ">
Quantity:">
Stack Number:">






//
File 3

Book Change Record


















-
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th

[PHP-DB] Hi I am new to PHP

2004-04-15 Thread andy amol

I have posted my problem at No: 33892 of this mailing list. I have received 1 reply. 
No: 33897

My exact problem with second file is as follows:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource on 
line 15


Can you help me to solve problem, any help would be appreciated.

Thanks.



-
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th

[PHP-DB] I am new to PHP

2004-04-14 Thread andy amol
Hi,
I have a problem with the second file. I am not able to update the 
data from the php program. Any help on that would be appreciated. 
Any modification which would be reduce the code like directly using the 
Update command would be appreciated.
thanks in advance.
Here are the 3 files.

File1
---
Book Update Form

";
print "\n";
while ($get_info = mysql_fetch_row($result)){ 
print "\n";
foreach ($get_info as $field) 
print "\t$field\n";
print "\n";
}
print "\n";
mysql_close($link);
//
?>



Enter ISBN Number to Edit: 






File 2
-
Book change form





Edit and Submit



">
ISBN:">
Title:   ">
Author:  ">
Edition: ">
Course Id:   ">
Quantity:">
Stack Number:">






//
File 3

Book Change Record

















-
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th

[PHP-DB] I am new to PHP

2004-04-14 Thread andy amol

Hi. This is the qmail-send program at pb1.pair.com.I'm afraid I wasn't able to deliver 
your message to the following addresses.This is a permanent error; I've given up. 
Sorry it didn't work out.<[EMAIL PROTECTED]>:ezmlm-manage: fatal: I don't accept 
messages at this address (inlocal and/or inhost don't match) (#5.1.1)Hi,I have a 
problem with the second file. I am not able to update the data from the php program. 
Any help on that would be appreciated. Any modification which would be reduce the code 
like directly using the Update command would be appreciated.thanks in advance.Here are 
the 3 files.File1---Book Update 
Form";print "\n";while ($get_info = mysql_fetch_row($result)){ print 
"\n";foreach ($get_info as $field) print "\t$field\n";print "\n";}print 
"\n";mysql_close($link);//?>Enter ISBN Number to Edit: File 
2-Book change 
formEdit and 
Submit">ISBN:">Title:   ">Author:  ">Edition: ">Course Id:   ">Quantity:">Stack Number:">//File 
3Book Change 
Record



-
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th