HELP!!!

Gestart doorBasDev3 reacties62 weergaven

4 berichten · pagina 1 van 1

BasDev

Lid · Topicstarter

Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan iemand met helpen met mijn forum registratie script???

Ik heb namelijk geen mailfunctie op mijn server en er moet een activatiemail worden gestuurt naar geregistreerde gebruukers.
Dat kan dus niet! kan een van jullie met helpen om dat gedeelte uut het script te halen?

Hier het script:

[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"inc/config.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"inc/htmltop.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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user_id[/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]submit[/COLOR][COLOR= #007700]])) {[/COLOR]
  [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]""[/COLOR] AND [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass1[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]""[/COLOR] AND [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass2[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]""[/COLOR] AND [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
   [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT id FROM gebruikers WHERE naam="[/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]user[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/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= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]
   [COLOR= #0000BB]$tellen[/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]$tellen[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/ereg"]ereg[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"[A-Za-z0-9_-]+([.]{1}[A-Za-z0-9_-]+)*@[A-Za-z0-9-]+([.]{1}[A-Za-z0-9-]+)+"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]])) {[/COLOR]
     [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass1[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass2[/COLOR][COLOR= #007700]]) {[/COLOR]
      [COLOR= #0000BB]$actcode[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mt_srand"]mt_srand[/URL][COLOR= #007700]((double)[/COLOR][URL="http://www.php.net/microtime"]microtime[/URL][COLOR= #007700]()*[/COLOR][COLOR= #0000BB]100000[/COLOR][COLOR= #007700]);[/COLOR]
      [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$actcode[/COLOR][COLOR= #007700]) <=[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700]) {[/COLOR]
       [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/chr"]chr[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mt_rand"]mt_rand[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]255[/COLOR][COLOR= #007700]));[/COLOR]
       [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/eregi"]eregi[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"^[a-z0-9]$"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700])) {[/COLOR]
        [COLOR= #0000BB]$actcode[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$actcode[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700];
       }
      }[/COLOR]
      [COLOR= #0000BB]$md5pass[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass1[/COLOR][COLOR= #007700]]);[/COLOR]
      [COLOR= #0000BB]$datum[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-Y H:i"[/COLOR][COLOR= #007700]);[/COLOR]
      [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"INSERT INTO gebruikers (naam,wachtwoord,status,email,actief,actcode,aangemeld) VALUES ("[/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]user[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$md5pass[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]",0,"[/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]email[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]",0,"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$actcode[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$datum[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]")"[/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= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]
      [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]) {[/COLOR]
       [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT id FROM gebruikers WHERE naam="[/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]user[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/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= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]
       [COLOR= #0000BB]$rij[/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]$dbid[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$rij[/COLOR][COLOR= #007700]->[/COLOR]id[COLOR= #007700]);[/COLOR]
       [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Beste "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]",
Je hebt je geregistreerd op de site "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sitenaam[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]", dit is de activatie mail van je registratie.
Om je account te activeren, druk je op de link onderaan deze mail.

"[/COLOR][COLOR= #007700];[/COLOR]
       [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"REGISTRATIE BEVESTIGEN: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$forgoturl[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"activeren.php?id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$dbid[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"&code="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$actcode[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"&registratie=true 

"[/COLOR][COLOR= #007700];[/COLOR]
       [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Zodra je op deze link geklikt hebt, kun je inloggen met:
"[/COLOR][COLOR= #007700];[/COLOR]
       [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Gebruikersnaam: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]
       [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Wachtwoord: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass1[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]
       [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"** Dit is een automatisch verzonden bericht **"[/COLOR][COLOR= #007700];[/COLOR]
       [COLOR= #0000BB]$mail[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]],[/COLOR][COLOR= #DD0000]"Registratie "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sitenaam[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sitenaam[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" <"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sitemail[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]">"[/COLOR][COLOR= #007700]);[/COLOR]
       [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$mail[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent succesvol geregistreerd! Zodra je de link in de mail hebt bezocht kun je inloggen.<br />
<a href="inloggen.php">&laquo; Naar de inlogpagina</a>"[/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]"Fout opgetreden tijdens verzenden van e-mail. Neem contact op met <a href="mailto:bas.milius@chello.nl">"[/COLOR]Webmaster[COLOR= #DD0000]"</a>."[/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]"Er is een fout opgetreden tijdens het toevoegen van je account. Probeer het later nog eens.<br />
<a href="javascript:history.back()">&laquo; Ga terug</a>"[/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]"De door jou opgegeven wachtwoorden komen niet overeen.<br />
<a href="javascript:history.back()">&laquo; Ga terug</a>"[/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]"Het e-mailadres dat jij opgaf, komt niet overeen met hoe een e-mailadres eruit zou moeten zien (gebruiker@domain.ext).<br />
<a href="javascript:history.back()">&laquo; Ga terug</a>"[/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]"De gebruikersnaam "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" is reeds in gebruik. Probeer een andere gebruikersnaam.<br />
<a href="javascript:history.back()">&laquo; Ga terug</a>"[/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]"Je bent vergeten één of meerdere velden in te vullen.<br />
<a href="javascript:history.back()">&laquo; Ga terug</a>"[/COLOR][COLOR= #007700];
  }
 }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
  ?>
  <form method="post" action="registreer.php">
   <table>
    <tr>
     <td>Gebruikersnaam:</td><td><input type="text" name="user" maxlength="50" /></td>
    </tr>
    <tr>
     <td>Wachtwoord:</td><td><input type="password" name="pass1" /></td>
    </tr>
    <tr>
     <td>Herhaal:</td><td><input type="password" name="pass2" /></td>
    </tr>
    <tr>
     <td>E-mailadres:</td><td><input type="text" name="email" maxlength="100" /></td>
    </tr>
    <tr>
     <td></td><td><input type="submit" name="submit" value="Registreer" /></td>
    </tr>
   </table>
  </form>
  <small>Na de registratie zal er een e-mail naar je e-mailadres gestuurd worden ter activatie. Tot die tijd kun
  je nog niet inloggen.</small>
  [COLOR= #0000BB]<?[/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]"Je bent momenteel ingelogd, registreren is niet mogelijk terwijl je bent ingelogd!"[/COLOR][COLOR= #007700];
}[/COLOR]

[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"inc/htmlbottom.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>


Alvast bedankt groetjes Superb

edit:
code-tags toegevoegd clown
0
Berichten
6.201
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nog gefeliciteerd met je punten emo
0
BasDev

Lid · Topicstarter

Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kjeld schreef:
Nog gefeliciteerd met je punten emo
thanks
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Zet het tussen code-tags, dat leest iets beter =]
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