473,382 Members | 1,238 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,382 software developers and data experts.

Submit Buttons using php

Hello, I'm new to using php coding. I need help with the following:
1. There is a submit button on the form and is saves information to
my database. After clicking on "Save Measurement" it redirects me to
another page in my site.

What I would like to do is change what page directs it to. Currently
the submit button redirects me to page /measure/men_measure. I would
like to be able to change this.
Please see below my page below:
<?php
include("../lib/BaseFile.php");
misc_navigation('measure/take_measure.php');
misc_auth('User_Measuring');

$query = "select * from ".DB_TABLE_PREFIX."_mes_men where user_id = ".
$_SESSION['auth']['user_id'];
$result = mysql_query($query) or die ("could not send query3");
$row = mysql_fetch_assoc($result);

foreach($row as $key =$value) {
$info[$key][$value] = " checked ";
}

if (!empty($_POST)) {
$query = "update ".DB_TABLE_PREFIX."_mes_men set ";
$first = true;
foreach($_POST as $key =$value)
{
$keys = explode('_',$key);
unset($keys[0]);
$key = implode('_',$keys);
if (!$first)
{
$query .=",".$key."='".$value."'";
}
else
{
$query .=$key."='".$value."'";
$first = false;
}

}
$query.=', filled6=1 where user_id='.$_SESSION['auth']['user_id'];
mysql_query($query) or die(mysql_error());

// update profile
$sql = "UPDATE " . DB_TABLE_PREFIX . "_user SET other=1 WHERE
user_id = " . $_SESSION['auth']['user_id'];
mysql_query($sql) or die(mysql_error());

header('Location: men_measure.php');
exit;
}

$doc_title = misc_title("Take measurement");
include("../html/private_header.php");
?>

<!-- ### Check required fields ### -->
<script type="text/javascript">
function check_null() {

frm = document.Form1;

if(radioSelected(frm.cn01_shoulders) == null) {
alert('Please select the appropriate "Shoulders"');
return false;
}

if(radioSelected(frm.cn01_sleeves) == null) {
alert('Please select the appropriate "Sleeves Length"');
return false;
}

if(radioSelected(frm.cn01_arm_silh) == null) {
alert('Please select the appropriate "Arm Silhouette"');
return false;
}

if(radioSelected(frm.cn01_chest_silh) == null) {
alert('Please select the appropriate "Front Chest Silhouette"');
return false;
}

if(radioSelected(frm.cn01_stomach_silh) == null) {
alert('Please select the appropriate "Stomach Silhouette"');
return false;
}

if(radioSelected(frm.cn01_back_silh) == null) {
alert('Please select the appropriate "Back Silhouette"');
return false;
}

if(radioSelected(frm.cn01_stand_stance) == null) {
alert('Please select the appropriate "Standing Stance"');
return false;
}

if(radioSelected(frm.cn01_neck_stance) == null) {
alert('Please select the appropriate "Neck Stance"');
return false;
}

if(radioSelected(frm.cn01_neck_height) == null) {
alert('Please select the appropriate "Neck Height"');
return false;
}

if(radioSelected(frm.cn01_leg_stance) == null) {
alert('Please select the appropriate "Leg Stance"');
return false;
}

if(radioSelected(frm.cn01_thigh_stance) == null) {
alert('Please select the appropriate "Thigh Stance"');
return false;
}

if(radioSelected(frm.cn01_seat_stance) == null) {
alert('Please select the appropriate "Seat Stance"');
return false;
}

if(radioSelected(frm.cn01_waist_stance) == null) {
alert('Please select the appropriate "Waist Stance"');
return false;
}
}

function radioSelected(radGroup) {
if (typeof(radGroup)=="undefined") {
return null;
}

for (var i = 0; i < radGroup.length; i++) {
if (radGroup[i].checked){
return i;
}
}
return null; //no checked buttons in group or empty group.
}
</script>

<form name="Form1" method="POST" action="measure/silh.php"
onsubmit="return check_null();">

<A NAME="shoulders"></A><center><h4>Shoulders</h4><br /></center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/101squareshoulder.gif" /><br />

