Logo
An arrow is pointing to my butt!

site-help

Earthbound Soul
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Avatar
26 Jul 2008 02:42
ermm, ik ben dus zeg maar bezig met m'n site, en ik wil zeg maar ook een contact pagina maken.

mijn vraag is dus: hoe maak ik een contact pagina, die, als je op verzenden klikt, dat wat je hebt ingetikt, naar mijn mail wordt verstuurd?

ik snap er namelijk niks van

Donate medal
This medal is awarded to those who made a financial contribution.
donatemedal.gif
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Link medal
This medal is awarded to those who helped by promoting the site on other websites.
linkmedal.gif
Tutorial medal
This medal is awarded to those who made a helpful tutorial.
tutmedal.gif
Meeting medal
This medal is awarded to those who joined at least one meeting.
meetingmedal-0003.gif
Prize medal
This medal is awarded to those who made a contest possible by donating a prize.
medalprize.gif
Mission medal
This medal is awarded to those who finished 10 missions.
missionmedal.gif
Avatar
26 Jul 2008 11:00
Met PHP, maar de server waar je site op staat moet dat wel ondersteunen.

Als je dat niet weet kan je het makkelijk even testen door deze tekst op te slaan als test.php
Code:
<?
exit('If you see this line, and only this line, PHP is supported.');
?>
No PHP here. Tough luck, sucker!

Earthbound Soul
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Avatar
26 Jul 2008 14:07
YAY php wordt geaccepteerd
http://tsunami-art.freehostia.com/test.php

nu weet ik alleen nog steeds niet wat ik precies moet doen

Donate medal
This medal is awarded to those who made a financial contribution.
donatemedal.gif
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Link medal
This medal is awarded to those who helped by promoting the site on other websites.
linkmedal.gif
Tutorial medal
This medal is awarded to those who made a helpful tutorial.
tutmedal.gif
Meeting medal
This medal is awarded to those who joined at least one meeting.
meetingmedal-0003.gif
Prize medal
This medal is awarded to those who made a contest possible by donating a prize.
medalprize.gif
Mission medal
This medal is awarded to those who finished 10 missions.
missionmedal.gif
Avatar
27 Jul 2008 11:11
Ten eerste moet je een formulier in elkaar zetten in (X)HTML. Hieronder een basisvoorbeeld, de layout en overige zaken moet je zelf maar toevoegen.

Code:
<form action="mailme.php" method="post">
Onderwerp: <input type="text" name="subject" size="40" value="" /></td><br />
Tekst: <textarea cols="60" rows="25" name="message"></textarea><br />
<input type="submit" name="send" value="Send" />
</form>


Het formulier stuurt informatie naar een PHP script. Het onderstaande is ook maar een basisvoorbeeld, maar het zou tenminste moeten werken. Denk ik. Ik heb het maar uit mijn hoofd gedaan en niet getest.

Code:
if($_POST['send']){

	$result = mail("pietjepuk@example.com", $_POST['subject'], $_POST['message']);

	if($result) exit('Succes!');
	else exit('Epic fail!');
}
else exit('The send button was not pressed, how peculiar.');

Als je het echt goed wilt doen voeg je ook nog zaken toe zoals beveiliging tegen spam, tests op correcte e-mail adressen, reply-to instellingen, etc... Maar dat is veel te veel om allemaal in 1 keer uit te leggen.

de Sofajas
Donate medal
This medal is awarded to those who made a financial contribution.
donatemedal.gif
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Link medal
This medal is awarded to those who helped by promoting the site on other websites.
linkmedal.gif
Tutorial medal
This medal is awarded to those who made a helpful tutorial.
tutmedal.gif
Meeting medal
This medal is awarded to those who joined at least one meeting.
meetingmedal-0003.gif
Avatar
27 Jul 2008 21:40
Ik ga dood van de epic fail.

Earthbound Soul
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Avatar
27 Jul 2008 22:35
haahah heel erg bedankt ik ga het meteen even proberen

Earthbound Soul
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Avatar
28 Jul 2008 03:10
meuh hij deed het niet TT__TT

