Hi Jeff

in ur code u are comparing this if ($thetype == "standard") 

if i got ur purpose correctly 

$thetype this is the variable which u are using for fetching the
records, now u have to compare it with databse values.

but u r comparing it with the variable $thetype

insteed of this u should use

$row = mysql_fetch_assoc(result3);
and compare it as

if ($row['type'] == "standard")


try the code i thing it will work and solve ur problem.

bye
BABAL

--- In [email protected], Jeffrey Cook <[EMAIL PROTECTED]> wrote:
>
> Pam,
>    
>   I agree with you.  I do not believe we are discussing a design
issue.  I have already finished the design and have built the
environments and it is working.  So I wish to continue discussing my
coding issues publically in this forum.  That's what groups like these
are for, for sharing code.
>    
>   Okay, so I have got this problem working by creating different
environments, copies of each page for the different type of membership
and one for when the member is signed out.  All the "signed out" users
are taken to .htm files and the logged in members are taken to .php
files.  I had a drop down box below the username and password for
login as a certain type.  If they selected STANDARD type and submitted
the form, they would be taken to the STANDARD environment.  But, that
was only for testing purposes...and I had it working.  But I want the
code to check from the database which type the member signed up as and
take them automatically.  It is not working, but I have found the
location of the problem...it is in these lines:
>    
>   > $sql = "SELECT loginName FROM membership 
> >            WHERE loginName='$_POST[fusername]' 
> >            AND type='$thetype' ";
> > $result3 = mysql_query($sql)or die("Couldn't execute query 3.");   
> >  
> >     if ($thetype == "standard") 
>    
>   The code pulls the username (loginName) and membership type (type)
from the membership table exactly as they were working when the user
selected the type manually.  However, for some reason, the code simply
skips over the last statement above and does not see that $thetype and
standard are equal and goes to the else, which is not included above
but follows.
>    
>   I am looking at it and trying many different things, but I still
can't seem to pull it off.
>    
>   Can anyone help?  Did I type a command incorrectly?
>    
>   Thanks for any help.
>    
>   Jeff
> 
> Pam <[EMAIL PROTECTED]> wrote:
>   Well, I wouldn't want anyone yelling at you either. Its no problem.
> I was just thinking though that mingling php with html in a file is
as much
> a part of learning php as the code itself. Or at least it is
important with
> .asp.
> 
> Take care,
> Pam
> 
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> > Behalf Of Gerry Danen
> > Sent: Sunday, June 04, 2006 4:15 PM
> > To: [email protected]
> > Subject: Re: [php_mysql] Question about Login / Signout...
> >
> >
> > Pam, I have no problem doing that on
> > http://groups.yahoo.com/group/php_and_mysql/ because I own that
list. On
> > this list it might be considered off-topic, and I don't need
> > someone yelling
> > at me. :)
> >
> > Gerry
> >
> > On 6/4/06, Pam <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi Gerry,
> > > I'm new to the list, and very new to php. I have learned a lot
just from
> > > following everyone's conversations and would really like it if
you kept
> > > this
> > > on list if it is ok with everyone else because I feel like I
could learn
> > > from it.
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> > The php_mysql group is dedicated to learn more about the
> > PHP/MySQL web database possibilities through group learning.
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
> 
> 
> 
> The php_mysql group is dedicated to learn more about the PHP/MySQL
web database possibilities through group learning. 
> 
> 
> 
>   SPONSORED LINKS 
>         American general life and accident insurance company  
American general life insurance company   American general life    
American general mortgage   American general life insurance   Computer
internet security 
>     
> ---------------------------------
>   YAHOO! GROUPS LINKS 
> 
>     
>     Visit your group "php_mysql" on the web.
>     
>     To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>     
>     Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> 
>     
> ---------------------------------
>   
> 
> 
> 
>               
> ---------------------------------
> Be a chatter box. Enjoy free PC-to-PC calls  with Yahoo! Messenger
with Voice.
> 
> [Non-text portions of this message have been removed]
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to