Skip to main content
Inspiring
January 16, 2007
Answered

writing if statements

  • January 16, 2007
  • 2 replies
  • 301 views
I keep getting an error with this code, maybe someone can help.
if ($group == "admin") {
$url = "web address"
}elseif ($group == "league") {
$url = "web address"
}else{
$url = "web address"
}
This topic has been closed for replies.
Correct answer Newsgroup_User
On Tue, 16 Jan 2007 16:53:00 +0000 (UTC), "justin wendorf"
<webforumsuser@macromedia.com> wrote:

>I keep getting an error with this code, maybe someone can help.
>if ($group == "admin") {
>$url = "web address"
>}elseif ($group == "league") {
>$url = "web address"
>}else{
>$url = "web address"
>}

You're missing semi-colons after the $url = lines.
--
Steve
steve at flyingtigerwebdesign dot com

2 replies

Newsgroup_UserCorrect answer
Inspiring
January 16, 2007
On Tue, 16 Jan 2007 16:53:00 +0000 (UTC), "justin wendorf"
<webforumsuser@macromedia.com> wrote:

>I keep getting an error with this code, maybe someone can help.
>if ($group == "admin") {
>$url = "web address"
>}elseif ($group == "league") {
>$url = "web address"
>}else{
>$url = "web address"
>}

You're missing semi-colons after the $url = lines.
--
Steve
steve at flyingtigerwebdesign dot com
Inspiring
January 16, 2007
What does the error say?


--
Nancy Gill
Adobe Community Expert
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner''s
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development

"justin wendorf" <webforumsuser@macromedia.com> wrote in message
news:eoivtc$6r$1@forums.macromedia.com...
>I keep getting an error with this code, maybe someone can help.
> if ($group == "admin") {
> $url = "web address"
> }elseif ($group == "league") {
> $url = "web address"
> }else{
> $url = "web address"
> }