php & mysql help!

Gestart doorJornd15 reacties86 weergaven

16 berichten · pagina 2 van 2

Jornd

Lid · Topicstarter

Berichten
513
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wiitse schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$dbhost[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$dbuser[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$dbpass[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_db_query"]mysql_db_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$db[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$qQuery[/COLOR][COLOR= #007700]);[/COLOR]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$sitelicentie[/COLOR][COLOR= #007700];[/COLOR] ?></title>
<meta name="keywords" content="radio, 538, slam fm, fm, shoutcast, internet, domein, hoe, internet radio, internetradio, internetradios, internetradios, enzovoort, youtube, hyves, goldmember, wallie, muziek, layout, mooi">
<meta name="description" content="Damageradio is een leuke online radio voor en door jongeren">

</head>

<body>

[COLOR= #0000BB]<?php
$qQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM licenties WHERE licentie = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]licentie[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$qQuery[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Gebruikersnaam in gebruik.[/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]Gebruikersnaam is vrij.[/COLOR][COLOR= #007700];
}[/COLOR]
?>

</body>
Ik heb er een heel aantal fouten uit gehaald.

was op vakantie ff maar oke ik ga even proberen
maar even een probleemje,,

ik heb als licenties elke website apart dus lol.nl heeft byv. 250483
en ikke.nl 648726

hoe kn ik dat zo controleren?

EDIT:

ik heb nu dit:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$dbhost[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$dbuser[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$dbpass[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_db_query"]mysql_db_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$db[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$qQuery[/COLOR][COLOR= #007700]);[/COLOR]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$sitelicentie[/COLOR][COLOR= #007700];[/COLOR] ?></title>
<meta name="keywords" content="radio, 538, slam fm, fm, shoutcast, internet, domein, hoe, internet radio, internetradio, internetradios, internetradios, 

enzovoort, youtube, hyves, goldmember, wallie, muziek, layout, mooi">
<meta name="description" content="Damageradio is een leuke online radio voor en door jongeren">

</head>

<body>

[COLOR= #0000BB]<?php
$qQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM licenties WHERE licentie = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]licentie[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$qQuery[/COLOR][COLOR= #007700]) == ([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]licentie[/COLOR][COLOR= #007700]])) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Gebruikersnaam in gebruik.[/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]Gebruikersnaam is vrij.[/COLOR][COLOR= #007700];
}[/COLOR]
?>

</body>


alleen krijg nu deze error?

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:xampphtdocstestcheck.php on line 20
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