HTML interesse |
|
ok dan :d heb het altijd zo gebruikt
maar... WONDERBAARLIJK dat werkt. (lokaal tenminste) zie verder.
dat moet iemand mij uitleggen.
Nu plaats ik dat op mijn host en krijg ik deze fout:
Citaat: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REQUEST_METHOD'] ==
Mijn host heeft gisteren wel een update gedaan naar mysql 5
Dit heb ik dus:
<?php
# Post the new script in the database
if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
include ('Connections/geshi.php');
# Highlight script
$path = 'geshi/';
$geshi = new GeSHi(stripslashes($_POST['source']), $_POST['language'], $path);
$code = $geshi->parse_code();
$poster = $_SESSION['username'];
$category = $_POST['category'];
$date = date(Y)."-".date(n)."-".date(d)." ".date(H).":".date(i).":".date(s);
# Query
$q = "INSERT INTO ATblPosts(Poster,Postdate,Category,Code) VALUES ('$poster','$date','$category','$code')";
mysql_query($q) or die(mysql_error());
# Echo if succesfull and redirect
echo "Your script has been posted. Please wait while we redirect you to your profile page.";
echo "<meta http-equiv=\"refresh\" content=\"3; url=index.php?p=8\" />";
}
else
{
# Show form
?>
<?php # Post the new script in the database if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) { include ('Connections/geshi.php'); # Highlight script $path = 'geshi/'; $geshi = new GeSHi (stripslashes($_POST['source']), $_POST['language'], $path); $code = $geshi->parse_code(); $poster = $_SESSION['username']; $category = $_POST['category']; # Query $q = "INSERT INTO ATblPosts(Poster,Postdate,Category,Code) VALUES ('$poster','$date','$category','$code')"; # Echo if succesfull and redirect echo "Your script has been posted. Please wait while we redirect you to your profile page."; echo "<meta http-equiv=\"refresh\" content=\"3; url=index.php?p=8\" />"; } else { # Show form ?>
ow ja mijn include connect.php zit er ook hoor. Alleen al in de head enzo.. ik werk namelijk met een soort van sql navigatie |