<input type="radio" name="cn01_shoulders" value="Square Shoulders" <?
php echo $info['shoulders']['Square Shoulders']; ?/><br />

Square Shoulders

</td>

<td align="center" valign="middle">

<img src="files/mes_women/102normalshoulder.gif" /><br />

<input type="radio" name="cn01_shoulders" value="Normal Shoulders" <?
php echo $info['shoulders']['Normal Shoulders']; ?/><br />

Normal Shoulders

</td>

<td align="center" valign="middle">

<img src="files/mes_women/103bothveryslopingshoulder.gif" /><br />

<input type="radio" name="cn01_shoulders" value="Both Very Sloped" <?
php echo $info['shoulders']['Both Very Sloped']; ?/><br />

Both Very Sloped

</td>

<td align="center" valign="middle">

<img src="files/mes_women/104bothslightlyslopingshoulder.gif" /><br /
>
<input type="radio" name="cn01_shoulders" value="Both Slightly
Sloped" <?php echo $info['shoulders']['Both Slightly Sloped']; ?/
><br />
Both Slightly Sloped

</td>

</tr>

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/105rightnormalleftslopeshoulder.gif" /
><br />
<input type="radio" name="cn01_shoulders" value="Right Normal Left
Sloped" <?php echo $info['shoulders']['Right Normal Left Sloped']; ?/
><br />
Right Normal Left Sloped

</td>

<td align="center" valign="middle">

<img src="files/mes_women/106leftnormalrightslopeshoulder.gif" /
><br />
<input type="radio" name="cn01_shoulders" value="Left Normal Right
Sloped" <?php echo $info['shoulders']['Left Normal Right Sloped']; ?/
><br />
Left Normal Right Sloped

</td>

<td align="center" valign="middle">

<img src="files/mes_women/
107rightslightlyslopeleftveryslopeshoulder.gif" /><br />

<input type="radio" name="cn01_shoulders" value="Right Slightly
Sloped Left Very Sloped" <?php echo $info['shoulders']['Right Slightly
Sloped Left Very Sloped']; ?/><br />

Right Slightly Sloped Left Very Sloped

</td>

<td align="center" valign="middle">

<img src="files/mes_women/
108leftslightlysloperightveryslopeshoulder.gif" /><br />

<input type="radio" name="cn01_shoulders" value="Left Slightly
Sloped Right Very Sloped" <?php echo $info['shoulders']['Left Slightly
Sloped Right Very Sloped']; ?/><br />

Left Slightly Sloped Right Very Sloped

</td>

</tr>

</table>

<A NAME="sleeves"></A><center><h4>Sleeves Length</h4></center><br />

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">
<tr>
<td align="center" valign="middle">

<img src="files/mes_women/01_bothequallength.gif" /><br />

<input type="radio" name="cn01_sleeves" value="Both Equal Length" <?
php echo $info['sleeves']['Both Equal Length']; ?/><br />

Both Equal Length

</td>

<td align="center" valign="middle">

<img src="files/mes_women/02_rightlongerthanleft.gif" /><br />

<input type="radio" name="cn01_sleeves" value="Right Longer Than
Left" <?php echo $info['sleeves']['Right Longer Than Left']; ?/><br /
>
Right Longer Than Left

</td>

<td align="center" valign="middle">

<img src="files/mes_women/03_leftlongerthanright.gif" /><br />

<input type="radio" name="cn01_sleeves" value="Left Longer Than
Right" <?php echo $info['sleeves']['Left Longer Than Right']; ?/
><br />
Left Longer Than Right

</td>

</tr>

</table>

<A NAME="arm_silh"></A><center><h4>Arm Silhouette</h4><br /></center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/301normal-arm.gif" /><br />

<input type="radio" name="cn01_arm_silh" value="Normal Arm" <?php
echo $info['arm_silh']['Normal Arm']; ?/><br />

Normal Arm

</td>

<td align="center" valign="middle">

<img src="files/mes_women/302arm-coming-forward.gif" /><br />

