help!!
Error message: End of script output before headers: customer_add.py -
import psycopg2
-
-
con = None
-
import cgi;
-
data = cgi.FieldStorage();
-
-
try:
-
customer_id = data['customer_id'].value
-
customer_lname = data['customer_lname'].value;
-
customer_fname = data['customer_fname'].value;
-
customer_mname = data['customer_mname'].value;
-
customer_birthday = data['customer_birthday'].value;
-
customer_email = data['customer_email'].value;
-
customer_contact = data['customer_contact'].value;
-
customer_address = data['customer_address'].value;
-
customer_job = data['customer_job'].value;
-
customer_company = data['customer_company'].value;
-
customer = (
-
(customer_id, customer_lname , customer_fname , customer_mname ,
-
-
customer_birthday, customer_email , customer_contact, customer_address,
-
-
customer_job, customer_company)
-
)
-
con = psycopg2.connect(database='fhms', user='admin', password='admin')
-
cur = con.cursor()
-
query = """INSERT INTO t_customer(customer_id, customer_lname,
-
-
customer_fname, customer_mname, customer_birthday, customer_email,
-
-
customer_contact, customer_address, customer_job, customer_company) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"""
-
cur.execute(query, customer)
-
-
con.commit()
-
print "Customer Successfully Added"
0 1618 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Philip Ronan |
last post by:
OK, here's my 2p worth:
===
Q. Why am I getting the error message 'Headers already sent'?
A. PHP produces this error message when you try to set a header for a web
page after you have already...
|
by: lkrubner |
last post by:
I'm getting this error:
Warning: session_start(): Cannot send session cache limiter - headers
already sent in
/home/httpd/vhosts/publicdomainsoftware.org/httpdocs/pdsIncludes/McSessionInfo.php...
|
by: Morten Goodwin Olsen |
last post by:
Python, PostgreSQL and bytea
Hi
I am having a bit of trouble inserting images into a postgres database
using python. The images should be stored in a bytea field.
I have tried both with an odbc...
|
by: John Pawlicki |
last post by:
I did a new install of SuSE 9.1 and had SuSE do the install via it's rpm
packages install postgresql 7.4.2. I did a pg_dump prior to this and a
restore after the new install. The database is fine....
|
by: Jerry LeVan |
last post by:
Is it possible to build the python postgresql support library
on Mac OSX 10.3.5 with the default python install?
Adding "--with-python" gets an error message about libpython
not being a shared...
|
by: jallam |
last post by:
Hi,
I have a Python script to upload the Invoice data which is in .csv file to OTM (GLOG) system. I'm running this script using the command(given below) using a shell script and capturing the...
|
by: sigkill9 |
last post by:
I'm trying to create a script that will accept a user entered integer and find only one set of prime numbers that add up to that integer but need some help. The script is supposed to only accept...
|
by: Keith Bailey |
last post by:
Dear All,
Any help on this would be hugely appreciated.
I have had a Python programme written for me, but when I try to run it,
I get the following error message:
/*Traceback (most recent...
|
by: stephen flacke |
last post by:
Hi, if anyone can help me unscramble this exception report from Python I'd be hugely grateful. All I'm trying to do is carry out is call VISUM and carry a flow bundle. I think the problem may be with...
|
by: myxenex |
last post by:
I GET THE ERROR MESSAGE:
Warning: session_start() : Cannot send session cache limiter - headers already sent (output started at /home/aagconsu/public_html/aplomarksdtc.co.za/login.php:15) in...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |