Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Aug 2006
    Posts
    24
    Tokens
    0

    Default ite' wanna help me?

    PHP Code:
    <?
    ob_start
    ();
    include(
    'config.php');
    if(!
    $logged[username])
    {
    echo(
    "<font face=\"verdana\" size=\"1\">");
    }
    else 
    # Theyre Logged In
    {
    switch(
    $_GET[points]) # Allows Us To Use One Page For Whole Page
    {
    default:
    echo(
    "Welcome to the Bank <b>$logged[username]</b><br><br>What would you like to do today..<br /><br />+ <a href=\"?points=deposit\" style=\"text-decoration: none\">Deposit Points</a><br />+ <a href=\"?points=withdraw\" style=\"text-decoration: none\">Withdraw Points</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");

    case 
    'deposit':
    $find mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
    $f mysql_fetch_array($find);
    $points $f[points];
    if(
    $points == "0")
    {
    echo(
    "<font face=\"verdana\" size=\"1\"><b>Error;</b> You have no points..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
    }
    elseif(!
    $_POST[deposit])
    {
    echo(
    "<font face=\"verdana\" size=\"1\"><b>How many points would you like to deposit..</b><br><br>");
    echo(
    "<form method=\"POST\"><input type=\"text\" name=\"store\"><br><br>
    <input type=\"submit\" name=\"deposit\" value=\"Deposit\"></form>"
    );
    }
    else
    {
    $find mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
    $f mysql_fetch_array($find);
    $points $f[points];
    $store $_POST[store];
    if(
    $store $points)
    {
    echo(
    "<font face=\"verdana\" size=\"1\"><b>Error;</b> You do not have enough points to carry out this transaction..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
    }
    else
    {
    if(
    $store == NULL)
    {
    echo(
    "<font face=\"verdana\" size=\"1\"><b>Error;</b> You didnt enter an amount to deposit..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
    }
    else
    {
    $deposit $f[deposit];
    $calc $points $store;
    $add $store $deposit;
    $done mysql_query("UPDATE users SET deposit = '$add', points = '$calc' WHERE username = '$logged[username]'");
    echo(
    "<font face=\"verdana\" size=\"1\"><b>Thankyou</b><br><br>Your transaction was successfull and $store points were added to your bank account..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
    }
    }
    }
    break;


    case 
    'withdraw':
    $find mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
    $f mysql_fetch_array($find);
    $withdraw $f[deposit];
    if(
    $withdraw == "0")
    {
    echo(
    "<font face=\"verdana\" size=\"1\"><b>Error;</b> You have no points..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
    }
    elseif(!
    $_POST[withdraw])
    {
    echo(
    "<font face=\"verdana\" size=\"1\"><b>How many points would you like to deposit..</b><br><br>");
    echo(
    "<form method=\"POST\"><input type=\"text\" name=\"take\"><br><br>
    <input type=\"submit\" name=\"withdraw\" value=\"Withdraw\"></form>"
    );
    }
    else
    {
    $find mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
    $f mysql_fetch_array($find);
    $withdraw $f[deposit];
    $take $_POST[take];
    if(
    $take $withdraw)
    {
    echo(
    "<font face=\"verdana\" size=\"1\"><b>Error;</b> You do not have enough points to carry out this transaction..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
    }
    else
    {
    if(
    $take == NULL)
    {
    echo(<
    font face=\"verdana\" size=\"1\"><b>Error;</b> You didnt enter an amount to withdraw..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
    }
    else
    {
    $deposit $f[deposit];
    $calc $deposit $take;
    $grab $take $points;
    $done mysql_query("UPDATE users SET points = '$grab', deposit = '$calc' WHERE username = '$logged[username]'");
    echo(
    "<font face=\"verdana\" size=\"1\"><b>Thankyou</b><br><br>Your transaction was successfull and $take points were withdrawn from your bank account..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
    }
    }
    }
    break;

    }
    }
    ?>
    it ses unexpected < on line 86 but i cnt find n e fing help me pls

  2. #2
    Join Date
    Aug 2006
    Location
    Doncaster, UK
    Posts
    479
    Tokens
    0

    Default

    Depends, which is line 86.

    It might be
    PHP Code:
    if($take == NULL

  3. #3
    Join Date
    Aug 2006
    Posts
    24
    Tokens
    0

    Default

    well i dno but it dnt work

  4. #4
    Join Date
    Aug 2006
    Location
    Doncaster, UK
    Posts
    479
    Tokens
    0

    Default

    Point out which is line 86.

  5. #5
    Join Date
    Aug 2006
    Posts
    24
    Tokens
    0

    Default

    i dno do i count da gaps

  6. #6
    Join Date
    Aug 2006
    Location
    Doncaster, UK
    Posts
    479
    Tokens
    0

    Default

    Count the lines

  7. #7
    Join Date
    Aug 2006
    Posts
    24
    Tokens
    0

    Default

    yh but does dat me da lines wivout txt on dem

  8. #8
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    echo(<font face="verdana\" size=\"1\"><b>Error;</b> You didnt enter an amount to withdraw..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
    thats line 86
    Last edited by Colin-Roberts; 25-08-2006 at 10:27 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  9. #9
    Join Date
    Aug 2006
    Posts
    24
    Tokens
    0

    Default

    dats like 4 lines tho..........

  10. #10
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    no its only 1 i just broke it into 4 so page doesnt scroll.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


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
  •