Simple PHP things for your site :P

Page 2 of 2 FirstFirst 12
Results 26 to 38 of 38
  1. #26
    Apprentice abdur14 is offline
    MemberRank
    Jan 2009 Join Date
    5Posts

    Re: Simple PHP things for your site :P

    eele gfto lol hou je bek oke?:P ik ben PLAYING van joun server GG die donator en btw ik heb eigen server maar ik weet niet hoe je website maakt kan je me helpe -.-?

  2. #27
    Status: Pooping eele is offline
    MemberRank
    Jul 2008 Join Date
    The NetherlandsLocation
    915Posts

    Re: Simple PHP things for your site :P

    Lol, weer concurrentie :P, btw houd het Engels...
    En nee sorry heb geen zin om te helpen :P

    Hold it on english plox.

  3. #28
    Account Upgraded | Title Enabled! nanowarior is offline
    MemberRank
    Sep 2008 Join Date
    200Posts

    Re: Simple PHP things for your site :P

    Can Any 1 translate on english Please, I dont know how.

  4. #29
    Account Upgraded | Title Enabled! sayuta is offline
    MemberRank
    Jan 2007 Join Date
    The NetherlandsLocation
    205Posts

    Re: Simple PHP things for your site :P

    PHP Code:
    <FORM method="post" action="<? echo $PHP_SELF;?>">
    <p>Character Name:
    <input name="aid" type="textfield" />
    <select name="sg">
    <option value="33334">Donatie Shotgun 1</option>
    <option value="33354">Donatie Shotgun 2</option>
    <option value="33359">Donatie Shotgun 3</option>
    </select>
    <input type="submit" value="Buy" name="koop" />
    </form>
    <?
    include('config.php');
    $naam anti_injection($_POST ["aid"]);
    $itemid anti_injection($_POST ["sg"]);
    $cid = ("SELECT CID FROM Character where Name='$naam'");
    $query odbc_exec($connect,$cid);
    odbc_fetch_row($query);
    $cidnr odbc_result($query1);
    if (isset(
    $_POST["koop"]))
    {
    if (empty(
    $naam))
    {
    echo (
    '<br>You have to fill in a character name!');
    }
    else
    {
    echo (
    '<br>Sucessfully bought item!');
    odbc_exec ($connect"INSERT INTO CharacterItem (CID, ItemID) VALUES ('$cidnr', '$itemid')"); 
    }
    }
    ?>

    AND

    PHP Code:
    <form method="post" action="<? echo $PHP_SELF;?>">
      <p><b>Character Name:</b>
          <input type="text" name="char" />
      </p>
      <p>
        <input type="submit" value="Search" name="search" />
      </p>
      </form>
    <?
    include ('config.php');
    $char $_POST["char"];
    $sql = ("SELECT Name,Level,XP,KillCount,Deathcount,Regdate,bp,sex FROM Character (nolock) where name='$char'");
    $query odbc_exec($connect,$sql);
    odbc_fetch_row($query);
    $sex odbc_result($query8);

    if( isset(
    $_POST['search']) )
                {
                            if (empty (
    $char))
                            {
    echo(
    "<font color=\"red\"><h1>You have not filled in a character!</h1></font>");
    }
    else
    {                       echo (
    '<b>Name: ');
                            echo 
    odbc_result($query1);
                            echo (
    '<br>');
                            echo (
    'Level: ');
                            echo 
    odbc_result($query2);
                            echo (
    '<br>');
                            echo (
    'XP: ');
                            echo 
    odbc_result($query3);
                                                    echo (
    '<br>');
                            echo (
    'Kills: ');
                            echo 
    odbc_result($query4);
                                                    echo (
    '<br>');
                            echo (
    'Deaths: ');
                            echo 
    odbc_result($query5);
                                                    echo (
    '<br>');
                                                    echo (
    'Bounty: ');
                            echo 
    odbc_result($query7);
                            echo (
    '<br>');
    echo (
    'Registered On: ');
                            echo 
    odbc_result($query6);
                                                    echo (
    '<br>');
    echo (
    'Sex: ');
                            if(
    $sex=="1")
    {
    echo (
    'Woman');
    }
    elseif (
    $sex=="0")
    {
    echo (
    'Man');
    }

                            }
                            }
    ?></b>
    Hope it helps.
    Last edited by sayuta; 06-06-09 at 11:01 PM.

  5. #30
    Account Upgraded | Title Enabled! nanowarior is offline
    MemberRank
    Sep 2008 Join Date
    200Posts

    Re: Simple PHP things for your site :P

    Thanks, :P

  6. #31
    Sultan of Yolo Demantor is offline
    MemberRank
    May 2008 Join Date
    GermanyLocation
    1,266Posts

    Re: Simple PHP things for your site :P

    Edited:

    nice^^

  7. #32
    Status: Pooping eele is offline
    MemberRank
    Jul 2008 Join Date
    The NetherlandsLocation
    915Posts

    Re: Simple PHP things for your site :P

    It sucks, I can do much better now :D <3

  8. #33
    Account Upgraded | Title Enabled! sayuta is offline
    MemberRank
    Jan 2007 Join Date
    The NetherlandsLocation
    205Posts

    Re: Simple PHP things for your site :P

    Quote Originally Posted by eele View Post
    It sucks, I can do much better now :D <3
    Lol even my dog can do better than this code o.o..

  9. #34
    Account Upgraded | Title Enabled! 00niels00 is offline
    MemberRank
    Sep 2008 Join Date
    The NetherlandsLocation
    1,041Posts

    Re: Simple PHP things for your site :P

    Quote Originally Posted by sayuta View Post
    Lol even my dog can do better than this code o.o..
    Proof that!

  10. #35
    Account Upgraded | Title Enabled! sayuta is offline
    MemberRank
    Jan 2007 Join Date
    The NetherlandsLocation
    205Posts

    Re: Simple PHP things for your site :P

    Quote Originally Posted by 00niels00 View Post
    Proof that!
    No sh**, he just ran off on its own! xD..
    Can't prove, sorry (A).

  11. #36
    Member xgosu is offline
    MemberRank
    Dec 2009 Join Date
    61Posts

    Re: Simple PHP things for your site :P

    Sorry for reviving an old thread.
    can u make the buy item check for coin on account table before buying it? Like when the acc have insufficient coin it will echo Not enought Coin?

  12. #37
    Status: Pooping eele is offline
    MemberRank
    Jul 2008 Join Date
    The NetherlandsLocation
    915Posts

    Re: Simple PHP things for your site :P

    Quote Originally Posted by xgosu View Post
    Sorry for reviving an old thread.
    can u make the buy item check for coin on account table before buying it? Like when the acc have insufficient coin it will echo Not enought Coin?
    PHP Code:
    <?php
    $it_costs 
    10// An variable, now it will cost 10 coins ;D
    $cid 1;
    $itemid 1337;
    $query mssql_query("Select coins From Account Where UserID = 'namevariablehere'");
    $coins mssql_fetch_assoc($query);
    if(
    $coins['coins'] < 10){
    echo 
    "You don't have enough coins^^";
    }elseif(
    $coins['coins'] >= 10){
    mssql_query("Insert into CharacterItem (ItemID,cid) VALUES ('$itemid','$cid')"); // Don't know the values out of my head XD but it will be something like this:D
    }else{
    echo 
    'There is a error :D';
    }
    ?>

  13. #38
    Member xgosu is offline
    MemberRank
    Dec 2009 Join Date
    61Posts

    Re: Simple PHP things for your site :P

    Quote Originally Posted by eele View Post
    PHP Code:
    <?php
    $it_costs 
    10// An variable, now it will cost 10 coins ;D
    $cid 1;
    $itemid 1337;
    $query mssql_query("Select coins From Account Where UserID = 'namevariablehere'");
    $coins mssql_fetch_assoc($query);
    if(
    $coins['coins'] < 10){
    echo 
    "You don't have enough coins^^";
    }elseif(
    $coins['coins'] >= 10){
    mssql_query("Insert into CharacterItem (ItemID,cid) VALUES ('$itemid','$cid')"); // Don't know the values out of my head XD but it will be something like this:D
    }else{
    echo 
    'There is a error :D';
    }
    ?>
    how to implement this?



Page 2 of 2 FirstFirst 12

Advertisement