Form Info Won't Post To Database

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply

Sat Sep 28, 2002 2:23 am

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.

New php-forum User
New php-forum User
Posts: 14
Joined: Mon Sep 16, 2002 1:25 am
Location: Ukraine

Sun Sep 29, 2002 11:27 pm

:lol: Well, you try to insert strings into a table without qoutes?! :D

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.


With best regards,
Serge Bulanov
AlarIT Web developer, [/code]

Post Reply