BadmanSam Posted June 15, 2012 Share Posted June 15, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/264253-help-merging-html-and-php/ Share on other sites More sharing options...
trq Posted June 16, 2012 Share Posted June 16, 2012 You haven't exactly described your problem, what do you want us to do? Sounds like your looking for a programmer. Quote Link to comment https://forums.phpfreaks.com/topic/264253-help-merging-html-and-php/#findComment-1354334 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.