Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: stoopid php.

  1. #1
    Join Date
    Sep 2006
    Posts
    450
    Tokens
    0

    Default stoopid php.

    why does this give me an unexpected T_ECHO...

    PHP Code:
    $category $row[category]

    echo(
    "
    <a href=\"index.php?view=tutorials\">Tutorial Index</a> > <a href=\"index.php?view=tutorials&category="
    .$category."\">$category</a> > ".$title."<br />
    <table width=\"100%\" style=\"border: 1px solid #BBCDA3;\">
          <tr>
    <td>
    $title by - ".$author." ($views Views)</td>
    </tr>
    <tr>
    <td>
     
    </td>
    </tr>
    <tr>
    <td>
    "
    .$tutorial."</td>
    </tr>
    "
    );

    echo(
    "
    <tr>
    <td>
    <br /><br />
    <a href=\"index.php?view=tutorials&action=report&id=
    $id\">Report This Tutorial</a>
    </td>
    </tr>
    "
    );

    echo(
    "
    </table>
    <br />
    "
    );
    if (
    mysql_num_rows($comments) == "0") {
    echo(
    "There are no comments!<br />"); 
    the line with the error is the first line on the above script.

  2. #2
    Join Date
    May 2006
    Posts
    451
    Tokens
    0

  3. #3
    Join Date
    Sep 2006
    Posts
    450
    Tokens
    0

    Default

    Will you just get lost pls mod wannabe.

  4. #4
    Join Date
    Apr 2006
    Location
    West Midlands
    Posts
    3,384
    Tokens
    0

    Latest Awards:

    Default

    A cautioned member giving advice ... well yer ryan should be coding section BUT techincally it is to do with web design so this is right forum too.


    Xbox Live: Jholder112233
    PS3 Online Tag: Josh-H

    Last.fm | Digg | Xbox.com

  5. #5
    Join Date
    May 2006
    Posts
    451
    Tokens
    0

    Default

    There is a coding section for a reason.

  6. #6
    Join Date
    Jun 2006
    Posts
    4,832
    Tokens
    0

    Latest Awards:

    Default

    Hey Ryan, shouldn't it be:

    PHP Code:
    $category $row[category];

    echo(
    "
    <a href=\"index.php?view=tutorials\">Tutorial Index</a> > <a href=\"index.php?view=tutorials&category="
    .$category."\">$category</a> > ".$title."<br />
    <table width=\"100%\" style=\"border: 1px solid #BBCDA3;\">
          <tr>
    <td>
    $title by - ".$author." ($views Views)</td>
    </tr>
    <tr>
    <td>
     
    </td>
    </tr>
    <tr>
    <td>
    "
    .$tutorial."</td>
    </tr>
    "
    );

    echo(
    "
    <tr>
    <td>
    <br /><br />
    <a href=\"index.php?view=tutorials&action=report&id=
    $id\">Report This Tutorial</a>
    </td>
    </tr>
    "
    );

    echo(
    "
    </table>
    <br />
    "
    );
    if (
    mysql_num_rows($comments) == "0") {
    echo(
    "There are no comments!<br />"); 
    ? You missed off the ; i think.

  7. #7
    Join Date
    Sep 2006
    Posts
    450
    Tokens
    0

    Default

    nope

  8. #8
    Join Date
    Jun 2006
    Posts
    4,832
    Tokens
    0

    Latest Awards:

    Default

    Try:

    PHP Code:
    $category $row['category'];

    echo(
    "
    <a href=\"index.php?view=tutorials\">Tutorial Index</a> > <a href=\"index.php?view=tutorials&category="
    .$category."\">$category</a> > ".$title."<br />
    <table width=\"100%\" style=\"border: 1px solid #BBCDA3;\">
          <tr>
    <td>
    $title by - ".$author." ($views Views)</td>
    </tr>
    <tr>
    <td>
     
    </td>
    </tr>
    <tr>
    <td>
    "
    .$tutorial."</td>
    </tr>
    "
    );

    echo(
    "
    <tr>
    <td>
    <br /><br />
    <a href=\"index.php?view=tutorials&action=report&id=
    $id\">Report This Tutorial</a>
    </td>
    </tr>
    "
    );

    echo(
    "
    </table>
    <br />
    "
    );
    if (
    mysql_num_rows($comments) == "0") {
    echo(
    "There are no comments!<br />"); 
    If that doesn't work I'm unsure, because I only know simple PHP :p

  9. #9
    Join Date
    Sep 2006
    Posts
    450
    Tokens
    0

    Default

    no soz.

    ty anyway!

    im normally good at spotting erros i must just be tired

    tom get yo fat assss on msn.

  10. #10
    Join Date
    Jun 2006
    Posts
    4,832
    Tokens
    0

    Latest Awards:

    Default

    I tried :p

    No problem.

    Lol, I've been on my DS all day xP

    Can't I'm on the really laggy computer =[

Page 1 of 2 12 LastLast

Posting Permissions

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