Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP Problem

Name: Anonymous 2008-02-09 17:51

Ok /prog/, I've written a blog submission script in php, and I am having quite a few problems with it. As far as I know it's perfect, but whenever I submit data the script doesn't seem to be working. I've had it working twice already, but every single time I delete the blog submission it stops working again. Here is the script:

<?php

$user="xxxxxxxxx";
$host="mysql.xxxxxxxx.net";
$password="xxxxxxxxx";
$database="xxxxxxxxxx";

$connection = mysql_connect($host,$user,$password)
or die ("couldn't connect to server"); $db = mysql_select_db($database,$connection)
or die ("Couldn't select database");

$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['email']);
$entry = strip_tags($_POST['entry']);
$title = strip_tags($_POST['title']);
$btime =  strip_tags($_POST['btime']);
$etime =  strip_tags($_POST['etime']);
$icon =  strip_tags($_POST['icon']);

    if ($name=="" || $email=="" || $entry=="" || $title=="")
    {
        die ("You must fill in all fields, please click back and try again.");
    }

else {
    $query = "insert into `blog` (id,name,title,email,entry,btime,etime,icon)";
    $result = mysql_query($query);
   
    if ($result)
    {
        echo 'News entry hath been submitted.';
    }
}
?>

Halp ;-;.

Name: Anonymous 2008-02-09 19:03

>>11
This might surprise you, but not every file is owned by root.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List