<input type="radio" name="cn01_arm_silh" value="Arm Coming Forward"
<?php echo $info['arm_silh']['Arm Coming Forward']; ?/><br />

Arm Coming Forward

</td>

<td align="center" valign="middle">

<img src="files/mes_women/303arm-going-backward.gif" /><br />

<input type="radio" name="cn01_arm_silh" value="Arm Going Backward"
<?php echo $info['arm_silh']['Arm Going Backward']; ?/><br />

Arm Going Backward

</td>

</tr>

</table>
<A NAME="chest_silh"></A><center><h4>Front Chest Silhouette</h4><br /
></center>


<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/010normalchest.gif" /><br />

<input type="radio" name="cn01_chest_silh" value="Normal Chest" <?
php echo $info['chest_silh']['Normal Chest']; ?/><br />

Normal Chest

</td>

<td align="center" valign="middle">

<img src="files/mes_women/020verybulging.gif" /><br />

<input type="radio" name="cn01_chest_silh" value="Very Bulging
(Muscular)" <?php echo $info['chest_silh']['Very Bulging
(Muscular)']; ?/><br />

Very Bulging (Muscular)

</td>

<td align="center" valign="middle">

<img src="files/mes_women/030cavinginchest.gif" /><br />

<input type="radio" name="cn01_chest_silh" value="Caving in" <?php
echo $info['chest_silh']['Caving in']; ?/><br />

Caving in

</td>

<td align="center" valign="middle">

<img src="files/mes_women/040slightlyprotruding.gif" /><br />

<input type="radio" name="cn01_chest_silh" value="Slightly
Protruding" <?php echo $info['chest_silh']['Slightly Protruding']; ?/
><br />
Slightly Protruding

</td>

<td align="center" valign="middle">

<img src="files/mes_women/050wellpaddingchest.gif" /><br />

<input type="radio" name="cn01_chest_silh" value="Well Padded Chest
(Not Muscular)" <?php echo $info['chest_silh']['Well Padded Chest (Not
Muscular)']; ?/><br />

Well Padded Chest (Not Muscular)

</td>

</tr>

</table>
<A NAME="stomach_silh"></A><center><h4>Stomach Silhouette</h4><br /></
center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/01-normal.gif" /><br />

<input type="radio" name="cn01_stomach_silh" value="Normal" <?php
echo $info['stomach_silh']['Normal']; ?/><br />

Normal

</td>

<td align="center" valign="middle">

<img src="files/mes_women/02-washboard.gif" /><br />

<input type="radio" name="cn01_stomach_silh" value="Wash Board" <?
php echo $info['stomach_silh']['Wash Board']; ?/><br />

Wash Board

</td>

<td align="center" valign="middle">

<img src="files/mes_women/03-slightlybulging.gif" /><br />

<input type="radio" name="cn01_stomach_silh" value="Slight" <?php
echo $info['stomach_silh']['Slight']; ?/><br />

Slight

</td>

<td align="center" valign="middle">

<img src="files/mes_women/04-bulging.gif" /><br />

<input type="radio" name="cn01_stomach_silh" value="Bulging" <?php
echo $info['stomach_silh']['Bulging']; ?/><br />

Bulging

</td>

<td align="center" valign="middle">

<img src="files/mes_women/05-potbelly.gif" /><br />

<input type="radio" name="cn01_stomach_silh" value="Pot Belly" <?php
echo $info['stomach_silh']['Pot Belly']; ?/><br />

Pot Belly

</td>

<td align="center" valign="middle">

<img src="files/mes_women/06-beebelly.gif" /><br />

<input type="radio" name="cn01_stomach_silh" value="Beer Belly" <?
php echo $info['stomach_silh']['Beer Belly']; ?/><br />

Beer Belly

</td>

</tr>

</table>

<A NAME="back_silh"></A><center><h4>Back Silhouette</h4><br /></
center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/01-upperbackcurve.gif" /><br />

<input type="radio" name="cn01_back_silh" value="Upper Back Curve" <?
php echo $info['back_silh']['Upper Back Curve']; ?/><br />

Upper Back Curve

