ik maak deze code voor je,
als ik klaar ben verander ik deze tekst.
in je code. (a)
				
				Nieuwe reactie samengevoegd met originele reactie op 11.04.11 23:27:32:
			Alsjeblieft.
deze werkt ik heb alle if en else dubbel gecheckt. 8-|
	
	
		<?php
require_once("../config1.inc.php");
require ("beveiliging.php");
include("header1.php");
if($_GET['action'] == 'toevoegen'){
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        $errors = array ();
        foreach ($_POST as $key => $value) {
            $value = trim ($value);
            if (empty ($value)) {
                array_push ($errors, '<p>Vul iets in bij ' . $key . '</p>');
            }
        }
        if (empty ($errors)) {  
          $titel = mysql_real_escape_string($_POST['titel']);
          $doelurl = mysql_real_escape_string($_POST['doelurl']);
          $tekst = mysql_real_escape_string($_POST['tekst']);
                
        $sql = "INSERT INTO links(titel,doelurl,tekst)  VALUES('".$titel."','".$doelurl."','".$tekst."')";
         if(!$res = mysql_query($sql)){
             trigger_error(mysql_error().'In query: '.$sql);
         }     
            if($res){
                echo 'De link is toegevoegd, <a href="admin.php">Ga terug naar admin</a>';
            }else{
                echo 'Er is iets misgegaan bij het toevoegen van de link.';
            }
         }
      }else{
?>
<form action="?action=toevoegen" method="post">
<table width="100%">
 <tr>
  <td>Titel: </td>
  <td><input type="text" name="titel" maxlength="45" value=""> </td>
 </tr>
 <tr>
  <td>Doel url: </td>
  <td><input type="text" name="doelurl" maxlength="75" value="http://"> </td>
 </tr>
 <tr>
  <td>Tekst: </td>
  <td><input type="text" name="tekst" maxlength="75" value="">
  
  <input type="submit" value="Toevoegen"> </td>
 </tr>
</table>
</form>
<?php
}
}else{
echo "De pagina is niet gevonden!";
}
include("footer.php");
?>
	
			Toon Meer
	 
	
aanroepen met joubestand.php?action=toevoegen
.
				
				Nieuwe reactie samengevoegd met originele reactie op 12.04.11 20:54:45:
			is het nou gelukt want altijd als ik me best doe om de code te maken krijg ik nooit een feed back.