#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    61
    Rep Power
    14
    I have a problem using a form in a page that uses includes. All alone the form works great. When placed in an include file or in another page that has other includes in it things go to the dogs.

    It will show itself on the page ok but will not save to the table. Also what is strange is I can enter data in the fields only by starting at the top field and using the tab key. It will not jump to a field with a mouse click.

    Am I breaking some rule or is in my code somewhere?
  2. #2
  3. No Profile Picture
    The Dude Abides
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Feb 2000
    Location
    grass valley,ca
    Posts
    1,062
    Rep Power
    16
    Post your code
  4. #3
  5. Senior Member
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2000
    Location
    Enschede, The Netherlands
    Posts
    1,527
    Rep Power
    16
    Errr.. that sounds strange to me
    Maybe you could show some of your code?

    Mirax
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    61
    Rep Power
    14
    This code has includes for a jump to script, menu, etc. but I have the actual form on this page. If i can get it to work here then I will 'attempt' to move the form over to an inc. file.
    *****************************************
    <!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en" "hmpro6.dtd">
    <HTML>
    <HEAD>
    <?php
    include ("http://opencountry.com/cheylin/includes/jumpto.inc");
    ?>
    </HEAD>
    <!-- Top Row -->
    <?
    include ("includes/header.inc");
    ?>
    <!-- 2nd row -->
    <TABLE BORDER="0" WIDTH="100%" CELLPADDING="0" CELLSPACING="0">
    <TR VALIGN="top">
    <!-- Menu -->
    <TD WIDTH="145">
    <?
    include ("includes/dynmenu2.inc");
    ?>
    </TD>
    <!-- words -->
    <TD COLSPAN="1" WIDTH="*" ALIGN="CENTER">
    <TABLE WIDTH="100%" BORDER="1" CELLPADDING="10" CELLSPACING="5">
    <TR>
    <TD>
    <center>
    <?php
    $db = mysql_connect("localhost", "xxxx", "xxxx");
    mysql_select_db("xxxx",$db);
    if ($submit)
    {

    // process form

    $day=(date("Y-m-d"));

    $sql = "INSERT INTO cheylinalumni(fullname,yrgrad,email,url,words,emailme,phone,address,city,state,country,public,zip) VALUES ('$fullname','$yrgrad','$email','$url','$words','$emailme','$phone','$address','$city','$state','$co untry','$public','$zip')";
    $result = mysql_query($sql);
    echo "<br><BR>Thank you! Information entered. n";
    ?>
    <meta http-equiv="refresh" content="1 ; url=http://opencountry.com/cheylin/total.html">
    <?php
    }
    else
    {
    // display form
    ?>
    <form method="post" action="<?php echo $PHP_SELF?>">
    <table border=0 width="100%" cellspacing="3">
    <caption><font size="+2" color="#0000FF">Submit information to Cheylin Alumni</font></caption>
    <tr>
    <td align=right ><b><sup><font color=#FF0000>*</font></sup>Post this on the Internet?</b></td><td colspan=4>
    <input type="radio" name="public" value="Yes"><b>Yes</b>
    <input type="radio" name="public" value="No"><b>No</b> </td></tr>
    <tr>
    <td>&nbsp;</td>
    <td>No = we keep it private in our database.</td></tr>
    <tr>
    <td colspan=6><hr size=3 width=100%></td></tr>
    <tr>
    <td align=right valign=top><b>Year Graduated: </b></td>
    <TD valign=top><input type="Text" name="yrgrad" value="1985"></td></tr>
    <tr>
    <TD></td>
    <TD>If you left early please enter the year you would have graduated<br></td></tr>
    <tr>
    <td align=right width="25%"><b>Your Name: </b></td>
    <TD width="*"><input type="Text" name="fullname">&nbsp;&nbsp;Mark maiden names, ex. (Smith)</td></tr>
    <tr>
    <td align=right valign=top><b>Address: </b></td>
    <TD valign=top><input type="Text" name="address"></td></tr>
    <tr>
    <td align=right valign=top><b>Phone: </b></td>
    <TD valign=top colspan=3><input type="Text" name="phone"></td></tr>
    <tr>
    <td align=right valign=top><b>City: </b></td>
    <TD valign=top><input type="Text" name="city"></td></tr>
    <tr>
    <td align=right valign=top><b>State: </b></td>
    <TD valign=top><input type="Text" name="state"></td></tr>
    <tr>
    <td align=right valign=top><b>Country: </b></td>
    <TD valign=top><input type="Text" name="country"></td></tr>
    <tr>
    <td align=right valign=top><b>ZIP: </b></td>
    <TD valign=top><input type="Text" name="zip"></td></tr>
    <tr>
    <TD colspan=6><hr size=3 width=100%></td></tr>
    <tr>
    <td align=right valign=top><b>Email: </b></td>
    <TD valign=top><input type="Text" name="email"></td></tr>
    <tr>
    <td align=right valign=top><b>Email Me of upcoming events: </b></td>
    <TD valign=bottom>
    <input type="radio" name="emailme" value="Yes" checked><b>Yes</b>
    <input type="radio" name="emailme" value="No"><b>No</b></td></tr>
    <tr>
    <td align=right valign=top><b>Web Address: </b></td>
    <TD valign=top><input type="Text" name="url"><font=-1>&nbsp;&nbsp;Remember http:// </font></td></tr>
    <tr>
    <td align=right valign=top><b>Notes or Quote: </b></td>
    <TD valign=top colspan=2><TEXTAREA NAME="words" COLS="40" ROWS="3"></TEXTAREA></td></tr>
    <tr>
    <td colspan=2><center>Information will <B><U>NOT</U></B> be made public unless you mark "Yes" on the first question.<BR><BR></center></td></tr>
    </table>

    <input type="Submit" name="submit" value="Enter information">
    </form>
    <?
    } // end if
    ?>
    <?
    include ("includes/footer.inc");
    ?>
    </TD>
    </TR>
    </TABLE>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    ***********************************
    Thanks, stujo
  8. #5
  9. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    <?php
    include ("http://opencountry.com/cheylin/includes/jumpto.inc");
    ?>

    Why you 'include' URL?
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    61
    Rep Power
    14
    I guess because I am ignorant Must be a habit carried over when i have had too little sleep.

Similar Threads

  1. the linker, the include and interdependent classes
    By behco in forum C Programming
    Replies: 7
    Last Post: February 1st, 2004, 07:55 AM
  2. the linker, the include and interdependent classes
    By behco in forum C Programming
    Replies: 0
    Last Post: January 31st, 2004, 12:57 PM
  3. Direct Music Initialization Problem
    By jonnathan in forum C Programming
    Replies: 0
    Last Post: January 26th, 2004, 04:29 PM
  4. include path problems - after uploading to host
    By alaw in forum PHP Development
    Replies: 2
    Last Post: December 9th, 2003, 05:11 PM
  5. Replies: 6
    Last Post: October 3rd, 2003, 01:01 PM

IMN logo majestic logo threadwatch logo seochat tools logo