$_POST werkt niet mee?

Gestart doorSemmiiee7 reacties85 weergaven

8 berichten · pagina 1 van 1

Semmiiee

Lid · Topicstarter

Berichten
4.013
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hey,

Ik moest voor iemand (naam kwijt) een contact form maken, nou ik moest er eigenlijk 2 op 1 pagina maken dus ik ging met $_POST werken,

Normaal moet je op YES drukken (button) en dan form krijgen, en bij NO (andere button) een iets andere form krijgen.

Nu heb ik geen errors, maar als ik op YES of NO druk gebeurt er niks sadley.

SCRIPT:

<html>
<head>
<title>Darkdutch RSPV</title>
</head>
<body bgcolor="#f1f1f1" text="#000000" link="#000000">

<table align="center" width="95%" bgcolor="#FFFFFF" style="border-color:#999999; border-style: solid;border-width:1px;" border="0">
        <td>
             <table width="100%">
                <tr>
                    <td width="50%">
                
                       </td></tr></table> 
       



<div align="center">
<h1>Darkdutch Private server</h1>
<hr />
<a href="#">Home</a>    |    <a href="about.php">About</a>    |    <a href="download.php">Download</a>  |    <a href="contact.php">Contact</a>
<hr />
<form action="rspv.php" method="POST"><input type="button" value="YES" name="yes"><input type="button" value="NO" name="no"></form>
[COLOR= #0000BB]<?php
$yes[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]yes[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$no[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]no[/COLOR][COLOR= #007700]];[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]yes[/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$cmail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Jouw email adres hier.[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"naam"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"onderwerp"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bericht"[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$fouten[/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/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"naam"[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
    [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"You havent entered your name!<br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    

    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bericht"[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
    [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"You didnt entered an message!<br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
    [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"You havent entered your transaction ID!<br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
    ?>
    <form action="" method="POST">
    Naam: <input type="text" name="naam"><br />
    Onderwerp: <input type="text" name="onderwerp"><br />
    Email: <input type="text" name="email"><br />
    Bericht: <textarea name="bericht"></textarea><br />
    <input type="submit" value="verstuur">
    </form>
    <br />
    <b>Niet alles is ingevuld!</b><br /><br />
    [COLOR= #0000BB]<?php[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
Reply-To: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
X-Mailer: PHP/"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/phpversion"]phpversion[/URL][COLOR= #007700]();[/COLOR]
    [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cmail[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"onderwerp"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]"<html>"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bericht"[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</html>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);    
     }
    
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
?>
<form action="contact.php" method="POST">
Username: <input type="text" name="naam"><br />
Paymend ID: <input type="text" name="email"><br />
Message: <textarea name="bericht"></textarea><br />
<input type="submit" value="Send">
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]no[/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$cmail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Jouw email adres hier.[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"naam"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"onderwerp"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bericht"[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$fouten[/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/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"naam"[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
    [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"You havent entered your name!<br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"onderwerp"[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
    [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Please enter an subject!<br />"[/COLOR][COLOR= #007700];
    }[/COLOR]

    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bericht"[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
    [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"You didnt entered an message!<br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
    [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
    [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"You havent entered your email!<br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
    ?>
    <form action="" method="POST">
    Naam: <input type="text" name="naam"><br />
    Onderwerp: <input type="text" name="onderwerp"><br />
    Email: <input type="text" name="email"><br />
    Bericht: <textarea name="bericht"></textarea><br />
    <input type="submit" value="verstuur">
    </form>
    <br />
    <b>You havent fill in everything!</b><br /><br />
    [COLOR= #0000BB]<?[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
Reply-To: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
X-Mailer: PHP/"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/phpversion"]phpversion[/URL][COLOR= #007700]();[/COLOR]
    [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cmail[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"onderwerp"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]"<html>"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bericht"[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</html>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);    
     }
    
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
?>
<form action="contact.php" method="POST">
Username: <input type="text" name="naam"><br />
Subject: <input type="text" name="onderwerp"><br />
Email: <input type="text" name="email"><br />
Message: <textarea name="bericht"></textarea><br />
<input type="submit" value="Send">
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}
}[/COLOR]
?> 


<hr />
<font size="1" face="verdana">Private Server maked by Tester | All game credits gos to <a href="http://www.runescape.com">Jagex Ltd.</a>.</font>
<hr />
</div>


</td>
     </tr>
</table>
</body>
</html>


BRON;
Heb hem van diaman stond ergens in topic, had hem gewoon wat aangepast wink
//edit: mailadres uit code verwijderd
0
Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
submit moet je gebruiken ipv button emoen graag ook mijn bron er laten staan emo
0
Berichten
3.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zeg er wel even bij dat hij zijn script aan jou heeft gegeven en dat jij het probeert te fixen.
0
Semmiiee

Lid · Topicstarter

Berichten
4.013
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het werkt nu, slotje mag erop? biggrin.
Bron staat er btw ook bij.
0
Ben

Lid

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Semmiiee schreef:
Het werkt nu, slotje mag erop? biggrin.
Bron staat er btw ook bij.
Mijn mail,...
0
Semmiiee

Lid · Topicstarter

Berichten
4.013
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kinazor schreef:
Eerdere citaten tonen
Semmiiee schreef:
Het werkt nu, slotje mag erop? biggrin.
Bron staat er btw ook bij.

Mijn mail,...
Ik had de mail even weggehaalt wink.
0
Ben

Lid

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij staat er nog in confused.
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kinazor schreef:
Hij staat er nog in confused.
verwijderd, en aangezien dit opgelost is en de TS om een slotje vraagt gaat dit topic ook op slot.
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