</td>

<td align="center" valign="middle">

<img src="files/mes_women/02-curvedback.gif" /><br />

<input type="radio" name="cn01_back_silh" value="Curved Back" <?php
echo $info['back_silh']['Curved Back']; ?/><br />

Curved Back

</td>

<td align="center" valign="middle">

<img src="files/mes_women/03-humpback.gif" /><br />

<input type="radio" name="cn01_back_silh" value="Hump Back" <?php
echo $info['back_silh']['Hump Back']; ?/><br />

Hump Back

</td>

<td align="center" valign="middle">

<img src="files/mes_women/04-upperbackcurvedshortforwardneck.gif" /
><br />
<input type="radio" name="cn01_back_silh" value="Upper Back Curve
Short Forward Neck" <?php echo $info['back_silh']['Upper Back Curve
Short Forward Neck']; ?/><br />

Upper Back Curve Short Forward Neck

</td>

<td align="center" valign="middle">

<img src="files/mes_women/05-normalback.gif" /><br />

<input type="radio" name="cn01_back_silh" value="Normal Back" <?php
echo $info['back_silh']['Normal Back']; ?/><br />

Normal Back

</td>

</tr>

</table>

<A NAME="stand_stance"></A><center><h4>Standing Stance</h4><br /></
center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/011-normal.gif" /><br />

<input type="radio" name="cn01_stand_stance" value="Normal" <?php
echo $info['stand_stance']['Normal']; ?/><br />

Normal

</td>

<td align="center" valign="middle">

<img src="files/mes_women/022-slightlyforward.gif" /><br />

<input type="radio" name="cn01_stand_stance" value="Slightly
Forward" <?php echo $info['stand_stance']['Slightly Forward']; ?/
><br />
Slightly Forward

</td>

<td align="center" valign="middle">

<img src="files/mes_women/033-verybenforward.gif" /><br />

<input type="radio" name="cn01_stand_stance" value="Very Bent
Forward" <?php echo $info['stand_stance']['Very Bent Forward']; ?/
><br />
Very Bent Forward

</td>

<td align="center" valign="middle">

<img src="files/mes_women/044-backwarderect.gif" /><br />

<input type="radio" name="cn01_stand_stance" value="Backward Erect"
<?php echo $info['stand_stance']['Backward Erect']; ?/><br />

Backward Erect

</td>

</tr>

</table>
<A NAME="neck_stance"></A><center><h4>Neck Stance</h4><br /></center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/01-neckbackwardss.gif" /><br />

<input type="radio" name="cn01_neck_stance" value="Head Backward" <?
php echo $info['neck_stance']['Head Backward']; ?/><br />

Head Backward

</td>

<td align="center" valign="middle">

<img src="files/mes_women/01-normals.gif" /><br />

<input type="radio" name="cn01_neck_stance" value="Normal" <?php
echo $info['neck_stance']['Normal']; ?/><br />

Normal

</td>

<td align="center" valign="middle">

<img src="files/mes_women/03-neckbackwards.gif" /><br />

<input type="radio" name="cn01_neck_stance" value="Neck Forward" <?
php echo $info['neck_stance']['Neck Forward']; ?/><br />

Neck Forward

</td>

</tr>

</table>

<A NAME="neck_height"></A><center><h4>Neck Height</h4><br /></center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/01normals.gif" /><br />

<input type="radio" name="cn01_neck_height" value="Normal" <?php
echo $info['neck_height']['Normal']; ?/><br />

Normal

</td>

<td align="center" valign="middle">

<img src="files/mes_women/02veryshortnecks.gif" /><br />

<input type="radio" name="cn01_neck_height" value="Very Short" <?php
echo $info['neck_height']['Very Short']; ?/><br />

Very Short

</td>

<td align="center" valign="middle">

<img src="files/mes_women/03verylongnecks.gif" /><br />

<input type="radio" name="cn01_neck_height" value="Very Long" <?php
echo $info['neck_height']['Very Long']; ?/><br />

Very Long

</td>

</tr>

</table>

