SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Zealot DBallerz01's Avatar
    Join Date
    Jan 2004
    Location
    CT
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    anything wrong ?

    PHP Code:

    if ($invitestotal '0'
                  { } else {
                   echo 
    "<td><form action='post'><a href='invites.php?accept={$row['cid']}'>Accept</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='invites.php?deny={$row['cid']}'>Deny</a></td></form><tr>";} 
    is there anything wrong with this ?
    I get a parse error

  2. #2
    SitePoint Wizard Dangermouse's Avatar
    Join Date
    Oct 2003
    Posts
    1,024
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    if ($invitestotal == 0) {
    //do something
     
    } else { 
      echo 
    "<td><form action='post'><a href='invites.php?accept='".$row['cid']."'>Accept</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='invites.php?deny='".$row['cid']."'>Deny</a></td></form><tr>";

    Try that

  3. #3
    SitePoint Zealot DBallerz01's Avatar
    Join Date
    Jan 2004
    Location
    CT
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    same parse error

  4. #4
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    How about
    PHP Code:
    if ( $invitestotal != ) {
        echo 
    "<td><form action='post'><a href='invites.php?accept='".$row['cid']."'>Accept</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='invites.php?deny='".$row['cid']."'>Deny</a></td></form><tr>";


  5. #5
    SitePoint Zealot DBallerz01's Avatar
    Join Date
    Jan 2004
    Location
    CT
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    doesn't work

  6. #6
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Well whats your parse error? You need to give more information if you want people to help you.

  7. #7
    SitePoint Zealot DBallerz01's Avatar
    Join Date
    Jan 2004
    Location
    CT
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    eh, sorry for your trouble, but I fixed it, thanks for the help, the error wasn't related to that line, but a line above it. silly me

  8. #8
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Your code is still wrong though.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •