CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Online Survey Application example in ASP

Print topic Send  topic

Author Message
peterr


Posts: 5971
Posted: 02/03/2007, 4:07 PM

Please refer to:
http://support.yessoftware.com/survey_example/surveys.asp
http://www.yessoftware.com/marketplace/details.php?exchange_id=15
http://forums.codecharge.com/posts.php?post_id=84367

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
wkempees


Posts: 1679
Posted: 03/05/2007, 6:08 PM

Adapted to PhP
http://www.yessoftware.com/marketplace/details.php?exchange_id=23

This is a straight translate of Peterr's example.
It contains his MsAcces DB but also the MySQL table script in the 'db' subdirectory.

Only function not implemented is the cookie handling, but it is present in commented form.

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
wkempees


Posts: 1679
Posted: 03/07/2007, 2:16 PM

PhP version only:

There is a bug in the Question->BeforeShow
This code
  
	If ($result) {  
		$Component->question_type->SetValue( $db->f("question_type") );  
		$Component->sort_order->SetValue( $db->f("sort_order") );  
		$Component->question_text->SetValue( $db->f("question_text") );  
		$Component->respondent_id->SetValue($db->f("respondent_id") );  
		//$Component->question_id->SetValue()  = populated automatically by the corresponding URL value  

should be ammended to:
(change is in the last but one line (repondent_id

  
	If ($result) {  
		$Component->question_type->SetValue( $db->f("question_type") );  
		$Component->sort_order->SetValue( $db->f("sort_order") );  
		$Component->question_text->SetValue( $db->f("question_text") );  
		$Component->respondent_id->SetValue( CCGetSession("respondent_id") );  
		//$Component->question_id->SetValue()  = populated automatically by the corresponding URL value  
  

The original code was populating the hidden respondent_id field from the question table.
As there is no such field in that table it was defaulted to NULL.
herefore in the responses table the respondent_id would not be filled properly.

Marketplace version will be uploaded as version 1.1

Walter

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.