<A NAME="leg_stance"></A><center><h4>Leg Stance</h4><br /></center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/010-normal.gif" /><br />

<input type="radio" name="cn01_leg_stance" value="Normal" <?php echo
$info['leg_stance']['Normal']; ?/><br />

Normal

</td>

<td align="center" valign="middle">

<img src="files/mes_women/002-bentinwards.gif" /><br />

<input type="radio" name="cn01_leg_stance" value="Bent Inward" <?php
echo $info['leg_stance']['Bent Inward']; ?/><br />

Bent Inward

</td>

<td align="center" valign="middle">

<img src="files/mes_women/003-slightlyoutwardbent.gif" /><br />

<input type="radio" name="cn01_leg_stance" value="Slightly Outward"
<?php echo $info['leg_stance']['Slightly Outward']; ?/><br />

Slightly Outward

</td>

<td align="center" valign="middle">

<img src="files/mes_women/004-bowlegs.gif" /><br />

<input type="radio" name="cn01_leg_stance" value="Bow Legged" <?php
echo $info['leg_stance']['Bow Legged']; ?/><br />

Bow Legged

</td>

<td align="center" valign="middle">

<img src="files/mes_women/005-veryerectprominentcalves.gif" /><br />

<input type="radio" name="cn01_leg_stance" value="Very Erect
Prominent Calves" <?php echo $info['leg_stance']['Very Erect Prominent
Calves']; ?/><br />

Very Erect Prominent Calves

</td>

</tr>

</table>

<A NAME="thigh_stance"></A><center><h4>Thigh Stance</h4><br /></
center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/01thin_legs.gif" /><br />

<input type="radio" name="cn01_thigh_stance" value="Thin Thighs" <?
php echo $info['thigh_stance']['Thin Thighs']; ?/><br />

Thin Thighs

</td>

<td align="center" valign="middle">

<img src="files/mes_women/02heavy_thighs.gif" /><br />

<input type="radio" name="cn01_thigh_stance" value="Heavy Thighs" <?
php echo $info['thigh_stance']['Heavy Thighs']; ?/><br />

Heavy Thighs

</td>

<td align="center" valign="middle">

<img src="files/mes_women/03large_muscular_thighs.gif" /><br />

<input type="radio" name="cn01_thigh_stance" value="Large Muscular
Thighs" <?php echo $info['thigh_stance']['Large Muscular Thighs']; ?/
><br />
Large Muscular Thighs

</td>

<td align="center" valign="middle">

<img src="files/mes_women/04thick_thighs.gif" /><br />

<input type="radio" name="cn01_thigh_stance" value="Thick Thighs" <?
php echo $info['thigh_stance']['Thick Thighs']; ?/><br />

Thick Thighs

</td>

</tr>

</table>

<A NAME="seat_stance"></A><center><h4>Seat Stance</h4><br /></center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/0110normalseat.gif" /><br />

<input type="radio" name="cn01_seat_stance" value="Normal" <?php
echo $info['seat_stance']['Normal']; ?/><br />

Normal

</td>

<td align="center" valign="middle">

<img src="files/mes_women/0210heavyseat.gif" /><br />

<input type="radio" name="cn01_seat_stance" value="Heavy Seat" <?php
echo $info['seat_stance']['Heavy Seat']; ?/><br />

Heavy Seat

</td>

<td align="center" valign="middle">

<img src="files/mes_women/0310prominentseat.gif" /><br />

<input type="radio" name="cn01_seat_stance" value="Prominent Seat" <?
php echo $info['seat_stance']['Prominent Seat']; ?/><br />

Prominent Seat

</td>

<td align="center" valign="middle">

<img src="files/mes_women/0410verybulgingseat.gif" /><br />

<input type="radio" name="cn01_seat_stance" value="Very Bulging
Seat" <?php echo $info['seat_stance']['Very Bulging Seat']; ?/><br /
>
Very Bulging Seat

</td>

<td align="center" valign="middle">

<img src="files/mes_women/0510flatseat.gif" /><br />

<input type="radio" name="cn01_seat_stance" value="Flat Seat" <?php
echo $info['seat_stance']['Flat Seat']; ?/><br />

