Jump to content

submit or continue


light-angel

Recommended Posts

so would it be something like this?

 

<script type="text/javascript">

<!--

function goToSite(yn) {

if(yn=='yes') {

location.href='/email.php';

}

else {

location.href='/page10.php';

}

}

//-->

</script>

 

<form action="#">

<div>

<input type="radio" name="ES" value="yes" onclick="goToSite(this.value)"><label>Yes</label>

<input type="radio" name="ES" value="no" onclick="goToSite(this.value)"><label> No</label>

</div>

</form>

Link to comment
Share on other sites

If you want to do it in javascript, sure something like that would probably get the job done just fine - assuming the EU has java enabled on their browser.  you can also use PHP on the form action page to say

<?php 
if ($_POST['flag'] == 'TRUE'){
include_once "page2.php";
}
else
{
//mail script goes here
include_once "thankUser.php";
}
?>

 

Link to comment
Share on other sites

just tryed this

 

<?php

if(!empty($_POST["radio_A/B"]))

{

header('location: $_POST["radio_A/B"]');

exit;

}

?>

<form action="#" method="post" enctype="multipart/form-data"><br>

Professional:<br><em>Qualifications, memberships, fellowships or affiliations upon which your professional status relies</em> <br><textarea NAME="Professional" ROWS=5 COLS=35></textarea><BR><BR>

Higher Education<br><em>Degree/class/university</em> <br><textarea NAME="Higher Education" ROWS=5 COLS=35></textarea><BR><BR>

Further Education:<br><em>Diplomas/Certificates</em> <br><textarea NAME="Further Education" ROWS=5 COLS=35></textarea><BR><BR>

Secondary Education<br><em>Name and place of school, A and O  level subjects/grades,GCSE subjects/grades, other subjects/grades (grades may be omitted if preferred)

</em> <br><textarea NAME="Secondary Education" ROWS=5 COLS=35></textarea><BR><BR>

Vocational Training:<br><em>Courses, certificates, coaching (including IT)</em> <br><textarea NAME="Vocational Training" ROWS=5 COLS=35></textarea><BR><BR>

Computer Literacy<br><em>Software of which you have knowledge or experience, even if there is no qualification</em> <br><textarea NAME="Computer Literacy" ROWS=5 COLS=35></textarea><BR><BR>

Languages<br><em>Normally shown only if fluent</em> <br><textarea NAME="Languages" ROWS=5 COLS=35></textarea><BR><BR>

A<input type="radio" name="radio_A/B" value="pageX.php">

B<input type="radio" name="radio_A/B" value="pageZ.php">

<input type="submit" value="Continue" />

</form>

 

and all it dose is show the pagename with a # after it and not going to the page

 

sorry if im being stupid

Link to comment
Share on other sites

<input type="radio" name="radio_A/B" value="TRUE" />I want to answer More Questions!<br />

should work with

<?php
if($_POST['radio_A/B'] == 'TRUE')
{
header('location: '.$_POST['radio_A/B']);
exit;
}

 

I think the problem was mainly that you had used double quotes inside the POST[] square brackets.  be carefull using the header redirect as well, you can easily loose your information bouncing through too many pages without using sessions to keep it in.

Link to comment
Share on other sites

<?php
if($_POST['radio_A/B'] == 'TRUE')
{
header('location: '.$_POST['radio_A/B']);
exit;
}
?>
<form action="send.php" method="post" enctype="multipart/form-data"><br>
Professional:<br><em>Qualifications, memberships, fellowships or affiliations upon which your professional status relies</em> <br><textarea NAME="Professional" ROWS=5 COLS=35></textarea><BR><BR>
Higher Education<br><em>Degree/class/university</em> <br><textarea NAME="Higher Education" ROWS=5 COLS=35></textarea><BR><BR>
Further Education:<br><em>Diplomas/Certificates</em> <br><textarea NAME="Further Education" ROWS=5 COLS=35></textarea><BR><BR>
Secondary Education<br><em>Name and place of school, A and O  level subjects/grades,GCSE subjects/grades, other subjects/grades (grades may be omitted if preferred)
</em> <br><textarea NAME="Secondary Education" ROWS=5 COLS=35></textarea><BR><BR>
Vocational Training:<br><em>Courses, certificates, coaching (including IT)</em> <br><textarea NAME="Vocational Training" ROWS=5 COLS=35></textarea><BR><BR>
Computer Literacy<br><em>Software of which you have knowledge or experience, even if there is no qualification</em> <br><textarea NAME="Computer Literacy" ROWS=5 COLS=35></textarea><BR><BR>
Languages<br><em>Normally shown only if fluent</em> <br><textarea NAME="Languages" ROWS=5 COLS=35></textarea><BR><BR>
<input type="radio" name="radio_A/B" value="TRUE" />I want to answer More Questions!<br />
<input type="submit" value="Continue" />
</form>

 

doing it like that if i select the radio button or not it goes str8 to the send.php but i want it so if its checked goes to the learn1.php

and i have got secions saved @ the top of the script

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.