Nieuw lid |
|
<?
include "../config.php";
$action = @$_GET['action'];
$pageid = @$_GET['pageid'];
if ($action == "edit"){
$ophalen = mysql_query("SELECT * FROM pagina WHERE pageid = $pageid") or die (mysql_error());
while($sql = mysql_fetch_array($ophalen))
{
$content = @$sql['content'];
}
?>
<form action="page_edit.php?action=submit&pageid=<?= $pageid ?>" method="POST">
<textarea va cols="50" rows="15" name="bericht"><?=$content;?></textarea><br />
<input type="submit" name="submit" value="Verzenden">
</form>
<?
}
if ($action == "submit"){
$content = @$_POST['content'];
echo $pageid;
echo $content;
}
else {
$ophalen = mysql_query("SELECT * FROM pagina") or die (mysql_error());
while($sql = mysql_fetch_array($ophalen))
{
$content = @$sql['content'];
$pageid = @$sql['pageid'];
?>
<table>
<tr>
<td>
<a href="page_edit.php?action=edit&pageid=<?=$pageid?>"><?=$sql['page'];?></a>
</td>
</tr>
</table>
<?
}
}
?>
<? include "../config.php"; $action = @$_GET['action']; $pageid = @$_GET['pageid']; if ($action == "edit"){ { $content = @$sql['content']; } ?> <form action="page_edit.php?action=submit&pageid=<?= $pageid ?>" method="POST"> <textarea va cols="50" rows="15" name="bericht"><?=$content;?></textarea><br /> <input type="submit" name="submit" value="Verzenden"> </form> <? } if ($action == "submit"){ $content = @$_POST['content']; } else { { $content = @$sql['content']; $pageid = @$sql['pageid']; ?> <table> <tr> <td> <a href="page_edit.php?action=edit&pageid=<?=$pageid?>"><?=$sql['page'];?></a> </td> </tr> </table> <? } } ?>
Hier ben ik mee bezig!
maar als ik hem wil submitten geeft hij de $content niet weer! de variable $pageid wel!
wat doe ik fout ?
bvd
EDIT : opgelost! name=berichten moet name=content worden
|