Flat Seat

</td>

<td align="center" valign="middle">

<img src="files/mes_women/0610noseatslightlyinwardcurve.gif" /><br /
>
<input type="radio" name="cn01_seat_stance" value="No seat Slightly
Inwards Curve" <?php echo $info['seat_stance']['No seat Slightly
Inwards Curve']; ?/><br />

No seat Slightly Inwards Curve

</td>

</tr>

</table>

<A NAME="waist_stance"></A><center><h4>Waist Stance</h4><br /></
center>

<table class="measTable" border="0" cellpadding="2" cellspacing="2"
width="600" align="center">

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/01verylowonhips.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="Very Low On Hips
(Hipster Style)" <?php echo $info['waist_stance']['Very Low On Hips
(Hipster Style)']; ?/><br />

Very Low On Hips (Hipster Style)

</td>

<td align="center" valign="middle">

<img src="files/mes_women/03normal.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="Low Waist" <?php
echo $info['waist_stance']['Low Waist']; ?/><br />

Low Waist

</td>

<td align="center" valign="middle">

<img src="files/mes_women/02lowwaist.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="Normal (Slightly
Below Navel)" <?php echo $info['waist_stance']['Normal (Slightly Below
Navel)']; ?/><br />

Normal (Slightly Below Navel)

</td>

<td align="center" valign="middle">

<img src="files/mes_women/04onnavel.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="On Navel" <?php
echo $info['waist_stance']['On Navel']; ?/><br />

On Navel

</td>

<td align="center" valign="middle">

<img src="files/mes_women/05slightlyhighwaist.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="Slightly High
Waist" <?php echo $info['waist_stance']['Slightly High Waist']; ?/
><br />
Slightly High Waist

</td>

<td align="center" valign="middle">

<img src="files/mes_women/06highwaist.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="High Waist" <?
php echo $info['waist_stance']['High Waist']; ?/><br />

High Waist

</td>

<td align="center" valign="middle">

<img src="files/mes_women/07highwaistslightlybulgingstomach.gif" /
><br />
<input type="radio" name="cn01_waist_stance" value="High Waist Very
Bulging Stomach" <?php echo $info['waist_stance']['High Waist Very
Bulging Stomach']; ?/><br />

High Waist Very Bulging Stomach

</td>

</tr>

<tr>

<td align="center" valign="middle">

<img src="files/mes_women/08highwaistverybulgingstomach.gif" /><br /
>
<input type="radio" name="cn01_waist_stance" value="High Waist
Slightly Bulging Stomach" <?php echo $info['waist_stance']['High Waist
Slightly Bulging Stomach']; ?/><br />

High Waist Slightly Bulging Stomach

</td>

<td align="center" valign="middle">

<img src="files/mes_women/09lowinfrontbulgingstomach.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="Low In Front
Bulging Stomach" <?php echo $info['waist_stance']['Low In Front
Bulging Stomach']; ?/><br />

Low In Front Bulging Stomach

</td>

<td align="center" valign="middle">

<img src="files/mes_women/10verylowinfrontbulgingstomach.gif" /><br /
>
<input type="radio" name="cn01_waist_stance" value="Very Low In
Front Bulging Stomach" <?php echo $info['waist_stance']['Very Low In
Front Bulging Stomach']; ?/><br />

Very Low In Front Bulging Stomach

</td>

<td align="center" valign="middle">

<img src="files/mes_women/
11lowinfrontlargebellyslightlygighatback.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="Low In Front
Large Belly Slightly High At Back" <?php echo $info['waist_stance']
['Low In Front Large Belly Slightly High At Back']; ?/><br />

Low In Front Large Belly Slightly High At Back

</td>

<td align="center" valign="middle">

