Simple PHP things for your site :P

Page 1 of 2 12 LastLast
Results 1 to 25 of 38
  1. #1
    Status: Pooping eele is offline
    MemberRank
    Jul 2008 Join Date
    The NetherlandsLocation
    915Posts

    Simple PHP things for your site :P

    Send item Code
    Ok, first copy the first code and open your notepad and save as item.php
    The second code copy it and save as config.php

    item.php you see the Red Option Things just add 1 more row with another value and name or edit. The Value is the ItemID you want they choose. Just search in your zitem.xml ;)
    Code:
    <FORM method="post" action="<? echo $PHP_SELF;?>">
    <p>Characternaam:
    <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="koop" 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($query, 1);
    if (isset($_POST["koop"]))
    {
    if (empty($naam))
    {
    echo ('<br>Je moet een Characternaam invullen!');
    }
    else
    {
    echo ('<br>Succesvol gekocht!');
    odbc_exec ($connect, "INSERT INTO CharacterItem (CID, ItemID) VALUES ('$cidnr', '$itemid')"); 
    }
    }
    ?>
    config.php
    Code:
    <?
    $host = "HYLPER\SQLEXPRESS"; // your sql server
    $dbname = "GunzDB"; // Your db name
    $user = "sa"; // your sql inlogname
    $pass = "yourpw"; // your db password 
    $connect = odbc_connect("Driver={SQL Server};Server={$host}; Database={$dbname}", $user, $pass) or die("Kan niet verbinding maken met de Server.");
    function anti_injection($sql)
    {
    $sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql);
    $sql = trim($sql);
    $sql = strip_tags($sql);
    $sql = addslashes($sql);
    return $sql;
    } 
    ?>


    Another easy php code. Just copy and save as search.php or something :P But it needs to be in the same map as the config.php
    Code:
    <form method="post" action="<? echo $PHP_SELF;?>">
      <p><b>Characternaam:</b>
          <input type="text" name="char" />
      </p>
      <p>
        <input type="submit" value="zoek" name="zoek" />
      </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($query, 8);
    
    if( isset($_POST['zoek']) )
                {
                            if (empty ($char))
                            {
    echo("<font color=\"red\"><h1>U hebt niks ingevuld!</h1></font>");
    }
    else
    {                       echo ('<b>Naam: ');
                            echo odbc_result($query, 1);
                            echo ('<br>');
                            echo ('Level: ');
                            echo odbc_result($query, 2);
                            echo ('<br>');
                            echo ('XP: ');
                            echo odbc_result($query, 3);
                                                    echo ('<br>');
                            echo ('Killz: ');
                            echo odbc_result($query, 4);
                                                    echo ('<br>');
                            echo ('Dood: ');
                            echo odbc_result($query, 5);
                                                    echo ('<br>');
                                                    echo ('Geld: ');
                            echo odbc_result($query, 7);
                            echo ('<br>');
    echo ('Aangemaakt om: ');
                            echo odbc_result($query, 6);
                                                    echo ('<br>');
    echo ('Geslacht: ');
                            if($sex=="1")
    {
    echo ('Woman');
    }
    elseif ($sex=="0")
    {
    echo ('Man');
    }
    
                            }
                            }
    ?></b>
    This is just some basics don't blame me xd if i made a mistake just say it.


  2. #2
    Account Upgraded | Title Enabled! Bartjehh is offline
    MemberRank
    Oct 2008 Join Date
    The netherlandsLocation
    448Posts

    Re: Simple PHP things for your site :P

    Source xD?

  3. #3
    Unleashed jumparound is offline
    MemberRank
    Feb 2008 Join Date
    UtrechtLocation
    499Posts

    Re: Simple PHP things for your site :P

    Yay nice release =)

  4. #4
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Simple PHP things for your site :P

    Exploitable.

  5. #5
    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 Wizkidje View Post
    Exploitable.
    I already said 'This is just some basics'
    :P

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

    Re: Simple PHP things for your site :P

    Nice a shop! 10/10 i really needed this!

  7. #7
    Account Upgraded | Title Enabled! BRAZIL-PAULINHO is offline
    MemberRank
    Sep 2008 Join Date
    Brasil, RioLocation
    537Posts

    Re: Simple PHP things for your site :P

    language?

  8. #8
    RestyleGamerZ FTW Mambo is offline
    MemberRank
    Mar 2008 Join Date
    The NetherlandsLocation
    821Posts

    Re: Simple PHP things for your site :P

    Quote Originally Posted by BRAZIL-PAULINHO View Post
    language?
    It's dutch, i can translate if u like

  9. #9
    Account Upgraded | Title Enabled! BRAZIL-PAULINHO is offline
    MemberRank
    Sep 2008 Join Date
    Brasil, RioLocation
    537Posts

    Re: Simple PHP things for your site :P

    i translated =D

  10. #10
    Account Upgraded | Title Enabled! 007ruben is offline
    MemberRank
    Jan 2008 Join Date
    netherlandsLocation
    491Posts

    Re: Simple PHP things for your site :P

    how do i let them pay and then use the script?

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

    Re: Simple PHP things for your site :P

    Learn Basic PHP and HTML things i did'nt understand this in 1 Day =o

  12. #12
    Proficient Member kenefa is offline
    MemberRank
    Dec 2008 Join Date
    BulgariaLocation
    167Posts

    Re: Simple PHP things for your site :P

    btw can you tanslate on english
    xD nvm updated mine and made it better
    Last edited by kenefa; 19-01-09 at 08:05 PM.

  13. #13
    Account Upgraded | Title Enabled! 007ruben is offline
    MemberRank
    Jan 2008 Join Date
    netherlandsLocation
    491Posts

    Re: Simple PHP things for your site :P

    dude its english

  14. #14
    Account Upgraded | Title Enabled! shadow-xx is offline
    MemberRank
    Jan 2007 Join Date
    MegatonLocation
    804Posts

    Re: Simple PHP things for your site :P

    Ur wrong about that some variables and the strings the get send to the browser are dutch..

  15. #15
    Account Upgraded | Title Enabled! 007ruben is offline
    MemberRank
    Jan 2008 Join Date
    netherlandsLocation
    491Posts

    Re: Simple PHP things for your site :P

    ah i see it now

  16. #16
    Account Upgraded | Title Enabled! billabonker is offline
    MemberRank
    Feb 2008 Join Date
    YouTube :)Location
    360Posts

    Re: Simple PHP things for your site :P

    wow nice man good job where did you learn this php or html thingys?

  17. #17
    Account Upgraded | Title Enabled! BRAZIL-PAULINHO is offline
    MemberRank
    Sep 2008 Join Date
    Brasil, RioLocation
    537Posts

    Re: Simple PHP things for your site :P

    6/10 dont like it

  18. #18
    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 BRAZIL-PAULINHO View Post
    6/10 dont like it
    Lol, why its not good for you? =o
    Btw, lol 2 other people got same post count sig as me XD

  19. #19
    Account Upgraded | Title Enabled! BRAZIL-PAULINHO is offline
    MemberRank
    Sep 2008 Join Date
    Brasil, RioLocation
    537Posts

    Re: Simple PHP things for your site :P

    Quote Originally Posted by eele View Post
    Lol, why its not good for you? =o
    Btw, lol 2 other people got same post count sig as me XD
    i can remove if u want =D

  20. #20
    Account Upgraded | Title Enabled! 007ruben is offline
    MemberRank
    Jan 2008 Join Date
    netherlandsLocation
    491Posts

    Re: Simple PHP things for your site :P

    no don't do that i need this if i know about html and php

  21. #21
    Account Upgraded | Title Enabled! X-Weaver is offline
    MemberRank
    Jan 2009 Join Date
    XDLocation
    443Posts

    Re: Simple PHP things for your site :P

    nice simple web i like it

  22. #22
    Account Upgraded | Title Enabled! Asumi is offline
    MemberRank
    Aug 2008 Join Date
    209Posts

    Re: Simple PHP things for your site :P

    Nice but as wizkid said exploitable

  23. #23
    Apprentice abdur14 is offline
    MemberRank
    Jan 2009 Join Date
    5Posts

    Re: Simple PHP things for your site :P

    Well Exually I didnt get what to do .. In Dutch .. ik snap effe niet wat ik moet doen T.T? kan iemand me aub uitleggen

  24. #24
    Apprentice abdur14 is offline
    MemberRank
    Jan 2009 Join Date
    5Posts

    Re: Simple PHP things for your site :P

    Well Exually I didnt get what to do .. In Dutch .. ik snap effe niet wat ik moet doen T.T? kan iemand me aub uitleggen if som1 wanna help me here is my email the_man_is_abdur@hotmail.com

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

    Re: Simple PHP things for your site :P

    Lol @ abdur what you don't understand you got already a working gunz server? And a Apache Server?



Page 1 of 2 12 LastLast

Advertisement