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 -.-?
Printable View
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 -.-?
Lol, weer concurrentie :P, btw houd het Engels...
En nee sorry heb geen zin om te helpen :P
Hold it on english plox.
Can Any 1 translate on english Please, I dont know how.
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($query, 1);
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
Hope it helps.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($query, 8);
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($query, 1);
echo ('<br>');
echo ('Level: ');
echo odbc_result($query, 2);
echo ('<br>');
echo ('XP: ');
echo odbc_result($query, 3);
echo ('<br>');
echo ('Kills: ');
echo odbc_result($query, 4);
echo ('<br>');
echo ('Deaths: ');
echo odbc_result($query, 5);
echo ('<br>');
echo ('Bounty: ');
echo odbc_result($query, 7);
echo ('<br>');
echo ('Registered On: ');
echo odbc_result($query, 6);
echo ('<br>');
echo ('Sex: ');
if($sex=="1")
{
echo ('Woman');
}
elseif ($sex=="0")
{
echo ('Man');
}
}
}
?></b>
Thanks, :P
Edited:
nice^^
It sucks, I can do much better now :D <3
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';
}
?>