Expand|Select|Wrap|Line Numbers
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- <title>Log</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="title" content="Walker Energy Brokerage" />
- <meta name="description" content="National Energy Brokering Firm" />
- <meta name="keywords" content="electricity, texas, illionois, new york, pennsylvania, deregulation, energy brokering, walker energy brokerage, energy market" />
- <meta name="language" content="en" />
- <meta name="subject" content="Site subject here" />
- <meta name="robots" content="All" />
- <meta name="copyright" content="W.A.G., LLC" />
- <meta name="abstract" content="National Energy Brokering Firm" />
- <meta name="MSSmartTagsPreventParsing" content="true" />
- <link id="theme" rel="stylesheet" type="text/css" href="style.css" title="theme" />
- <style type="text/css">
- <!--
- body {
- background-color: #E7F2D0;
- background-image: url(images/css/Background.jpg);
- }
- .style1 {
- font-size: 16px
- }
- .style3 {font-size: 12px}
- .style4 {color: #b97407}
- -->
- </style></head>
- <body>
- <div id="wrapper">
- <div id="bg">
- <div id="header"></div>
- <div id="page">
- <div id="container">
- <!-- banner -->
- <div id="banner"></div>
- <!-- end banner -->
- <!-- horizontal navigation -->
- <div id="nav1">
- <ul>
- <li id="current" style="border:none"></li>
- <li>
- <a href="index.html" class="style3" shape="rect">HOME</a> </li>
- <li>
- <a href="affiliates.html" class="style3" shape="rect">COMPANY</a> </li>
- <li>
- <a href="Training.html" class="style3" shape="rect">TRAINING</a> </li>
- <li>
- <a href="Opportunity.html" class="style3" shape="rect">OPPORTUNITY</a> </li>
- <li>
- <a href="contact.html" class="style3" shape="rect">CONTACT </a> </li>
- </ul>
- </div></div></html>
- <!-- end horizontal navigation -->
- <!-- content -->
- <div id="content">
- <div id="center">
- <div id="welcome">
- <h2 class="style4"> </h2><?
- session_name("MyLogin");
- session_start();
- if($_GET['action'] == "login") {
- //database connection.
- $conn = mysql_connect("cindywalker.db.6189501.hostedresource.com","cindywalker","Daddy1980");
- $db = mysql_select_db("cindywalker");
- //assigns user provided information to variables.
- $name = $_POST['user'];
- $password = $POST['pass'];
- //queries the database and fills variable with returned array
- $q_user = mysql_query("SELECT * FROM USERS WHERE login='$name'");
- //if something is returned assigns array to variable then assigns the value of password to variable.
- if(mysql_num_rows($q_user) == 1) {
- $data = mysql_fetch_array($q_user);
- $user_pass = $data['password'];
- //checks user provided password with one stored in db.
- if($password == $user_pass) {
- session_register("name");
- header("Location: energyresources.php"); // success page.
- exit;
- } elseif {
- header("Location: login.php?login=failed&cause=".urlencode('Wrong Password'));
- exit;
- }
- } else {
- header("Location: login.php?login=failed&cause=".urlencode('Invalid User'));
- exit;
- }
- }
- // if the session is not registered
- if(session_is_registered("name") == false) {
- header("Location: login.php");
- }
- ?>
- <html> <div>
- <div align="center"></div>
- </div>
- <p> </p>
- <p style="clear:both" />
- </div>
- </div>
- <div id="right">
- <div id="sidebar">
- <h3 class="style4">Categories</h3>
- <ul class="vmenu">
- <li><a href="http://wagllc.emexpower.com/account/select_zip?dest=registration" target="_blank">Register
- Now </a></li><li>
- <div align="left"><a href="http://wagllc.emexpower.com/account/zipcode" target="_blank">Commercial Quotes </a></div>
- </li>
- <li>
- <div align="left"><a href="http://freelights.joinambit.com" target="_blank">Residential Quotes</a> </div>
- </li>
- <li>
- <div align="left"><a href="login.html">Affiliate Login</a></div>
- </li>
- <li><a href="energyresources.php">Energy Resources</a></li>
- </ul>
- <h3 align="left" style="margin-top:40px"> </h3>
- <p align="left"> </p>
- <div style="font-weight:bold;margin-top:20px">
- <p> </p>
- <p> </p>
- </div>
- <div style="text-align:center;margin:20px 0"></div>
- </div>
- </div>
- <div class="clear" style="height:40px"></div>
- </div>
- <!-- end content -->
- </div>
- <!-- end container -->
- </div>
- <div id="footerWrapper">
- <div id="footer">
- <p class="style1" style="padding-top:10px">
- © 2010 W.A.G., LLC </p>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
Parse error: syntax error, unexpected '{', expecting '(' in D:\Hosting\6189501\html\log.php on line 87.
Before this it was returning and unexpected else on line 85. I fixed that by changinging else to elseif...
Please help!