Jump to content

JellyFishBoy

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JellyFishBoy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Realised I had too many div positioning tags which conflicted. Ended up using the above tool linked, worked a treat! Thanks for the help
  2. Tried inputing include: <div style="position:absolute; left:467px; top:684px; width:286px; height:154px; z-index:1;"> <div id="frag_3" style="text-align:left;"> <?php if(isset($_SESSION['user'])) { echo "<p class='Body-text-P'><span class='Body-text-T'>You are now logged in, <b>".$_COOKIE['firstname']." ".$_COOKIE['lastname']."</b></p></span>"; } else { include 'lform.html'; echo '<p class="Body-text-P"><span class="Body-text2-T">You are not logged in at this current time. Please login or register.</p></span>'; } ?> <><> But still now show, however when you look at page source the form html data is there, so im puzzled as to why there is no show o.O lform.html has this inside... <html> <body> <form id="form_1" name="login1" onSubmit="return validate_form_1(this)" action="logged.php" method="post" target="_self" enctype="application/x-www-form-urlencoded" style="margin:0px;"> <div id="txt_1" style="position:absolute; left:467px; top:570px; width:97px; height:16px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box; overflow:hidden; z-index:1;"> <p class="Body-text-P"><label for="edit_1"><span class="Body-text-T">Username</span></label></p> <> <div style="position:absolute; left:550px; top:565px; width:150px; height:22px; text-align:left; z-index:2;"> <input type="text" id="edit_1" name="uname" size="20" style="width:150px;" maxlength="50" value=""> <> <div id="txt_2" style="position:absolute; left:467px; top:605px; width:101px; height:16px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box; overflow:hidden; z-index:1;"> <p class="Body-text-P"><label for="edit_2"><span class="Body-text-T">Password</span></label></p> <> <div style="position:absolute; left:550px; top:600px; width:150px; height:22px; text-align:left; z-index:2;"> <input type="password" id="edit_2" name="password" size="20" style="width:150px;" maxlength="100" value=""> <> <div style="position:absolute; left:547px; top:635px; width:81px; height:22px; text-align:left; z-index:2;"> <input type="submit" name="submit" value="Submit"> <input type="hidden" name="submitlog" value="TRUE"> <> </form> </body> </html>
  3. <div style="position:absolute; left:467px; top:684px; width:286px; height:154px; z-index:1;"> <div id="frag_3" style="text-align:left;"> <?php session_start(); if(isset($_SESSION['user'])) { echo "<p class='Body-text-P'><span class='Body-text-T'>You are now logged in, <b>".$_COOKIE['firstname']." ".$_COOKIE['lastname']."</b></p></span>"; } else { echo '<form id="form_1" name="login1" onSubmit="return validate_form_1(this)" action="logged.php" method="post" target="_self" enctype="application/x-www-form-urlencoded" style="margin:0px;"> <div id="txt_1" style="position:absolute; left:467px; top:570px; width:97px; height:16px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box; overflow:hidden; z-index:1;"> <p class="Body-text-P"><label for="edit_1"><span class="Body-text-T">Username</span></label></p> </div> <div style="position:absolute; left:550px; top:565px; width:150px; height:22px; text-align:left; z-index:1;"> <input type="text" id="edit_1" name="uname" size="20" style="width:150px;" maxlength="50" value=""> </div> <div id="txt_2" style="position:absolute; left:467px; top:605px; width:101px; height:16px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box; overflow:hidden; z-index:1;"> <p class="Body-text-P"><label for="edit_2"><span class="Body-text-T">Password</span></label></p> </div> <div style="position:absolute; left:550px; top:600px; width:150px; height:22px; text-align:left; z-index:1;"> <input type="password" id="edit_2" name="password" size="20" style="width:150px;" maxlength="100" value=""> </div> <div style="position:absolute; left:547px; top:635px; width:81px; height:22px; text-align:left; z-index:1;"> <input type="submit" name="submit" value="Submit"> <input type="hidden" name="submitlog" value="TRUE"> </div> </form>'; echo '<p class="Body-text-P"><span class="Body-text2-T">You are not logged in at this current time. Please login or register.</p></span>'; } ?> </div></div> Still no luck? :/ Div tags dont close with PHP tags between them and form doesnt even show up...
  4. Hey guys! Im trying to setup an IF statement on my home page. Its purpose is to show EITHER a login form and state your not logged in if it cannot find a stored cookie OR if it does find a stored cookie it will NOT show the HTML form and state you are logged in. I have it mostly working apart from the fact Im not sure how to insert a HTML form into PHP IF statement and make it work. Since I dont want the user to see the login form when they are already logged in. Here is a link to the php script: http://pastebin.com/aenq4gbE Here is link to the live page: http://jfbsystems.co.uk/secure Any help or ideas would be much appreciated! JellyFishBoy
  5. Thanks for the help. I ended up moving the two PHP elements (menu and login check) within the body element so it flowed with the rest of the layout. I understand how it works now
  6. Hello, I am having some trouble with my CSS positioning for some of the objects on my website. It is on several pages, but I'm going to link one page and also the live URL so I can understand it and implement it elsewhere. I havent done CSS in a long while (PHP junkie ) so hence the stumble. The 2 parts I will copy and paste are moving position when I change the size of the window. I am sure there is a simple fix for this, any help? The welcome message is moving: echo "<p class='Body-text-P'><span class='Body-text2-T'>You are now logged in, <b>".$_COOKIE['firstname']." ".$_COOKIE['lastname']."</b></span</p>"; } else { echo '<p class="Body-text-P"><span class="Body-text-T">You are not logged in at this current time. Please login or register.</span</p>'; And so is the menu: <div id="menu" style="position:absolute; left:728px; top:44px; width:530px; height:51px; z-index:1;"><span class="Body-Navlist"> <ul id="navlist"> <li id="active"> <a href="./index.php">Home</a></li> <?php if (isset($_COOKIE['firstname']) AND (substr($_SERVER['PHP_SELF'], -10) != './logout.php')) { echo '<li><a href="./logout.php">Logout</a></li> <li><a href="./cpass.php">Change Password</a></li> '; } else { echo '<li><a href="./register.php">Register</a></li> <li><a href="./login.php">Login</a></li> <li><a href="./fpass.php">Forgot Password</a></li> '; } ?> <li><a href="./buy.php">Buy</a></li> <li><a href="./sell.php">Sell</a></li> <li><a href='./help.php'>Help</a></li> </ul> </span> </div> Here is the raw file: http://pastebin.com/Ev4bRt1p And here is the link to the live site : http://jfbsystems.co.uk/secure/index.php Thanks for any help
  7. Ok.
  8. Aha solved. Went into notepad++ settings and changed the 'Encoding' to ANSI. There is also an option for 'UTF-8 without BOM'. Thanks
  9. Same as before... Warning: Cannot modify header information - headers already sent by (output started at /home/e-smith/files/ibays/Primary/html/secure/logout.php:1) in /home/e-smith/files/ibays/Primary/html/secure/logout.php on line 3 Warning: Cannot modify header information - headers already sent by (output started at /home/e-smith/files/ibays/Primary/html/secure/logout.php:1) in /home/e-smith/files/ibays/Primary/html/secure/logout.php on line 4 Line 3: { Line 4: setcookie('firstname', '', time()-300, '/', '', 0); Line 5: setcookie('lastname', '', time()-300, '/', '', 0);
  10. Although..... my logout.php is flagging up the same error again. Saved with notepad++ and dont see any outputs before it.... <?php if(isset($_COOKIE['firstname'])) //if no cookie present redirect the user (able to use this if else function for all pages which need login verification) { setcookie('firstname', '', time()-300, '/', '', 0); setcookie('lastname', '', time()-300, '/', '', 0); } else { //if the user isnt logged in (no cookies found) the client be redirected to the home page echo "<b>You are already logged out.</b><br>"; echo "<p>If you are not redirected in 15 seconds click <A HREF='./index.php'>here</A>."; print "<meta HTTP-EQUIV='REFRESH' content='5 url=./index.php'></p>"; } echo "<p>You are now logged out <b>{$_COOKIE['firstname']}</b>.</p>"; echo "<p>If you are not redirected in 15 seconds click <A HREF='./index.php'>here</A>."; print "<meta HTTP-EQUIV='REFRESH' content='5 url=./index.php'></p>"; ?> <html lang="en"> <head> <title>JFB Systems - Online Store - Home</title> <style type="text/css"> <!-- body {margin: 0px; padding: 0px;} a:link {color: #000000;} a:visited {color: #000000;} a:hover {color: #ffffff;} a:active {color: #000000;} a:link {text-decoration:none;} .Body-P { margin:0.0px 0.0px 0.0px 0.0px; text-align:left; font-weight:400; } .Body-Text-P { margin:0.0px 0.0px 0.0px 0.0px; text-align:center; font-weight:400; } .Body-C { font-family:"Arial", sans-serif; font-size:21.0px; line-height:1.19em; } .Body-C0 { font-family:"Times New Roman", serif; font-size:21.0px; line-height:1.14em; } .Body-Text-C { font-family:"Arial", sans-serif; font-size:11.0px; line-height:1.27em; } .Body-Navlist { font-family:"Arial", sans-serif; font-size:13.0px; color:black; line-height:1.19em; } #navlist li { display: inline; list-style-type: none; padding-right: 20px; } --> </style> <script type="text/javascript" src="wpscripts/jspngfix.js"></script> <script type="text/javascript"><!-- var blankSrc = "wpscripts/blank.gif"; --></script> <div id="menu" style="position:absolute; left:728px; top:44px; width:530px; height:51px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box; overflow:hidden; z-index:1;"><span class="Body-Navlist"> <ul id="navlist"> <li id="active"> <a href="./index.php">Home</a></li> <?php if (isset($_COOKIE['firstname']) AND (substr($_SERVER['PHP_SELF'], -10) != './logout.php')) { echo '<li><a href="./logout.php">Logout</a></li> <li><a href="./cpass.php">Change Password</a></li> '; } else { echo '<li><a href="./register.php">Register</a></li> <li><a href="./login.php">Login</a></li> <li><a href="./f_pass.php">Forgot Password</a></li> '; } ?> <li><a href="./buy.php">Buy</a></li> <li><a href="./sell.php">Sell</a></li> <li><a href='./help.php'>Help</a></li> </ul> </span> </div> </head> <body text="#000000" style="background-color:#ffffff; text-align:center; height:800px;"> <div style="background-color:transparent;text-align:left;margin-left:auto;margin-right:auto;position:relative;width:900px;height:800px;"> <div style="position:absolute; left:31px; top:83px; width:841px; height:694px;"> <img src="wpimages/wp6f2c4b55.png" width="841" height="694" border="0" id="qs_16" name="qs_16" title="" alt="" onload="OnLoadPngFix()"></div> <div style="position:absolute; left:32px; top:79px; width:840px; height:4px;"> <img src="wpimages/wp011a815e.png" width="840" height="4" border="0" id="qs_15" name="qs_15" title="" alt="" onload="OnLoadPngFix()"></div> <div style="position:absolute; left:51px; top:76px; width:359px; height:704px;"> <img src="wpimages/wp8ad5650a.png" width="359" height="704" border="0" id="qs_10" name="qs_10" title="" alt="" onload="OnLoadPngFix()"></div> <div id="txt_99" style="position:absolute; left:88px; top:109px; width:284px; height:238px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box; overflow:hidden;"> <p class="Body-P"><span class="Body-C">Logged Out</span></p> <p class="Body-P"><span class="Body-C0"> </span></p> <p class="Body-P"><span class="Body-C0"> </span></p> </div> <div id="txt_16" style="position:absolute; left:122px; top:777px; width:656px; height:23px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box; overflow:hidden;"> <p class="Body-Text-P"><span class="Body-Text-C">Copyright © All rights reserved. JFB Systems.</span></p> </div> <div style="position:absolute; left:35px; top:1px; width:831px; height:95px;"> <img src="wpimages/wp618f8c40.png" width="831" height="95" border="0" id="txt_98" name="txt_98" title="" alt="Online store " onload="OnLoadPngFix()"></div> </div> </body> </html> Any ideas?
  11. That being said what PHP editor would you recommend?
  12. Ah yes that was for an old if argument, forgot to edit that out Thanks..... ......and it WORKS! Seems like Dreamweaver is not a PHP friendly program. Thanks for the help guys. Much appreciated
  13. jfbsystems.co.uk/secure/login.php is the live page by the way..
  14. I just saved in Notepad++ and reloaded the page. It doesn't flag any PHP errors now, but still doesn't input the cookies after checking via Page Info on Firefox... :/
  15. Dreamweaver..
×
×
  • 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.