oke nu heb ik in de mysql tabel effe gedit nu krijg ik het wel te zien dus het is iets met de connectie bij dit bestand:
-----------------------
<?php
include("style.css");
include("config.php");
$day = date("j");
$month = date("m");
$year = date("Y");
$space = " ";
$month = str_replace("01", "Januari", $month);
$month = str_replace("02", "Februari", $month);
$month = str_replace("03", "Maart", $month);
$month = str_replace("04", "April", $month);
$month = str_replace("05", "Mei", $month);
$month = str_replace("06", "Juni", $month);
$month = str_replace("07", "Juli", $month);
$month = str_replace("08", "Augustus", $month);
$month = str_replace("09", "September", $month);
$month = str_replace("10", "Oktober", $month);
$month = str_replace("11", "November", $month);
$month = str_replace("12", "December", $month);
$time = date("H:i:s");
$datum = $day.$space.$month.$space.$year;
if ($_POST) {
if ($_POST['titel'] == '')
{
echo "Error! Titel niet ingevuld.";
}
elseif ($_POST['auteur'] == '')
{
echo "Error! Naam niet ingevuld.";
}
elseif ($_POST['email'] == '')
{
echo "Error! Email niet ingevuld.";
}
elseif ($_POST['uitleg'] == '')
{
echo "Error! Uitleg niet ingevuld.";
}
elseif ($_POST['code'] == '')
{
echo "Error! Code niet ingevuld.";
}
else {
$sql = "INSERT INTO script (titel, cat, auteur, email, datum, ip, uitleg, code)
VALUES ('".$titel."', '".$cat."', '".$auteur."', '".$email."', '".$datum."', '".$ip."', '".addslashes($_POST['uitleg'])."', '".$code."')";
mysql_query($sql) or die ("fout in query");
echo "Script is succesvol toegevoegd.<p>";
echo "<a href=\"scripts.php\">Ga naar de index</a>";
}
}
else {
?>
<form action="voegtoe.php" method="post">
<b>Titel:</b><br>
<input type="text" name="titel">
<br>
<b>Categorie:</b><br>
<select name="cat">
<option>Kies je Categorie</option>
<option>--------------------</option>
<option value="HTML">HTML</option>
<option value="PHP">PHP</option>
<option value="PHP & MySQL">PHP & MySQL</option>
<option value="MySQL">MySQL</option>
<option value="Javascript">Javascript</option>
<option value="CSS">CSS</option>
<option value="Overige">Overige</option>
</select>
<br>
<b>Auteur:</b><br>
<input type="text" name="auteur">
<br>
<b>E-mail:</b><br>
<input type="text" name="email">
<br>
<br>
<b>Uitleg:</b>
<p>
<textarea name="uitleg" cols="90" rows="10" id="uitleg"></textarea>
<br>
<br><b>Code:</b><p>
<textarea name="code" cols="90" rows="10" id="code"></textarea>
<p><input type="submit" name="Submit" value="Toevoegen">
</form>
<?php }
?>
-------------------------
aub help me
Link gekopieerd
oke nu heb ik in de mysql tabel effe gedit nu krijg ik het wel te zien dus het is iets met de connectie bij dit bestand:
-----------------------
<?php
include("style.css");
include("config.php");
$day = date("j");
$month = date("m");
$year = date("Y");
$space = " ";
$month = str_replace("01", "Januari", $month);
$month = str_replace("02", "Februari", $month);
$month = str_replace("03", "Maart", $month);
$month = str_replace("04", "April", $month);
$month = str_replace("05", "Mei", $month);
$month = str_replace("06", "Juni", $month);
$month = str_replace("07", "Juli", $month);
$month = str_replace("08", "Augustus", $month);
$month = str_replace("09", "September", $month);
$month = str_replace("10", "Oktober", $month);
$month = str_replace("11", "November", $month);
$month = str_replace("12", "December", $month);
$time = date("H:i:s");
$datum = $day.$space.$month.$space.$year;
if ($_POST) {
if ($_POST['titel'] == '')
{
echo "Error! Titel niet ingevuld.";
}
elseif ($_POST['auteur'] == '')
{
echo "Error! Naam niet ingevuld.";
}
elseif ($_POST['email'] == '')
{
echo "Error! Email niet ingevuld.";
}
elseif ($_POST['uitleg'] == '')
{
echo "Error! Uitleg niet ingevuld.";
}
elseif ($_POST['code'] == '')
{
echo "Error! Code niet ingevuld.";
}
else {
$sql = "INSERT INTO script (titel, cat, auteur, email, datum, ip, uitleg, code)
VALUES ('".$titel."', '".$cat."', '".$auteur."', '".$email."', '".$datum."', '".$ip."', '".addslashes($_POST['uitleg'])."', '".$code."')";
mysql_query($sql) or die ("fout in query");
echo "Script is succesvol toegevoegd.<p>";
echo "<a href=\"scripts.php\">Ga naar de index</a>";
}
}
else {
?>
<form action="voegtoe.php" method="post">
<b>Titel:</b><br>
<input type="text" name="titel">
<br>
<b>Categorie:</b><br>
<select name="cat">
<option>Kies je Categorie</option>
<option>--------------------</option>
<option value="HTML">HTML</option>
<option value="PHP">PHP</option>
<option value="PHP & MySQL">PHP & MySQL</option>
<option value="MySQL">MySQL</option>
<option value="Javascript">Javascript</option>
<option value="CSS">CSS</option>
<option value="Overige">Overige</option>
</select>
<br>
<b>Auteur:</b><br>
<input type="text" name="auteur">
<br>
<b>E-mail:</b><br>
<input type="text" name="email">
<br>
<br>
<b>Uitleg:</b>
<p>
<textarea name="uitleg" cols="90" rows="10" id="uitleg"></textarea>
<br>
<br><b>Code:</b><p>
<textarea name="code" cols="90" rows="10" id="code"></textarea>
<p><input type="submit" name="Submit" value="Toevoegen">
</form>
<?php }
?>
-------------------------
aub help me
Link gekopieerd
oke nu heb ik in de mysql tabel effe gedit nu krijg ik het wel te zien dus het is iets met de connectie bij dit bestand:
-----------------------
<?php
include("style.css");
include("config.php");
$day = date("j");
$month = date("m");
$year = date("Y");
$space = " ";
$month = str_replace("01", "Januari", $month);
$month = str_replace("02", "Februari", $month);
$month = str_replace("03", "Maart", $month);
$month = str_replace("04", "April", $month);
$month = str_replace("05", "Mei", $month);
$month = str_replace("06", "Juni", $month);
$month = str_replace("07", "Juli", $month);
$month = str_replace("08", "Augustus", $month);
$month = str_replace("09", "September", $month);
$month = str_replace("10", "Oktober", $month);
$month = str_replace("11", "November", $month);
$month = str_replace("12", "December", $month);
$time = date("H:i:s");
$datum = $day.$space.$month.$space.$year;
if ($_POST) {
if ($_POST['titel'] == '')
{
echo "Error! Titel niet ingevuld.";
}
elseif ($_POST['auteur'] == '')
{
echo "Error! Naam niet ingevuld.";
}
elseif ($_POST['email'] == '')
{
echo "Error! Email niet ingevuld.";
}
elseif ($_POST['uitleg'] == '')
{
echo "Error! Uitleg niet ingevuld.";
}
elseif ($_POST['code'] == '')
{
echo "Error! Code niet ingevuld.";
}
else {
$sql = "INSERT INTO script (titel, cat, auteur, email, datum, ip, uitleg, code)
VALUES ('".$titel."', '".$cat."', '".$auteur."', '".$email."', '".$datum."', '".$ip."', '".addslashes($_POST['uitleg'])."', '".$code."')";
mysql_query($sql) or die ("fout in query");
echo "Script is succesvol toegevoegd.<p>";
echo "<a href=\"scripts.php\">Ga naar de index</a>";
}
}
else {
?>
<form action="voegtoe.php" method="post">
<b>Titel:</b><br>
<input type="text" name="titel">
<br>
<b>Categorie:</b><br>
<select name="cat">
<option>Kies je Categorie</option>
<option>--------------------</option>
<option value="HTML">HTML</option>
<option value="PHP">PHP</option>
<option value="PHP & MySQL">PHP & MySQL</option>
<option value="MySQL">MySQL</option>
<option value="Javascript">Javascript</option>
<option value="CSS">CSS</option>
<option value="Overige">Overige</option>
</select>
<br>
<b>Auteur:</b><br>
<input type="text" name="auteur">
<br>
<b>E-mail:</b><br>
<input type="text" name="email">
<br>
<br>
<b>Uitleg:</b>
<p>
<textarea name="uitleg" cols="90" rows="10" id="uitleg"></textarea>
<br>
<br><b>Code:</b><p>
<textarea name="code" cols="90" rows="10" id="code"></textarea>
<p><input type="submit" name="Submit" value="Toevoegen">
</form>
<?php }
?>
-------------------------
aub help me
Link gekopieerd
en ook als ik het script bekijk krijg ik deze fout Notice: Use of undefined constant code - assumed 'code' in c:\program files\easyphp1-7\www\pchawk\v2\script systeem\script.php on line 48 maar ik kan niks vinden in script.php
Link gekopieerd
watte mijn bericht word boven 4 keer verdubbeld?
Link gekopieerd