wie kan een code maken

Gestart doorPhpkerempje14 reacties120 weergaven

15 berichten · pagina 1 van 1

Phpkerempje

Lid · Topicstarter

Berichten
248
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
wie kan er een code maken voor mij ik heb nu een inlogsysteem met refral systeem maar ik wil een code die ik kan plakken op me pagina als je die pagina bezoekt moet je saldo 200 bedragen en als je op de pagina gekomen bent gaat die saldo vaan 200 van het gebruiker weg
hier de tabellen die mischien nodig zijn
id username email saldo pass button active code

als je het kan maken ben ik supperblij je krijgt ook wel een vergoeding

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- Template Design by TheWebhub.com | http://www.thewebhub.com | Released for free under a Creative Commons Attribution-Share Alike 3.0 Philippines -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>PHP-Kerem.nl</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
    <div id="header">
        <h1>PHP-Kerem.nl</h1>
        <h2>Php scripts voor webmasters...</h2>
    </div>
    <div id="menu">
        <ul>
        <li><a href="http://www.php-kerem.nl/index.php">Home</a>
            <li><a href="http://www.php-kerem.nl/downloads/">Downloads</a></li>
            <li><a href="http://www.php-kerem.nl/proxy.php">Proxy surfen</a></li>
            <li><a href="http://www.php-kerem.nl/contact.php">Contact</a></li>
            <li><a href="http://www.php-kerem.nl/links.php">Links</a></li>
            <li><a href="http://www.php-kerem.nl/partnerworden.php">Partner worden</a></li>
            <li><a href="http://www.php-kerem.nl/adverteren.php">Adverteren</a></li>
            <li><a href="http://www.php-kerem.nl/admin.php">Admin login</a></li>
        </ul>
    </div>
    <div id="content">
        <div id="right">
            <div class="post">
                <h2>Adverteer </h2>
                <script type="text/javascript"><!--
google_ad_client = "pub-1319046422984117";
/* 468x60, gemaakt 10-3-09 */
google_ad_slot = "9753844883";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>                
    </div>
            <div class="post">
                <h2>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$menuhead2"[/COLOR][COLOR= #007700];[/COLOR] ?></h2>
                                
            </div>
            <div class="post">
            </div><p>Hier kun je inloggen op je [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$sitenaam"[/COLOR][COLOR= #007700];[/COLOR] ?> account.
      [COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]];[/COLOR]

[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = $username AND pass = $pass"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$object[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])){[/COLOR]
[COLOR= #0000BB]$memberid[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$object[/COLOR][COLOR= #007700]->[/COLOR]id[COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$active[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$object[/COLOR][COLOR= #007700]->[/COLOR]active[COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$active[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<meta http-equiv="refresh" content="0;URL=index.php">"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$active[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]"yes"[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]memberid[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$memberid[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<meta http-equiv="refresh" content="0;URL=saldo.php">"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<br><br>Inloggen..."[/COLOR][COLOR= #007700];
}
}}[/COLOR]
?>
    </p>
    <form name="form1" method="post" action=""> Gebruikersnaam:<br>
  <input name="user" type="text" id="user" value="">
  <br>
  Wachtwoord:<br>
  <input name="pass" type="password" id="pass">
  <br>
  <input type="submit" name="Submit" value="Inloggen &gt;&gt;">
</form>
</div



        </div>
        <div id="left">
            <h2>Submenu</h2>
            <p><strong>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]menu2.php[/COLOR][COLOR= #007700]);[/COLOR] ?></strong> <br />
                
<br></p>
            
            </div>
    </div>
    <div id="footer">
        <p class="copyright">Copyright &copy; 2009 Php-kerem.nl <a href="http://www.php-kerem.nl/webmail/">Webmail</a></li><SCRIPT LANGUAGE="JavaScript" SRC="http://www.istats.nl/count.php?cid=46532"></SCRIPT>
</a></p>
    </div>
</div>
</body>
</html>
0
Berichten
6.201
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Stuur me maar een pb, zit nu op school, maar misschien kan ik zo wel ff wat voor je maken wink
0
Berichten
6.201
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?
$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gebruikers WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])){[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]saldo[/COLOR][COLOR= #007700]] <[/COLOR] [COLOR= #DD0000]200[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Saldo te laag!"[/COLOR][COLOR= #007700];

}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Saldo voldoende!"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE gebruikers SET saldo = saldo - 200 WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);

}

}[/COLOR]

?>


Zoiets? Is misschien niet het beste maar zit nu op school, heb geen highlighting enzo..
Het is verder niet veilig ofzo, maar dit script doet wat jij wilt yummie
0
Phpkerempje

Lid · Topicstarter

Berichten
248
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
er komt

Parse error: syntax error, unexpected T_STRING in /home/phpkerem/domains/php-kerem.nl/public_html/sms/test.php on line 21
0
Berichten
6.201
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?
$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gebruikers WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])){[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]saldo[/COLOR][COLOR= #007700]] <[/COLOR] [COLOR= #DD0000]200[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Saldo te laag!"[/COLOR][COLOR= #007700];

}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Saldo voldoende!"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE gebruikers SET saldo = saldo - 200 WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);

}

}[/COLOR]

?>


Zo misschien?
0
Phpkerempje

Lid · Topicstarter

Berichten
248
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
nu komt er
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/phpkerem/domains/php-kerem.nl/public_html/sms/test.php on line 5
0
Berichten
6.201
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb je wel verbinding met je database?
En heb je je tabellen wel aangepast naar je eigen tabellen?
0
Phpkerempje

Lid · Topicstarter

Berichten
248
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik heb dit staan

[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]settings.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
[COLOR= #0000BB]<?
$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gebruikers WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]memberid[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])){[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]saldo[/COLOR][COLOR= #007700]] <[/COLOR] [COLOR= #DD0000]200[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Saldo te laag!"[/COLOR][COLOR= #007700];

}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Saldo voldoende!"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE gebruikers SET saldo = saldo - 200 WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]memberid[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);

}

}[/COLOR]

?>
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Maak van regel drie eens dit:
$result = mysql_query("SELECT * FROM gebruikers WHERE id = ".$_SESSION[memberid]."") or die(mysql_error());
en post t resultaat hierzo..
0
Phpkerempje

Lid · Topicstarter

Berichten
248
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
lennard er komt nu dit

Warning: mysql_query() [function.mysql-query]: Access denied for user apache@localhost (using password: NO) in /home/phpkerem/domains/php-kerem.nl/public_html/sms/test.php on line 2

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/phpkerem/domains/php-kerem.nl/public_html/sms/test.php on line 2
Access denied for user apache@localhost (using password: NO)

ik heb dit staan klopt het zo

[COLOR= #0000BB]<?
$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gebruikers WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]memberid[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])){[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]saldo[/COLOR][COLOR= #007700]] <[/COLOR] [COLOR= #DD0000]200[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Saldo te laag!"[/COLOR][COLOR= #007700];

}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Saldo voldoende!"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE gebruikers SET saldo = saldo - 200 WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]memberid[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);

}

}[/COLOR]
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dan kloppen je MySQL gegevens niet.
0
Phpkerempje

Lid · Topicstarter

Berichten
248
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
yes het werkt
0
Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nog iets heel anders phpkerem waarom reageer je niet meer op mails als je moet betalen terwijl je ze WEL leest? confused
0
Phpkerempje

Lid · Topicstarter

Berichten
248
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
huh ik heb nix ontvangen hoor
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren