Help me

Gestart doorRoynash5 reacties19 weergaven

6 berichten · pagina 1 van 1

Roynash

Lid · Topicstarter

Berichten
171
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heey, ik heb een klein probleempje met een script, als ik de optie "Request" doe dan komt die wel aan op het dj paneel, maar als ik "Shout" of "Klacht" kies komen die niet aan sadley
Dit is de code:

[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/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]request[COLOR= #007700]])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"
<form method=post>
  <p><strong>Naam:</strong>
    <input name=name type=text id=content><br>
  </p>
  <p><strong>Shout / Request:<br></strong>
    <select name=type id=content>
<option>Request</option>
<option>Shout</option>
<option>Klacht</option>




          </select>
              <br><br>
  <strong>Bericht:</strong><br>
    <textarea name=message cols=30 id=content style=height: 100px;></textarea>
    <br>
    <br>
    <input type=submit name=request value=Verzend id=content>
        </p>
</form>
"[/COLOR][COLOR= #007700];
}[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]request[COLOR= #007700]])
{[/COLOR]

[COLOR= #0000BB]$type[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]type[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$message[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$type[/COLOR] [COLOR= #007700]==[/COLOR] NULL [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]==[/COLOR] NULL [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$message[/COLOR] [COLOR= #007700]==[/COLOR] NULL[COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Je moet wel al de velden invullen!"[/COLOR][COLOR= #007700]);
}[/COLOR]
   [COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR]
   [COLOR= #0000BB]$check[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT bannedip FROM `ipbans` WHERE `bannedip` = $ip"[/COLOR][COLOR= #007700]);[/COLOR]
   [COLOR= #0000BB]$check[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$check[/COLOR][COLOR= #007700]);[/COLOR]
   
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$check[/COLOR][COLOR= #007700][[/COLOR]bannedip[COLOR= #007700]] !==[/COLOR] [COLOR= #0000BB]$ip[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$message[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$type[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]type[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO `requests` (`id`, `user`, `message`, `type`, `ip`) VALUES (NULL, $name, $message, $type, $ip);"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"Je Shout / Request is met succes ontvangen."[/COLOR][COLOR= #007700]); 
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"Je IP is verbannen, je Shout / Request is niet aangekomen!"[/COLOR][COLOR= #007700]); 
}
}[/COLOR]
?>
0
Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
je geeft je selects geen waarde mee
0
Roynash

Lid · Topicstarter

Berichten
171
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Die snap ik niet bloos
0
Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
<select name="type">
    <option value="request">request</option>
    <option value="shout">shout</option>
    <option value="klacht">klacht</option>
  </select>
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je geeft de options geen value
0
Roynash

Lid · Topicstarter

Berichten
171
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dankje, het werkt weer yummie
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