Jump to content

Help - Merging html and php


BadmanSam

Recommended Posts

Hi, I want to mix these 2 codes up but it is taking me time to figure it out so I need help.

 

The HTML Code is :

 

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/style.css" type="text/css"/>
<link rel="stylesheet" href="css/nivo_css/nivo-slider.css" type="text/css"/>
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:700' rel='stylesheet' type='text/css'/>
<!--[if lt IE 10]>
	<script type="text/javascript" src="js/PIE.js"></script>
<![endif]--> 	
<script type="text/javascript" src="js/jquery.js"></script>
<script src="js/nivo/jquery.nivo.slider.pack.js" type="text/javascript"></script>

<script src="js/main.js" type="text/javascript"></script>
<title>TechGeekly - Template</title>
<script type="text/javascript">	
		$(document).ready(function(){
			var item = $('.slid_img .slid_img_inner');
			var Children = item.children();
			item.width(Children.size() * 303);
		});
		$('.slider_right').live('click' , function(e){
			var target_item = $('.slid_img');
			var targetScroll = target_item.scrollLeft();
			target_item.animate({
				scrollLeft : targetScroll + 303
			} , 500);
			e.preventDefault();
		});
		$('.slider_left').live('click' , function(e){
			var target_item = $('.slid_img');
			var targetScroll = target_item.scrollLeft();
			target_item.animate({
				scrollLeft : targetScroll - 303
			} , 500);
			e.preventDefault();
		});

		$(window).load(function() {
			$('#slider').nivoSlider({
				directionNav:false
			});
		});
</script>
</head>
<body>
<!-- Login_form -->
<div class="log_hide"> 
	<div class="log_hide_inner"> 
		<div class="center">
			<div class="login_container">
				<div class="login_button">
                                <?
                                 include("main.php");
                                 ?>

				</div>
				<div class="clearb"></div>
			</div>
			<a href="#" class="log"></a>
		</div>
	</div> 
</div> 
<!-- Login_form_END -->


<!-- Header -->
<div class="center">
	<div class="header"> 
		<a class="logo" href="index.html"><img src="images/logomain.png" alt="" /></a>
		<div class="slogan">Where everything is simple.<br />
		</div>
		<div class="search">
			<div class="search_wrap">
				<input class="search_in" value="Search"/>
				<a href="#" class="lupa"><img src="images/search.png" alt="" /></a>
			</div>
		</div>
	</div>
</div>
<!-- Header END -->

 

and The PHP Code is

 

<body>

<table>
<tr>
  <td>


<div align="center">
<?
if($session->logged_in){
   echo '<h3>Login - TechGeekly.</h3>';
   echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';
   
   echo "Welcome <b>$session->username</b>, you are logged in. <br><br>"
       ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>]   "
       ."[<a href=\"useredit.php\">Edit Account</a>]   ";
   if($session->isAdmin()){
      echo "[<a href=\"admin/admin.php\">Admin Center</a>]   ";
   }
   echo "[<a href=\"process.php\">Logout</a>]";
}
else{
?>
</div>
<div align="center">
<h3>Login - TechGeekly</h3>
<h1><img src="images/lock_locked.png" width="32" height="32" alt="Login">Login</h1>
<?
if($form->num_errors > 0){
   echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";
}
?>
<form action="process.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<font size="2">Remember me next time     
<input type="hidden" name="sublogin" value="1">
<input type="submit" value="Login"></td></tr>
<tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr>
<tr><td colspan="2" align="left"><br>Not registered? <a href="register.php">Sign-Up!</a></td></tr>
</table>
</form>
</div>
<?
}

echo "</td></tr><tr><td align=\"center\"><br><br>";
echo "<b>Member Total:</b> ".$database->getNumMembers()."<br>";
echo "There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.<br><br>";

include("include/view_active.php");

?>


</td></tr>
</table>


</body>

 

I want the code to be in

 

the login form

 

<!-- Login_form -->
<div class="log_hide"> 
	<div class="log_hide_inner"> 
		<div class="center">
			<div class="login_container">
				<div class="login_button">




				</div>
				<div class="clearb"></div>
			</div>
			<a href="#" class="log"></a>
		</div>
	</div> 
</div> 
<!-- Login_form_END -->

 

I have tried but it just messes the whole code up and the css is

 

The css is attached.

 

Please Help . ASAP

18608_.txt

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.