nieuwsscript probleem (beloning!)

Gestart doorJordyvc4 reacties31 weergaven

5 berichten · pagina 1 van 1

Jordyvc

Lid · Topicstarter

Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hey,
Ik heb een probleem met mijn nieuwsscript confusedals ik nieuws heb toegevoegd dan is het bericht zelf "0" terwijl
ik véél meer heb ingetypt dan "0"
http://ns2.largeweb.nl/~jordyvc/nieuwsscript/nieuws.php
link boven kan je het zien.
Weet iemand hoe het komt?

Alvast bedankt,
jordyvc

// Edit: wie het eerst heeft krijgt 0,05 Pt als het werkt thumbsup EDIT// GEVONDEN
0
Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
heb je het script van het Posten voor me?
0
Jordyvc

Lid · Topicstarter

Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Smiegles schreef:
heb je het script van het Posten voor me?
postnieuws.php

[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"../config.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"ubb.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>
<html>
<head>
<title>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$titel[/COLOR][COLOR= #007700]);[/COLOR] ?> - Admin</title>
<link rel="stylesheet" href="../style.css">
</head>
<body>
<div align="center"><font color=yellowgreen></font> <b>Nieuws toevoegen</b></div><br />
<center>
[COLOR= #0000BB]<?
$datum[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]j - n - Y[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$tijd[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]H:i:s[/COLOR][COLOR= #007700]);[/COLOR]
?>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]actie[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700]){[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]$adminnaam[/COLOR] [COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]$password[/COLOR][COLOR= #007700]){[/COLOR]
        [URL="http://www.php.net/Setcookie"]Setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"gebruikersnaam"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]],[/COLOR] [URL="http://www.php.net/Time"]Time[/URL][COLOR= #007700]()+[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijdingelogd[/COLOR][COLOR= #007700]]);[/COLOR]
        [URL="http://www.php.net/Setcookie"]Setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"wachtwoord"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]],[/COLOR] [URL="http://www.php.net/Time"]Time[/URL][COLOR= #007700]()+[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijdingelogd[/COLOR][COLOR= #007700]]);[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=yellowgreen>»</font> Je bent succesvol ingelogd! Je wordt over 2 seconden naar je pagina gestuurd."[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<META HTTP-EQUIV="REFRESH" CONTENT="2; URL=postnieuws.php">"[/COLOR][COLOR= #007700];
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=yellowgreen>»</font> <b>Error:</b> Je hebt 1 of meer velden niet correct ingevuld."[/COLOR][COLOR= #007700];
    }
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]$adminnaam[/COLOR] [COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]$password[/COLOR][COLOR= #007700]){[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<form name="inloggen" action="postnieuws.php?actie=2" method="POST">
        Gebruikersnaam:<br><input type="text" name="gebruikersnaam"><br><br>
        Wachtwoord:<br><input type="password" name="wachtwoord"><br><br>
        Tijd ingelogd:<br><select size="1" name="tijdingelogd">
        <option value="3600">Een uur</option>
        <option value="86400">Een dag</option>
        <option value="604800">Een week</option>
        <option value="18144000">Een maand</option>
        <option value="22118400">Een jaar</option>
        <option value="2211840000">Altijd</option>
        </select><br>
        <input type="submit" name="verzenden" value="login">
        </form>
        "[/COLOR][COLOR= #007700];
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]Submit[COLOR= #007700]]){[/COLOR] 
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]titel[COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]""[/COLOR] AND [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]bericht[COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]""[/COLOR] AND [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]naam[COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]){[/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO nieuws (titel, naam, bericht, datum, tijd) VALUES ($_POST[titel], $_POST[naam], $_POST[bericht], $datum, $tijd )"[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<font color=yellowgreen>»</font> Je nieuws is succesvol toegevoegd klik <a href="../nieuws.php">hier</a> om het te bekijken."[/COLOR][COLOR= #007700];
    }[/COLOR] 
    [URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR] 
        [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<font color=yellowgreen>»</font> <b>Error:</b> Je moet wel alle velden invullen."[/COLOR][COLOR= #007700];
    } 
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<form name="form" method="post" action=""><table width="400" border="0" cellspacing="0">
  <tr>
      <td width="50%">Titel</td>
    <td width="50%">
        <input type="text" name="titel">
      </td>
  </tr>
  <tr>
      <td width="50%">Door</td>
    <td width="50%">
        <input type="text" name="naam">
      </td>
  </tr>
  <tr> 
  </tr> 
  <tr>
      <td>Nieuws </td>
      <td>"[/COLOR][COLOR= #007700];[/COLOR]
      klik[COLOR= #007700]();[/COLOR] buttons[COLOR= #007700]();[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<textarea rows=5 cols="60" name="bericht"></textarea><br>"[/COLOR][COLOR= #007700];[/COLOR]
      smileys[COLOR= #007700]();[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</td>
  </tr>
  <tr>
  <td width="50%"></td>
    <td><input type="submit" name="Submit" value="Post nieuws!"></td>
  </tr> 
</table> 
</form><br><br><br><a href="admin.php"><font color=yellowgreen>»</font> Terug naar admin</a><br>"[/COLOR][COLOR= #007700];
}
}
}[/COLOR]
?>
</center>
</body>
</html>
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Staat in de database die tabel bij structuur staat dat op INT of op TEXT?
0
Jordyvc

Lid · Topicstarter

Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het is al opgelost, maar toch bedankt ( ik heb een ander script gedownwload bloos)
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