PHP submit form script causing blank page


Posted on 16th Feb 2014 07:03 pm by admin

Im trying to submit a form using this script, however nothing shows up on the page, does anyone know why it's not working?

Thanks

Did you know?Explore Trending and Topic pages for more stories like this.
Code: <?php

// Connects to your Database
mysql_connect("localhost","xxxx","xxxx") or die(mysql_error()); //CHANGE ME BACK!!!!!
mysql_select_db("xxxx") or die(mysql_error());

//This code runs if the form has been submitted
if (isset($_POST['submit'])) {

$date = date("y-m-d H:i:s");

$insert = sprintf("INSERT INTO members set
title = '%s' ,
body = '%s',
image = '%s',
category = '%s',
date = '%s'
",
mysql_real_escape_string($_POST['title']),
mysql_real_escape_string($_POST['body']),
mysql_real_escape_string($_POST['image']),
mysql_real_escape_string($_POST['category']),
mysql_real_escape_string($date])
);
$add_member = mysql_query($insert) or die(mysql_error());

?>
<p>Article posted</p>
<?php
}
else
{
?>
No comments posted yet

Your Answer:

Login to answer
195 Like 11 Dislike
Previous forums Next forums
Other forums

delete comma
HI,

How to delete "," at the end of the string.
Code: $match = 2009/02/03/a2corr

Loosing changed contents when used FM REUSE_ALV_GRID_DISPLAY
Hi,

I have used FM REUSE_ALV_GRID_DISPLAY in my program as below.

CALL FUNCT

Production of mango in processing industry
Hi,

We have one scenario ,company is in process industry,they are manufacturing MANGO pul

if description does not contain the following words
Hello everyone,

I am parsing a MS Excel (.xls) file and adding it's content to a mySQL databa

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

php and downloading
I want to use a php script to create two files. Then I want it to redirect (or whatever) to have tho

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

Getting rid of quotes when printing data
Hi Guys, I use the filter_var FILTER_SANITIZE_STRING to filter the textarea input. The function esca

Help with email validation please...
Hi,
Please could you help.
I have a register.php login page where users register, the detail

gather checkbox data from form into email
Hello all,

First, i'd like to thank everyone who responded to my previous posts regarding set

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash