By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,002 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,002 IT Pros & Developers. It's quick & easy.

Form checking in PSP(Python Server Pages)

Dheeraj Joshi
Expert 100+
P: 1,123
Is it possible to check whether the form has some value or not in PSP.

In PHP we do something like $name=isSet($_POST['name'])? 1:0

So is there any equivalent function in PSP?

Or if not.. How to validate them?
Jul 29 '09 #1
Share this Question
Share on Google+
3 Replies


YarrOfDoom
Expert 100+
P: 1,247
As far as I know, there are 2 ways of doing this in PSP: psp.apply_data() and form, both of which are described on this page.
Jul 30 '09 #2

Dheeraj Joshi
Expert 100+
P: 1,123
Thanks.. I got it working.

But I am using something like this...

something=form['something'];

and I also tried

something=form.has_key('something');

I don't know how it will support both syntax's?

Any idea?

Regards,
Dheeraj
Jul 30 '09 #3

YarrOfDoom
Expert 100+
P: 1,247
I don't really understand what you're asking in your post.
Do you want to know if it is possible to to use both syntaxes in the same code?
Perhaps you could give an example to clarify the situation.
Jul 30 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.