Previous Thread
Next Thread
Print Thread
Rate Thread
#104442 04/29/2002 2:14 AM
Joined: Apr 2002
Posts: 24
Junior Member
Junior Member
Offline
Joined: Apr 2002
Posts: 24
hi.

i've al little problem (again laugh ) but this time REALLY in PHP.

[code][/code]so the Row "Status" is a MySQL DB Row.
I Want

if $row["Status"] = 1 then echo "Active" else echo "Inactive"

But I'm not a good programmer (i only know include in PHP laugh ), so could anybody help me ?

@LK If this is the wrong fourm again, so no fear to move laugh

thanks.

Sponsored Links
#104443 04/29/2002 5:52 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
if ($row["Status"] == 1) { echo "Active"; } else { echo "Inactive"; }

I think tipsy

#104444 04/29/2002 7:19 AM
Joined: Apr 2002
Posts: 24
Junior Member
Junior Member
Offline
Joined: Apr 2002
Posts: 24
hmm this is a beginning, but hr only displays "Inactive", no matter what $row["Status"] is.

ähm here is the "compleate" part
[code][/code]

#104445 04/29/2002 7:22 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Did I tell you to put "" before/after 1? Try without it, maybe

Also, I guess you can use:
if ($row["Status"] == 1) echo "Active" else echo "Inactive";
?

#104446 04/29/2002 7:23 AM
Joined: Apr 2002
Posts: 24
Junior Member
Junior Member
Offline
Joined: Apr 2002
Posts: 24
no, because it's inside a HTML Part.

Without the "" I Tried too, but this didn't worked too.

Sponsored Links
#104447 04/29/2002 7:34 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
quote:
Originally posted by Shark5060:
no, because it's inside a HTML Part.

confused

#104448 04/29/2002 7:38 AM
Joined: Apr 2002
Posts: 24
Junior Member
Junior Member
Offline
Joined: Apr 2002
Posts: 24
ehm ok other way....

when I whrite it WITHOUT the then the script will display "if($row["Status]........"
and WITH the it displays "Inactive". Better ?

#104449 04/29/2002 7:39 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
I meant to put the code above INSIDE tipsy

#104450 04/29/2002 8:53 AM
Joined: Apr 2002
Posts: 24
Junior Member
Junior Member
Offline
Joined: Apr 2002
Posts: 24
I think you mean:

Code
[/code]and then in the other <? and ?>

[code]
but then I get the same result...

#104451 04/29/2002 9:30 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Not really, I think I mean:
[code][/code]tipsy

Sponsored Links
#104452 04/29/2002 9:32 AM
Joined: Apr 2002
Posts: 24
Junior Member
Junior Member
Offline
Joined: Apr 2002
Posts: 24
ehm laugh laugh laugh

Call me an idiot or something else...

My Script should connect to the Server first, before it makes "decicions" laugh

sorry...

and thanks for help.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)