Error

Gestart doorOne2xs6 reacties29 weergaven

7 berichten · pagina 1 van 1

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Bij dit script:
nieuwstoevoegen.php

[COLOR= #0000BB]<?php[/COLOR]    
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR] 

[COLOR= #0000BB]$arraymaand[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Januari"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"Februari"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"Maart"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"April"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"Mei"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"Juni"[/COLOR][COLOR= #007700],[/COLOR]   
[COLOR= #DD0000]"Juli"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"Augustus"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"September"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"Oktober"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"November"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"December"[/COLOR][COLOR= #007700]);[/COLOR]  

[COLOR= #0000BB]$maand[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"n"[/COLOR][COLOR= #007700]) -[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$datum[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"j "[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #0000BB]$arraymaand[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$maand[/COLOR][COLOR= #007700]] .[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]" Y"[/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][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]))[/COLOR]   
    [COLOR= #0000BB]$error[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"Je moet een bericht invullen!"[/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]$naam[/COLOR][COLOR= #007700]))[/COLOR]  
    [COLOR= #0000BB]$error[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"Je moet je naam invullen!"[/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]$emailadres[/COLOR][COLOR= #007700]))[/COLOR]
    [COLOR= #0000BB]$error[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"Je moet je e-mailadres invullen!"[/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]$onderwerp[/COLOR][COLOR= #007700]))[/COLOR]  
    [COLOR= #0000BB]$error[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"Je moet een onderwerp invullen!"[/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]$error[/COLOR][COLOR= #007700])) {[/COLOR]    
       
     [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO nieuws (datum,bericht,emailadres,onderwerp,naam) VALUES 
                 ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]emailadres[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]",
                 "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]onderwerp[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]    
?> 
<div align="center"> 
  <table width="39%" border="1" cellspacing="3" cellpadding="2" bordercolor="#999999" bgcolor="#666666"> 
    <tr> 
         
      <td height="22" bgcolor="#999999"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Nieuws 
        toevoegen: </b></font></td> 
      </tr> 
      <tr> 
         
      <td height="46" bgcolor="#CCCCCC"> 
        <div align="left"><font face="Arial, Helvetica, sans-serif" size="-1">Het 
          nieuws is <b>succesvol</b> toegevoegd!</font></div> 
        </td> 
      </tr> 
      <tr> 
         
      <td height="21" bgcolor="#999999"> 
        <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">[ 
          Terug naar <a href="nieuws.php">nieuws</a> ]</font></div> 
        </td> 
      </tr> 
</table> 
</div> 
[COLOR= #0000BB]<?php[/COLOR] 
  [COLOR= #007700]}[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$error[/COLOR][COLOR= #007700])) {[/COLOR] 
?> 
<div align="center"> 
  <table width="39%" border="1" cellspacing="3" cellpadding="2" bordercolor="#999999" bgcolor="#666666"> 
    <tr> 
      <td height="22" bgcolor="#999999"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Nieuws 
        toevoegen: </b></font> </td> 
  </tr> 
  <tr> 
      <td height="23" bgcolor="#CCCCCC"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
        <tr> 
          <td width="97%"> 
            <font face="Arial" color="red" size="-1"><b>Error:</b> 
            <?= $error; ?> 
            </font> 
          </td> 
          <td width="3%"> 
            <div align="right"> 
            <input onClick="javascript:history.go(-1);" type="button" name="Button" value="Terug"> 
            </div> 
          </td> 
        </tr> 
      </table> 
    </td> 
  </tr> 
</table> 
</div> 
[COLOR= #0000BB]<?php[/COLOR] 
  [COLOR= #007700]} 
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] 
?> 
<form action="" method="post"> 
<div align="center"> 
    <table width="39%" border="1" cellspacing="2" cellpadding="2" bordercolor="#999999" bgcolor="#666666"> 
      <tr bgcolor="#999999"> 
        <td colspan="2" height="22"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Nieuws 
          toevoegen: </b></font></td> 
      </tr> 
      <tr bgcolor="#CCCCCC"> 
        <td width="58%"> 
          <div align="left"><font size="-1" face="Verdana, Arial, Helvetica, 
sans-serif">Je naam: </font></div> 
        </td> 
        <td width="42%"><font size="-1"><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"> 
          <input type="text" name="naam" size="30"> 
          </font></font></font></td> 
      </tr> 
      <tr bgcolor="#CCCCCC"> 
        <td width="58%"> 
          <div align="left"><font size="-1"><font size="-1"> <font face="Verdana, Arial, Helvetica, sans-serif"> 
            </font></font><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Je 
            e-mailadres: </font><font face="Verdana, Arial, Helvetica, sans-serif"> 
            </font></font></div> 
        </td> 
        <td width="42%"><font size="-1"><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"> 
          <input type="text" name="emailadres" size="30"> 
          </font></font></font></td> 
      </tr> 
      <tr bgcolor="#CCCCCC"> 
        <td width="58%"> 
          <div align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Het 
            onderwerp: </font></div> 
        </td> 
        <td width="42%"><font size="-1"><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"> 
          <input type="text" name="onderwerp" size="30"> 
          </font></font></font></td> 
      </tr> 
      <tr bgcolor="#CCCCCC"> 
        <td colspan="2"> 
          <div align="center"><font face="Verdana, Arial, Helvetica, 
sans-serif" size="-1">Bericht: </font><font size="-1" 
face="Verdana, Arial, Helvetica, sans-serif"> </font></div> 
        </td> 
      </tr> 
      <tr bgcolor="#CCCCCC"> 
        <td colspan="2"> 
          <div align="center"><font size="-1"><font size="-1"> <font face="Verdana, Arial, Helvetica, sans-serif"> 
            </font></font><font face="Verdana, Arial, Helvetica, sans-serif"> 
            <textarea name="bericht" cols="50" rows="20" wrap="VIRTUAL"></textarea> 
            </font></font></div> 
        </td> 
      </tr> 
      <tr bgcolor="#CCCCCC"> 
        <td colspan="2">&nbsp; </td> 
      </tr> 
      <tr bgcolor="#999999"> 
        <td colspan="2" height="20"> 
          <div align="center"> 
            <input type="submit" value="Post nieuws" name="submit"> 
            <input type="reset" value="Wis velden" name="reset"> 
           <input type="button" value="Terug naar nieuws" 
onClick="window.location=nieuws.php " name="button"> 
          </div> 
        </td> 
      </tr> 
    </table> 
</div> 
</form> 
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR] ?>


krijg ik dit:
Parse error: syntax error, unexpected T_ISSET, expecting ( in /home/fskpro/domains/fskproductie.nl/public_html/gamesite/nieuwstoevoegen.php on line 50

Kan iemand mij helpen?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
op lijn 50 moet zijn:
elseif (isset())
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Ik doe het volgens mij verkeerd, hoe moet het worden?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
} elseif (isset($error)) {
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Hij werkt, maar als ik op post druk:
error: Je moet een onderwerp invullen!
En dat heb ik gedaan
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
$onderwerp bestaat ook niet, dus dan is dat normaal dat ie dat doet.. emo
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Ik heb het al thx
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