Form Info Won't Post To Database

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Jay

Postby Jay » 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.

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

Postby serge » 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.

P.S. RTFM

------------------------
With best regards,
Serge Bulanov
AlarIT Web developer,
www.AlarIT.com [/code]


Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests