473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Problems posting with urlencode

I have the following form :
<form action="/auction/create/" method="post"><p><label
for="auction_created">Created</label><br /></p>
<p><label for="auction_user">User</label><br /><input id="auction_user"
name="auction[user]" size="30" type="text" value="" /></p>
<p><label for="auction_auction_title">Auction title</label><br /><input
id="auction_auction_title" name="auction[auction_title]" size="30"
type="text" value="" /></p>
<p><label for="auction_auction_url">Auction url</label><br /><input
id="auction_auction_url" name="auction[auction_url]" size="30" type="text"
value="" /></p>
<p><label for="auction_modification_rec">Modification rec</label><br
/><input id="auction_modification_rec" name="auction[modification_rec]"
size="30" type="text" value="" /></p>
<p><label for="auction_state">State</label><br /><input id="auction_state"
name="auction[state]" size="30" type="text" value="" /></p><input
name="commit" type="submit" value="Create" /></form>
I post the form data with the following calls:

params = urllib.urlencode({"auction[user]" :user,
"auction[auction_title]": auction_title,"auction[auction_url]": auction_url,
"auction[modification_rec]" :recommendation, "auction[state]=":
state,"commit":"Create"})

print "Storing...."
data = urllib.urlopen(self.baseUrl,params)
When I go and view the inserted record, the record exists, but the field
values are null. It is my thinking that the backend needs the "id" value
for each input value; how do I add that data to the urlencode() call?

When I utilize the above form, all is inserted and all of the field values
appear. What data am I not accounting for with my program; for its obvious
that the browser is sending something to the server that my application is
not.

Thanks.
Oct 2 '05 #1
2 2239
Joseph Chase wrote:
When I go and view the inserted record, the record exists, but the field
values are null. It is my thinking that the backend needs the "id" value
for each input value; how do I add that data to the urlencode() call?


since the id isn't part of the form data set:

http://www.w3.org/TR/REC-html40/inte...#form-data-set

that's a bit unlikely.

printing the params string might help you figure out what's
missing.

</F>

Oct 2 '05 #2
Fredrik Lundh wrote:
Joseph Chase wrote:

When I go and view the inserted record, the record exists, but the field
values are null. It is my thinking that the backend needs the "id" value
for each input value; how do I add that data to the urlencode() call?

since the id isn't part of the form data set:

http://www.w3.org/TR/REC-html40/inte...#form-data-set

that's a bit unlikely.

printing the params string might help you figure out what's
missing.


If there's no chance of putting any debug statements into the processing
script you might consider using a proxy or submitting to a local server
to ensure that you are submitting what you think.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/

Oct 2 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: jason | last post by:
I'm having trouble incantenating this string what is the best way to do this if the string is extremely long especially for response.redirect... I tried switching between asp and html to make it...
0
by: someone | last post by:
I am in a situation where I need to package some information from Page1, submit it via POST to another server which will process the information and then send the user to another page on my server...
3
by: Doug Johnston | last post by:
Hi, I am having problems with running urlencode(select * from myfile where field like '%0002%'), in particular the like section, what I get is... like+%27%250002%25%27 ....which is fine, but...
8
by: Peter Afonin | last post by:
Hello, I've created the domain registration system in ASP.NET. I'm using HttpWebRequest to post the data to the registrar's server. So in the Post string I'm passing the data like name, address,...
6
by: Henke | last post by:
I have a web application that is used to transfer files to and from a database. The files are streamed and stored in the database that is. From one page I can download the files to the client, by...
4
by: ree32 | last post by:
I am having problems displaying links with # in the filenames. When it is clicked it doesn't show. I have tried converting the # to %23 and still no luck. Tried server.urlEncode and still no...
2
by: albert | last post by:
Hello, I'm generating an image with the GD lib. As I need to send parameters to the image, this is my code : <? $MyText = "this is my text" ; ?> <img src="MyImg.php?text=<?=$MyText ?>"...
1
by: mister-Ed | last post by:
I am displaying subcategories in my datalist, and now I have a bizarre thing happen when I add a new subcategory record in my sql database, the new subcategory link does not click into the next...
0
by: Solius | last post by:
I have been struggling for 4 days to write a connection to an XML REST API. I can't figure out what is wrong with my code that it won't connect propertly. The goal is to make a web service that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
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...
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.