<img src="files/mes_women/
12undethbellyprotrudingverytummyaback.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="Under The Belly
Very Protruding Tummy High At The Back" <?php echo
$info['waist_stance']['Under The Belly Very Protruding Tummy High At
The Back']; ?/><br />

Under The Belly Very Protruding Tummy High At The Back

</td>

<td align="center" valign="middle">

<img src="files/mes_women/13verylowunderbellyhighatback.gif" /><br /
>
<input type="radio" name="cn01_waist_stance" value="Very Low Under
Belly High At Back" <?php echo $info['waist_stance']['Very Low Under
Belly High At Back']; ?/><br />

Very Low Under Belly High At Back

</td>

<td align="center" valign="middle">

<img src="files/mes_women/
14straightacrossundethebellywithbeerbelly.gif" /><br />

<input type="radio" name="cn01_waist_stance" value="Straight Across
Under The Belly With Large Beer Belly (Low On Waist Bone Low At Back)"
<?php echo $info['waist_stance']['Straight Across Under The Belly With
Large Beer Belly (Low On Waist Bone Low At Back)']; ?/><br />

Straight Across Under The Belly With Large Beer Belly (Low On Waist
Bone Low At Back)

</td>

</tr>

</table>
<center><br /><br />
<input class="button" type="submit" value="Save Measurements" />
</center>
</form>
<?php
include("../html/private_footer.php");
?>

Feb 5 '07 #1
1 2615
On Sun, 04 Feb 2007 20:29:59 -0800, ansc1 <wd******@gmail.comwrote:
Hello, I'm new to using php coding. I need help with the following:
1. There is a submit button on the form and is saves information to
my database. After clicking on "Save Measurement" it redirects me to
another page in my site.

What I would like to do is change what page directs it to. Currently
the submit button redirects me to page /measure/men_measure. I would
like to be able to change this.
Please see below my page below:
<snip>
You've posted quite a lot of unnecessary code (no need to see your
JavaScript, for example) there, and it's hard to want to look through it
all. You can change where the form submits by simply pointing to whatever
script you want in the action attribute in the form tag. If you want to
redirect in your PHP script, you need to use the header() function (see
<http://php.net/header>). You should also only use the header function
before any output is sent, which includes any whitespace before "<?php"
and after "?>". If you need to, you could use output buffering to mitigate
said requirement.

--
Curtis, http://dyersweb.com
Feb 5 '07 #2

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

Similar topics

3
by: Carlo | last post by:
Hi I have three radio buttons where I need the user to select one of the buttons and its value must be emailed to me using the submit button. I'm using strBody = strBody & "<tr><td>Q1:" &...
2
by: ivanhoe | last post by:
All articles and tutorials I've seen on subject of forms say that if there's name and value for submit button(input tag with type="submit"), they'll get submitted along with the rest of the...
3
by: M | last post by:
i am using submit buttons to send the user to different parts of a wizard. i am using if (if attribute.step1 exists) statements to send them to the appropriate section based on which submit button...
3
by: Arun K | last post by:
Hi, I am creating a simple .aspx page to add some fields with validation. I have used different .NET validations like REquiredFieldValidator, RegularExpressionValidator and showed the summary...
3
by: D. Shane Fowlkes | last post by:
Sorry for the length of this post. I have created a rather complex form which has a header/line item (parent and child records) structure. It's for an intranet. A screenshot can be seen here: ...
5
by: | last post by:
Hi all, Has anyone been able to write some custom javascript on the onclick event of submit button to do certain things like disable submit button, only submit form once etc. This was a breeze...
9
by: Poker Man | last post by:
Hi, I know how to do Sumbit buttons in Forms, and I know how to do custom buttons in Javascript. What I can't seem to find is how to do custom Submit buttons using Javascript! Anybody out...
1
by: Bill_W_Stephens | last post by:
I have a complicated page with several submit buttons. I don't want to create multiple forms because much of the input is shared and the code is getting very ugly. However I would like to determine...
5
by: Steve JORDI | last post by:
Just a question using images as submit buttons and PHP4.4.4. It seems that my code correctly works in FireFox but not in IExplorer. For example, I have a FORM with 2 buttons called "search" and...
4
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all I have the following code: I am trying to use the value of the image button to evaluate what plan the user has chosen, i.e. it request("submit1")="Basic", then the user chose basic plan...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.