Submit Buttons using php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ansc1

    #1

    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.ph p');
    misc_auth('User _Measuring');

    $query = "select * from ".DB_TABLE_PREF IX."_mes_men where user_id = ".
    $_SESSION['auth']['user_id'];
    $result = mysql_query($qu ery) or die ("could not send query3");
    $row = mysql_fetch_ass oc($result);

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

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

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

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

    header('Locatio n: men_measure.php ');
    exit;
    }

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

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

    frm = document.Form1;

    if(radioSelecte d(frm.cn01_shou lders) == null) {
    alert('Please select the appropriate "Shoulders" ');
    return false;
    }

    if(radioSelecte d(frm.cn01_slee ves) == null) {
    alert('Please select the appropriate "Sleeves Length"');
    return false;
    }

    if(radioSelecte d(frm.cn01_arm_ silh) == null) {
    alert('Please select the appropriate "Arm Silhouette"');
    return false;
    }

    if(radioSelecte d(frm.cn01_ches t_silh) == null) {
    alert('Please select the appropriate "Front Chest Silhouette"');
    return false;
    }

    if(radioSelecte d(frm.cn01_stom ach_silh) == null) {
    alert('Please select the appropriate "Stomach Silhouette"');
    return false;
    }

    if(radioSelecte d(frm.cn01_back _silh) == null) {
    alert('Please select the appropriate "Back Silhouette"');
    return false;
    }

    if(radioSelecte d(frm.cn01_stan d_stance) == null) {
    alert('Please select the appropriate "Standing Stance"');
    return false;
    }

    if(radioSelecte d(frm.cn01_neck _stance) == null) {
    alert('Please select the appropriate "Neck Stance"');
    return false;
    }

    if(radioSelecte d(frm.cn01_neck _height) == null) {
    alert('Please select the appropriate "Neck Height"');
    return false;
    }

    if(radioSelecte d(frm.cn01_leg_ stance) == null) {
    alert('Please select the appropriate "Leg Stance"');
    return false;
    }

    if(radioSelecte d(frm.cn01_thig h_stance) == null) {
    alert('Please select the appropriate "Thigh Stance"');
    return false;
    }

    if(radioSelecte d(frm.cn01_seat _stance) == null) {
    alert('Please select the appropriate "Seat Stance"');
    return false;
    }

    if(radioSelecte d(frm.cn01_wais t_stance) == null) {
    alert('Please select the appropriate "Waist Stance"');
    return false;
    }
    }

    function radioSelected(r adGroup) {
    if (typeof(radGrou p)=="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="retur n check_null();">

    <A NAME="shoulders "></A><center><h4>S houlders</h4><br /></center>

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

    <tr>

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

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

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

    Square Shoulders

    </td>

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

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

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

    Normal Shoulders

    </td>

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

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

    <input type="radio" name="cn01_shou lders" 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/104bothslightly slopingshoulder .gif" /><br /
    >
    <input type="radio" name="cn01_shou lders" 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/105rightnormall eftslopeshoulde r.gif" /
    ><br />
    <input type="radio" name="cn01_shou lders" 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/106leftnormalri ghtslopeshoulde r.gif" /
    ><br />
    <input type="radio" name="cn01_shou lders" 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/
    107rightslightl yslopeleftverys lopeshoulder.gi f" /><br />

    <input type="radio" name="cn01_shou lders" 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/
    108leftslightly sloperightverys lopeshoulder.gi f" /><br />

    <input type="radio" name="cn01_shou lders" 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>S leeves Length</h4></center><br />

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

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

    <input type="radio" name="cn01_slee ves" 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_rightlongert hanleft.gif" /><br />

    <input type="radio" name="cn01_slee ves" 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_leftlongerth anright.gif" /><br />

    <input type="radio" name="cn01_slee ves" 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>A rm Silhouette</h4><br /></center>



    <table class="measTabl e" 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_sil h"></A><center><h4>F ront Chest Silhouette</h4><br /
    ></center>


    <table class="measTabl e" 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_ches t_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_ches t_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/030cavinginches t.gif" /><br />

    <input type="radio" name="cn01_ches t_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/040slightlyprot ruding.gif" /><br />

    <input type="radio" name="cn01_ches t_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/050wellpaddingc hest.gif" /><br />

    <input type="radio" name="cn01_ches t_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_s ilh"></A><center><h4>S tomach Silhouette</h4><br /></
    center>



    <table class="measTabl e" 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_stom ach_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_stom ach_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_stom ach_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_stom ach_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_stom ach_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_stom ach_silh" value="Beer Belly" <?
    php echo $info['stomach_silh']['Beer Belly']; ?/><br />

    Beer Belly

    </td>

    </tr>

    </table>

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



    <table class="measTabl e" 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-upperbackcurved shortforwardnec k.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_sta nce"></A><center><h4>S tanding Stance</h4><br /></
    center>



    <table class="measTabl e" 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_stan d_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_stan d_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_stan d_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.g if" /><br />

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

    Backward Erect

    </td>

    </tr>

    </table>


    <A NAME="neck_stan ce"></A><center><h4>N eck Stance</h4><br /></center>



    <table class="measTabl e" 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.g if" /><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_heig ht"></A><center><h4>N eck Height</h4><br /></center>



    <table class="measTabl e" 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/02veryshortneck s.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_stanc e"></A><center><h4>L eg Stance</h4><br /></center>



    <table class="measTabl e" 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-slightlyoutward bent.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-veryerectpromin entcalves.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_sta nce"></A><center><h4>T high Stance</h4><br /></
    center>



    <table class="measTabl e" 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_thig h_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_thig h_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_muscula r_thighs.gif" /><br />

    <input type="radio" name="cn01_thig h_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_thig h_stance" value="Thick Thighs" <?
    php echo $info['thigh_stance']['Thick Thighs']; ?/><br />

    Thick Thighs

    </td>

    </tr>

    </table>

    <A NAME="seat_stan ce"></A><center><h4>S eat Stance</h4><br /></center>



    <table class="measTabl e" 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.g if" /><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/0310prominentse at.gif" /><br />

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

    Prominent Seat

    </td>

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

    <img src="files/mes_women/0410verybulging seat.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.gi f" /><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/0610noseatsligh tlyinwardcurve. 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_sta nce"></A><center><h4>W aist Stance</h4><br /></
    center>



    <table class="measTabl e" 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_wais t_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_wais t_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_wais t_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_wais t_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/05slightlyhighw aist.gif" /><br />

    <input type="radio" name="cn01_wais t_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_wais t_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/07highwaistslig htlybulgingstom ach.gif" /
    ><br />
    <input type="radio" name="cn01_wais t_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/08highwaistvery bulgingstomach. gif" /><br /
    >
    <input type="radio" name="cn01_wais t_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/09lowinfrontbul gingstomach.gif " /><br />

    <input type="radio" name="cn01_wais t_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/10verylowinfron tbulgingstomach .gif" /><br /
    >
    <input type="radio" name="cn01_wais t_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/
    11lowinfrontlar gebellyslightly gighatback.gif" /><br />

    <input type="radio" name="cn01_wais t_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/
    12undethbellypr otrudingverytum myaback.gif" /><br />

    <input type="radio" name="cn01_wais t_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/13verylowunderb ellyhighatback. gif" /><br /
    >
    <input type="radio" name="cn01_wais t_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/
    14straightacros sundethebellywi thbeerbelly.gif " /><br />

    <input type="radio" name="cn01_wais t_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");
    ?>

  • Curtis

    #2
    Re: Submit Buttons using php

    On Sun, 04 Feb 2007 20:29:59 -0800, ansc1 <wdurupan@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

    Comment

    Working...