empty form fields

Nihat Ciddi nikinakof at gmx.net
Sun Sep 23 22:50:41 CEST 2001

how can i control empty form fields in a html form. i tried the code
below; but it is not working. example, what can i do ?

	form = cgi.FieldStorage()

	web = form["web"].value
	icq_no = form["icq_no"].value
	meslek = form["meslek"].value
	isyeri = form["isyeri"].value
	cinsiyet = form["cinsiyet"].value
	notlar = form["notlar"].value
	ozgecmis = form["ozgecmis"].value
	dt_gun = form["dt_gun"].value
	dt_ay = form["dt_ay"].value
	dt_yil = form["dt_yil"].value
	dogum_tarihi = "19%s-%s-%s" %(dt_yil, dt_ay, dt_gun)
	mesaj_yonlendir = form["yonlendir"].value

	print web, icq_no, dogum_tarihi


		d = form.keys()
		for i in range(len(d)):
			if form[d[i]].value == None: 
				form[d[i]].value = "field empty"
				print form[d[i]].value


		print "	zicti(error..)"


Nihat Ciddi nikinakof at gmx.net http://nikinakof.cjb.net

More information about the Python-list mailing list