Donate medal
This medal is awarded to those who made a financial contribution.
donatemedal.gif
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Link medal
This medal is awarded to those who helped by promoting the site on other websites.
linkmedal.gif
Tutorial medal
This medal is awarded to those who made a helpful tutorial.
tutmedal.gif
Meeting medal
This medal is awarded to those who joined at least one meeting.
meetingmedal-0003.gif
Prize medal
This medal is awarded to those who made a contest possible by donating a prize.
medalprize.gif
Mission medal
This medal is awarded to those who finished 10 missions.
missionmedal.gif
Avatar
28 Jul 2008 11:32
Alessio wrote:
meuh hij deed het niet TT__TT

En dat komt vast doordat je de PHP code niet tussen <? ?> tags hebt gezet. Je zal eventuele fouten zelf moeten kunnen vinden en oplossen, anders kom je niet ver hoor.

Earthbound Soul
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Avatar
28 Jul 2008 11:55
oh sorry
ik dacht al dat ik niet gewoon de code had moeten kopieren x(
dus die vraagteken dingen is zeg maar hetzelfde als <html> en </html> voor php?

wegisweg
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Prize medal
This medal is awarded to those who made a contest possible by donating a prize.
medalprize.gif
Avatar
28 Jul 2008 12:27
Snap er geen jota van, maar deze "else exit('The send button was not pressed, how peculiar.');" vind ik nog hilarischer.
Waar gaat je website eigenlijk over? Ik heb eens ook een site gemaakt, nou ja, gemaakt. Met Yahoo Geocities in elkaar gestoken. Dat ging toch een stuk simpeler dan PHP etc in te moeten tikken.

Donate medal
This medal is awarded to those who made a financial contribution.
donatemedal.gif
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Link medal
This medal is awarded to those who helped by promoting the site on other websites.
linkmedal.gif
Tutorial medal
This medal is awarded to those who made a helpful tutorial.
tutmedal.gif
Meeting medal
This medal is awarded to those who joined at least one meeting.
meetingmedal-0003.gif
Prize medal
This medal is awarded to those who made a contest possible by donating a prize.
medalprize.gif
Mission medal
This medal is awarded to those who finished 10 missions.
missionmedal.gif
Avatar
28 Jul 2008 12:37
Alessio wrote:
oh sorry
ik dacht al dat ik niet gewoon de code had moeten kopieren x(
dus die vraagteken dingen is zeg maar hetzelfde als <html> en </html> voor php?

Ongeveer. Alles wat in een PHP script niet tussen <? ?> staat, wordt niet uitgevoerd en zonder wijziging naar de browser gestuurd. Je kan dus ook zoiets doen in een PHP script:

Code:
<html>
<head>
<title><? echo 'Blaat'; ?></title>
</head>
<body>
<?
echo 'Alleen de titel en inhoud worden nu door PHP tussen de HTML code gepropt.';
?>
</body>
</html>

Earthbound Soul
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Avatar
28 Jul 2008 13:41
Oh ik snap het. . . denk ik lol
kan het trouwens ook aan het e-mail adres liggen, als je via dat contactformulier het mailtje niet krijgt met wat je hebt ingevoerd?

Donate medal
This medal is awarded to those who made a financial contribution.
donatemedal.gif
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Link medal
This medal is awarded to those who helped by promoting the site on other websites.
linkmedal.gif
Tutorial medal
This medal is awarded to those who made a helpful tutorial.
tutmedal.gif
Meeting medal
This medal is awarded to those who joined at least one meeting.
meetingmedal-0003.gif
Prize medal
This medal is awarded to those who made a contest possible by donating a prize.
medalprize.gif
Mission medal
This medal is awarded to those who finished 10 missions.
missionmedal.gif
Avatar
28 Jul 2008 13:45
Ja natuurlijk, als je niet je eigen adres invult ontvang je het niet. Duh.

Earthbound Soul
Mod medal
This medal is awarded to those who helped the site by moderating.
modmedal.gif
Avatar
28 Jul 2008 14:08
nee maar ik bedoel dat heb ik gedaan, maar ik ontvang niks