[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - [PHP] Gastenboek met mysql
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

[PHP] Gastenboek met mysql

Je komt er niet helemaal uit bij het scripten? Übergoede functie geschreven? Alles met betrekking tot scripting, kun je hier terecht.

[PHP] Gastenboek met mysql

Berichtdoor Marcello » 02 maart 2006 14:32

Ik ben weer es aan het prutsen met mysql en dit is wat ik heb.
Vraag is moet ik nog meer doen met dat tabel? En wat moet ik nog veranderen aan de scripts, behalve config.php?
1

2


[code="php"]

- - - -
config.php
- - - -
<?

mysql_connect('localhost','//username\\','//wachtwoord\\');
mysql_select_db('//naam van de db. \\') or die (mysql_error());
?>


- - - -
index.php
- - - -

<?
include('config.php');
?>
<table border="1" width="43%" cellspacing="0" cellpadding="0" bgcolor="#808080">
<tr>
<td width="33%" align="center">Naam</td>
<td width="33%" align="center">E-mail</td>
<td width="33%" align="center">Bericht</td>
</tr>
<?php
$qLid = mysql_query("SELECT voornaam,email,bericht FROM test");
while ($aLid = mysql_fetch_assoc($qLid))
{
?>
<tr>
<td width="33%" bgcolor="#C0C0C0">
<?=$aLid['voornaam']?>
</td>
<td width="33%" bgcolor="#C0C0C0">
<a href="mailto:<?=$aLid['email']?>"><?=$aLid['email']?></a>
</td>
<td width="34%" bgcolor="#C0C0C0">
<p align="center">
<font face="Comic Sans MS" size="2">
<i>
<?=$aLid['bericht']?>
</i>
</font>
</td>
</tr>
<?
} //while afsluiten
mysql_free_result($qLid);
?>
</table>
<?
print "wil jij ook een bericht toevoegen?<br>";
print "<a href=\"berichten.php\">Bericht Toevoegen</a>";
?>

- - - -
berichten.php
- - - -



<?
include('config.php');

if(isset($_POST['verzenden']))
{

$voornaam = addslashes($_POST['voornaam']);
$email = addslashes($_POST['email']);
$bericht = addslashes($_POST['bericht']);

mysql_query("INSERT INTO test (voornaam, email, bericht) VALUES ('".$voornaam."','".$email."', '".$bericht."')") or die (mysql_error());

print "Je bericht is succesvol toegevoegd";
}
else
{
?>
<center>
<form action=" <?=$_SERVER['PHP_SELF']?> " method="POST">
Voornaam: <br><input type="text" name="voornaam"><br />
E-mail: <br><input type="text" name="email"><br />
Bericht: <br><textarea name="bericht" rows="5" cols="30">Typ hier je bericht</textarea><br />
<input type="submit" name="verzenden" value="verzenden">
</form> </center>
<?
}
?>
[/code]
Laatst bijgewerkt door Marcello op 01 jan 1970 01:00, in totaal 1 keer bewerkt.
Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [PHP] Gastenboek met mysql

Berichtdoor Derk » 02 maart 2006 15:23

Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: [PHP] Gastenboek met mysql

Berichtdoor Marcello » 02 maart 2006 16:07

Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [PHP] Gastenboek met mysql

Berichtdoor KillerSponge » 02 maart 2006 17:33

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [PHP] Gastenboek met mysql

Berichtdoor Derk » 02 maart 2006 18:05

Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: [PHP] Gastenboek met mysql

Berichtdoor Marcello » 02 maart 2006 18:32

Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [PHP] Gastenboek met mysql

Berichtdoor KillerSponge » 02 maart 2006 18:35

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [PHP] Gastenboek met mysql

Berichtdoor Marcello » 02 maart 2006 18:39

Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [PHP] Gastenboek met mysql

Berichtdoor Derk » 02 maart 2006 19:29

Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: [PHP] Gastenboek met mysql

Berichtdoor Marcello » 02 maart 2006 19:52

Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [PHP] Gastenboek met mysql

Berichtdoor Dotcpu » 02 maart 2006 19:56

Dotcpu
wmpr
 
Berichten: 59
Geregistreerd: 11 nov 2005 18:49

Re: [PHP] Gastenboek met mysql

Berichtdoor Derk » 02 maart 2006 19:58

Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: [PHP] Gastenboek met mysql

Berichtdoor Marcello » 02 maart 2006 22:59

Het was me me wel gelukt, eerst zag ik nix, nu wel, kwam mischien door die reclkame Confused

Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen


Keer terug naar PHP, ASP, SQL



cron