javascript - How to use PHP in a html5 setting -


in html5 page have content container in article section. 1 of pages php , breaking css. having trouble getting redirects work correctly better method doing here. here page.

 <!doctype html>   <html> <head>     <meta http-equiv="content-type" content="text/html; charset=utf-8">     <title>acts</title>     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />     <meta name="apple-mobile-web-app-capable" content="yes" />     <meta name="apple-mobile-web-app-status-bar-style" content="black">     <link type="text/css" rel="apple-touch-icon-precomposed" href="../images/template/icon.png?v=1" />     <link type="text/css" rel="apple-touch-startup-image" href="../images/template/startup_landscape.jpg?v=1" media="screen , (min-device-width: 481px) , (max-device-width: 1024px) , (orientation:landscape)" />     <link type="text/css" rel="apple-touch-startup-image" href="../images/template/startup_portrait.jpg?v=1" media="screen , (min-device-width: 481px) , (max-device-width: 1024px) , (orientation:portrait)" />     <link type="text/css" rel="stylesheet" href="includes/acts.css?v=1" />     <script type="text/javascript" src="../includes/jquery-1.7.1.min.js">  </script>     <script type="text/javascript" src="../includes/iscroll4/iscroll.js"></script>     <script type="text/javascript" src="../includes/acts.js?v=1"></script>    </head>     <body>     <div class="page">     <footer></footer>     <article>         <div class"content_container">             <div class="content_loading_container"></div>     </article>     <header></header>     <img class="banner_logo" src="images/template/logo.png?v=1" />     <img class="banner_acts" src="images/template/acts_banner.png?v=1" />     <img class="fire_clay" src="images/template/home_fire_clay.png?v=1" width="201" height="121" />     <img class="fire_blue" src="images/template/fire_blue.png?v=1" width="169" height="131" />     <img class="fire_black" src="images/template/fire_black.png?v=1" width="157" height="129" />     <img class="fire_orange" src="images/template/fire_orange.png?v=1" width="420" height="440" />     <nav>         <a data-file="home.php?v=1">home</a>         <a data-file="tracker.php?v=1">tracker</a>         <a data-file="reports.php?v=1">gallery</a>         <a data-file="contact_us.html?v=1">contact us</a>     </nav>     </div>    </body>    </html> 

php page:

<?php require_once("includes/tlsession.php"); ?> <?php require_once("includes/actsconnection.php"); ?> <?php require_once("includes/functions.php"); ?> <?php      include_once("includes/form_functions.php");      if (isset($_post['submit'])) {          $errors = array();          $required_fields = array('username', 'password');         $errors = array_merge($errors, check_required_fields($required_fields, $_post));          $fields_with_lengths = array('username' => 30, 'password' => 30);         $errors = array_merge($errors, check_max_field_lengths($fields_with_lengths, $_post));          $username = trim(mysql_prep($_post['username']));         $password = trim(mysql_prep($_post['password']));         $hashed_password = sha1($password);           if ( empty($errors) ) {                         $query = "select id, username ";             $query .= "from users ";             $query .= "where username = '{$username}' ";             $query .= "and hashed_password = '{$hashed_password}' ";             $query .= "limit 1";             $result_set = mysql_query($query);             confirm_query($result_set);             if (mysql_num_rows($result_set) == 1) {                 $found_user = mysql_fetch_array($result_set);                 $_session['user_id'] = $found_user['id'];                 $_session['username'] = $found_user['username'];                  redirect_to("actstracker.php");             } else {                 $message = "username/password combination incorrect.<br />                     self destruct initiated.";             }         } else {             if (count($errors) == 1) {                 $message = "there 1 error in form.";             } else {                 $message = "there " . count($errors) . " errors in form.";             }         }      } else { // form has not been submitted.         if (isset($_get['logout']) && $_get['logout'] == 1) {             $message = "you logged out.";         }          $username = "";         $password = "";     } ?> <body> <h2>login</h2> <?php if (!empty($message)) {echo "<p class=\"message\">" . $message . "</p>";} ?> <?php if (!empty($errors)) { display_errors($errors); } ?> <div class="page"> <footer></footer> <article>     <form action="team-lead-login.php" method="post">             <table>             <tr>              <td>team lead:</td>             <td><input type="text" name="username" maxlength="30" value="<?php echo htmlentities($username); ?>" /></td>             </tr>              <tr>             <td>password:</td>             <td><input type="password" name="password" maxlength="30" value="<?php echo htmlentities($password); ?>" /></td>             </tr>             <tr>             <td colspan="2"><input type="submit" name="submit" value="login" /></td>             </tr>             </table>         </form>              <a href="tllogout.php">logout </a> </article> <header></header> <nav></nav> </div>   </body>  

this missing ending div tag. , first div missing equal sign.

<article>     <div class"content_container">         <div class="content_loading_container"></div> </article> 

it needs this...

<article>     <div class="content_container">         <div class="content_loading_container"></div>     </div> </article> 

that's remaining syntax error can see.

now ur adding these php pages , when do, site goes crap. how go crap?


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -