Question

I am trying to make a registration page for a website however for some reason it won't display my table? I can't seem to locate the problem and it was working fine earlier. My site can be accessed on the server at cs12jkk.icsnewmedia.net

I am a second year undergraduate at the university of Leeds and i'm trying to make a log in and system as part of a project and can't get it to display anything at all!

<?php require_once("functions.inc");?>
    <!DOCTYPE html>
    <html>
    <head>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript" src="register.js">
    <link rel="stylesheet" type="text/css" href="form.css">
    <title>Registration Page</title>
    </head>
    <body>
    <form id="userForm" method="POST" action="register-process.php">
    <div>
            <fieldset>
            <legend>Registration Information</legend>
            <div id="errorDiv">

    <?php
            if (isset($_SESSION['error']) && isset($_SESSION['formAttempt'])) {
                    unset($_SESSION['formAttempt']);
                    print "Errors encountered<br />\n";
                    foreach ($_SESSION['error'] as $error) {
                                    print $error . "<br />\n";
                    } //end foreach
            }
    ?>

    </div>
                    <label for="fname">First Name:* </label>
                    <input type="text" id="fname" name="fname" />
                    <span class="errorFeedback errorSpan"
            id="fnameError"> First Name is required</span>
                    <br />
                    <label for="lname">Last Name:* </label>
                    <input type="text" id="lname" name="lname">
                    <span class="errorFeedback errorSpan"
            id="lnameError">Last Name is required</span>
                    <br />
                    <label for="email">E-mail Address:*</label>
                    <input type="text" id="email" name="email">
                    <span class="errorFeedback errorSpan"
            id="emailError">E-mail is required</span>
                    <br />
                    <label for="password1">Password:*</label>
                    <input type="password" id="password1" name="password1">                             <span class="errorFeedback errorSpan"
            id="password1Error">Password required</span>
                    <br /> 
                    <label for="password2">Verify Password:*</label>
                    <input type="password" id="password2" name="password2">
                    <span class="errorFeedback errorSpan"
            id="password2Error">Password required</span>
                    <br />
                    <label for="addr">Address: </label>
                    <input type="text" id="addr" name="addr">
                    <br />
                    <label for="city">City:</label>
                    <input type="text" id="city" name="city">
                    <br />
                    <label for="state">State:</label>
                    <select name="county" id="county">
                    <option></option>
                    <option value="AL">Alabama</option>
                    <option value="CA">California</option>
                    <option value="CO">Colorado</option>
                    <option value="FL">Florida</option>
                    <option value="Il">Illinois</option>
                    <option value="NJ">New Jersey</option>
                    <option value="NY">New York</option>
                    <option value="WI">Wiscon</option>
                    </select>
                    <br />
                    <label for="zip">ZIP:</label>
                    <input type="text" id="zip" name="zip">
                    <br />
                    <label for="phone">Phone Number:</label>
                    <input type="text" id="phone" name="phone">
                    <span class="errorFeedback errorSpan"
            id="phoneError">Format: xxxx-xxx-xxxx</span>
                    <br />
                    <br />
                    <label for="mobile"> Number Type:</label>
                    <input class="radioButton" type="radio"        
            name="phonetype" id="mobile" value="mobile">  
                    <label class="radioButton" for="mobile">Mobile</label>
                    <input class="radioButton" type="radio"
            name="phonetype" id="home" value="home">
                    <label class="radioButton" for="home">Home</label>
                    <span class="errorFeedback errorSpan phoneTypeError"        
            id="phonetypeError">Please choose an option</span>
                    <br />
                    <input type="submit" id="submit" name="submit">
                    </fieldset>

    </div>
    </form>
    </body>
    </html>
Was it helpful?

Solution

If you are talking about: http://cs12jkk.icsnewmedia.net/RestaurantApplication/register.php If you look at the html source you will see the html is all there. The problem is with line 5:

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="register.js">

You don't have a closing /> or a </script> after you include register.js so all of the html after that isn't being rendered because it assumes it is part of your <script>.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top