close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Page redirect after submit

Thread began 10/07/2011 1:57 am by jvorzimer358609 | Last modified 10/10/2011 3:55 pm by jvorzimer358609 | 973 views | 7 replies

Jason ByrnesWebAssist

  and need to check the score  

so this is a test of some sort?

This is going to take some custom coding to accomplish

you will need to have a database with a table of answers:
answerID - Primary Key
answerText - varchar

then create a recordset to look up the answers entered and compare them against the answers in the db, using the COUNT function you can return a number of matches.

for example, lets say you have form elements named "answerOne" and "answerTwo". create the recordset using advaced view as:

SELECT COUNT(answerID) as testScore
FROM answers
WHERE answerText = paramAnswerOne AND answerText = paramAnswerTwo

in the Variables section, create the two parameters:

Name: paramAnswerOne
Type: text
Default value: -1
Runtime Value: $_POST['answerOne']

Name: paramAnswerTwo
Type: text
Default value: -1
Runtime Value: $_POST['answerTwo']

the you can use an if statement to do the redirect based on the testScore from the recordset


if($row_recordsetName['testScore'] == 2) {
header("Location: page1.php");
} else {
header("Location: page2.php");

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...