q. Getting Multipart Form to move to the next form

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

    q. Getting Multipart Form to move to the next form

    Hi -

    Having trouble getting a multipart series of forms to move to the next form.
    The problem line is:
    <form method="post" enctype="multip art/form-data" action="Data_Fo rm1.php">

    If the "action" parameter is set to the current form (Data_Form1.php ) then
    the data posts to the table correctly, but it does not move to the next form
    If the "action" parameter is set to the next form in the series then by
    clicking "submit" it moves to the next form, but the data does not post to
    the table.

    I appreciate any suggestions - Maybe need a separate command is needed to
    make it post

    TIA

    David

    Whole sheet is listed below and located at



    <html>



    <body>



    <?php



    if ($submit) {

    $conn = mysql_connect(" mysql", "TeacherCar ds", "164333") or die("Cannot
    connect to server");

    mysql_select_db ("Teachercards" ,$conn) or die("Cannot find database");

    $sql = "INSERT INTO Teachers
    (School,Email,N ame,Subject,Col lege,Motto,Stor y,Food,Color,Ho bby,Place,Anima l
    ,Movie,Song,Boo k,Comment)
    VALUES('$School ','$Email','$Na me','$Subject', '$College','$Mo tto','$Story',' $
    Food','$Color', '$Hobby','$Plac e','$Animal','$ Movie','$Song', '$Book','$Comme n
    t')";

    $result = mysql_query($sq l);



    }





    Else



    {

    // display form





    ?>



    <form method="post" enctype="multip art/form-data" action="Data_Fo rm1.php">



    <BODY LINK="#0000ff" VLINK="#800080" BACKGROUND="./wall.jpg">

    <br>

    &nbsp;&nbsp;&nb sp;&nbsp;<Font Size =5/><B/>Enter information to build your
    own Teacher Card: <br></Font Size =5>



    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;School
    Name:&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p
    ;&nbsp;&nbsp;&n bsp;&nbsp;<inpu t type="Text" name="School", size=30,
    maxlength=20>

    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Email
    Address:&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& n
    bsp;&nbsp;&nbsp ;<input type="Text" name="Email", size=30, maxlength=20>

    <br><br>





    &nbsp;&nbsp;&nb sp; Name &nbsp;(e.g. Mr. Lue):&nbsp;&nbs p;&nbsp;<input
    type="Text" name="Name", size=30, maxlength=28>



    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Subjec t&nbsp;(main subject):&nbsp; &nbsp;<input
    type="Text" name="Subject", size=30, maxlength=11>



    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Colleg e
    Attended:&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;<input
    type="Text" name="College", size=30, maxlength=16>



    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Motto: &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb s
    p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& n
    bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;<input type="Text"
    name="Motto", size=30, maxlength=28>



    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Favori te
    Food:&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p
    ;&nbsp;&nbsp;&n bsp;<input type="Text" name="Food", size=30, maxlength=16>



    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Favori te
    Color:&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb s
    p;&nbsp;&nbsp;< input type="Text" name="Color", size=30, maxlength=25>

    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Favori te
    Hobby:&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb s
    p;<input type="Text" name="Hobby", size=30, maxlength=15>

    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Favori te
    Place:&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb s
    p;&nbsp;&nbsp;< input type="Text" name="Place", size=30, maxlength=25>

    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Favori te
    Animal:&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;<i n
    put type="Text" name="Animal", size=30, maxlength=25>

    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Favori te
    Movie:&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb s
    p;<input type="Text" name="Movie", size=30, maxlength=25>

    <br><br>





    &nbsp;&nbsp;&nb sp;&nbsp;Favori te
    Song:&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p
    ;&nbsp;&nbsp;&n bsp;<input type="Text" name="Song", size=30, maxlength=25>

    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Favori te
    Book:&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p
    ;&nbsp;&nbsp;<i nput type="Text" name="Book", size=30, maxlength=25>

    <br><br>



    &nbsp;&nbsp;&nb sp;&nbsp;Untold
    Story:&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;
    &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;<textarea name="Story",
    cols=30, rows=3,wrap=vir tual, maxlength=148></textarea>

    <br><br>

    &nbsp;&nbsp;&nb sp;&nbsp;Commen t/Suggestion:&nbs p;&nbsp;&nbsp;< textarea
    name="Comment", cols=30, rows=3,wrap=vir tual,maxlength= 148></textarea>

    </B>

    <br>

    &nbsp;&nbsp;&nb sp;&nbsp;e.g. Can Favorite Food be replaced with Favorite
    Sport which is football



    <br><br>





    &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; <input type="submit" name="submit"
    value="Upload Information">



    </form>



    <?php



    }

    // end if





    ?>



    </body>



    </html>


Working...