Firstly I'm gonna presume you've got the Global Variables turned off, so you'll need to refer to each variable as $_POST['city'] instead of just $city.
Also, try printing out the $sql variable to see if the query is being made up and structured correctly.
Form Info Won't Post To Database
Moderators: egami, macek, gesf
:lol: Well, you try to insert strings into a table without qoutes?!
BUT! You must replace all escape characters(for instanse, same qoutes) in all fields, that may have the string data type.
P.S. RTFM
------------------------
With best regards,
Serge Bulanov
AlarIT Web developer,
www.AlarIT.com [/code]

Code: Select all
$sql="INSERT INTO LISTINGS (city, street, price, bedrooms, baths, sqfeet, directions, description, picture) VALUES ('$city', '$street', '$price', '$bedrooms', '$baths', '$sqfeet', '$directions', '$description', '$picture');";
BUT! You must replace all escape characters(for instanse, same qoutes) in all fields, that may have the string data type.
P.S. RTFM
------------------------
With best regards,
Serge Bulanov
AlarIT Web developer,
www.AlarIT.com [/code]