Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Form Info Won't Post To Database

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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

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]
serge
New php-forum User
New php-forum User
 
Posts: 14
Joined: Mon Sep 16, 2002 1:25 am
Location: Ukraine


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.