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
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
{
?>
I need an iframe that calls up a different page according to the date
hiI don't know any php (only html) and I urgently need to do the following: I need an iframe that calls up a different page according to the date e.g. on the 2th Dec a page called 'special2.php',
Problem with variable declaration in switch statement
Hello, I am having some trouble assigning a value to a variable inside a switch statement. What I am trying to do here is trip an error if the user has already added an item in the shopping cart.
insert PHP code into function
Hi,I'm having problems when trying following:I have:Code: [Select]createBar("Download: <b>$kwd</b><Br />", "100%")and I'm trying to
Firefox displaying PHP source code??
Currently testing a site thats almost built, am going to be including php on a sidebar on all pages so thought it'd be easier to just make all pages .php, however when i upload and try and view, in
Problem with passing variables
I'm not really a php programmer so I'm really struggling with this issue. I have a banner script that is supposed to send people to an affiliate site and pass the parameters along with it.For
show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i am checking if it is URL or not. if it is URL, let take an example google.com so it should take me
Show specific day of the week
I have been racking my brain trying to get this function to work properly and it is doing so for everything but Sundays. What I am trying to do is display all dates within a specified date range that
Multiple Dropdown Selections
I have a form that let's a user insert a page with the ability to select categories. I want them to have the ability to select multiple categories. I have a select drop down menu with the
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a new user when I'm not logged in. It should redirect me back to the login page but I get this
help with variable
I've got a problem, i want to echo some images depending on the $id, however for me to get that id i have to extract it from a query. So i've done that, but i want to extract all id's (not just 1), so