Results 1 to 8 of 8
  1. #1
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default Help with Scritp...

    Im making a DJ Emails List for Kristal Panel (I think its called that)
    and heres the code:
    PHP Code:
    <?php
    if(isset($_SESSION["EON_CNTPNL_USERNAME"]))
    $check->login(); }
    else{
    session_start();
    $check = new checklogin;
    $check->login(); }
    ?>
    <?php
    echo("<b>DJ Emails</b><br/>Keep In contact with the DJ's<br/><br/>");
    switch(
    $_GET["act"])
    $fetch mysql_fetch_array(mysql_query("SELECT `username`, `email` FROM `users`");
    echo(
    "<b>{$fetch["username"]}</b> - {$fetch["email"]}");
    break;
    default:
    }
    ?>
    But I keep getting a message:
    PHP Code:
    Parse errorsyntax errorunexpected T_VARIABLEexpecting ':' or '{' in /home/crazyhab/public_html/staff/emails.php on line 12 

    What do I need to do?
    Last edited by Moh; 03-01-2007 at 04:46 PM.

  2. #2
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?php
    if(isset($_SESSION["EON_CNTPNL_USERNAME"]))
    $check->login(); }
    else{
    session_start();
    $check = new checklogin;
    $check->login(); }
    ?>
    <?php
    echo("<b>DJ Emails</b><br/>Keep In contact with the DJ's<br/><br/>");
    switch(
    $_GET["act"])
    $fetch mysql_fetch_array(mysql_query("SELECT `username` `email` FROM `users`");
    echo(
    "<b>{$fetch["username"]}</b> - {$fetch["email"]}");
    break;
    default:
    }
    ?>
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  3. #3
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    still get error

  4. #4
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?php
    if(isset($_SESSION["EON_CNTPNL_USERNAME"]))
    $check->login(); }
    else{
    session_start();
    $check = new checklogin;
    $check->login(); }
    ?>
    <?php
    echo("<b>DJ Emails</b><br/>Keep In contact with the DJ's<br/><br/>");
    switch(
    $_GET["act"]);
    $fetch mysql_fetch_array(mysql_query("SELECT `username`, `email` FROM `users`");
    echo(
    "<b>{$fetch["username"]}</b> - {$fetch["email"]}");
    break;
    default:
    }
    ?>
    Try that.

  5. #5
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Parse error: syntax error, unexpected ';', expecting ':' or '{' in /home/crazyhab/public_html/staff/emails.php on line 11

    Nope

  6. #6
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?php 
    if(isset($_SESSION["EON_CNTPNL_USERNAME"])) 
    $check->login(); } 
    else{ 
    session_start(); 
    $check = new checklogin
    $check->login(); } 
    ?> 
    <?php 
    echo("<b>DJ Emails</b><br/>Keep In contact with the DJ's<br/><br/>"); 
    switch(
    $_GET["act"]){
    $fetch mysql_fetch_array(mysql_query("SELECT `username`, `email` FROM `users`"); 
    echo(
    "<b>{$fetch["username"]}</b> - {$fetch["email"]}"); 
    break; 
    default: 

    ?>
    duh me

  7. #7
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    I got it working, but ill tell you if your script works :p
    Im gona add a few more features to Kristal Panel

  8. #8
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    For future references, just use if / else statements if you don't know how to use case's D:

    PHP Code:
     <?php  
    if(isset($_SESSION["EON_CNTPNL_USERNAME"]))  
    $check->login(); }  
    else{  
    session_start();  
    $check = new checklogin;  
    $check->login(); }  
    ?>  
    <?php  
    echo("<b>DJ Emails</b><br/>Keep In contact with the DJ's<br/><br/>");  
    $fetch mysql_fetch_array("SELECT `username`, `email` FROM `users`  ORDER BY `id` ASC");
    while(
    $zomfg mysql_fetch_array($fetch))
    {
    echo(
    "<b>{$zomfg["username"]}</b> - {$zomfg["email"]}");  
    }  
    ?>


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

Posting Permissions

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