Jump to content


  • Posts

  • Joined

  • Last visited

About PineSmokes

  • Birthday 05/13/1991

Profile Information

  • Gender
  • Location
    Seattle, WA, USA
  • Interests
    Coding, computer repair, computer games, smoking weed to stay relaxed, eating.
  • Age

PineSmokes's Achievements


Newbie (1/5)




Community Answers

  1. I wouldn't I guess hah, didn't really get into it yet for this reason exactly. I just read the post that said validator, I didn't do enough research yet so landed on the wrong link. I worked all day last evening on making my new layout and it's live now. It's not perfect yet but the site now has a fixed nav bar and header, the shadow looks a bit messed up on the left near the nav bar. I have NO idea how it looks rounded on the right but like a square block on the left, there isn't any setting to make it that way from what I can see but yet it is. And I say I use XHTML by what the code I posted? Is that by not including the head html code that exists on my actual live page? Pretty sure I don't write soup. Everything is always indented properly, I always use the proper tags at the head of a page. I thought it was unnecessary to include on this page seemed like extra code for no reason I could totally include it if it's really that necessary it's just a slightly different highlight job. I do know what an HTML page looks like I'm not totally stupid rofl. I was posting my form which apparently had issues but I'm sure it doesn't have many now. I slightly protected against clickjacking but it's still possible I have more work to do there I pretty sure. This is what I have so far I know I need more, it's in my header.php which is on every page: <script> if ( top != self ) { top.location=self.location; } if ( top != self ) { top.location=self.location; } </script> You can see in my services.php and index.php files below that I do use proper HTML and XHTML? Those pages represent every website I have created, pretty basic but not soup right, what isn't soup if mine is hah? header.php header.css services.php index.php styles.css
  2. I fixed the buttons not working right away, they just needed to be set in the main html so they have a default value of block or none not in the CSS. When I put it in the CSS it loads a different default value or something which requires two presses on the button. I also noticed a problem on the booking page as the google recaptcha was not happy with two recaptcha's on the same page so I researched and solved the problem. All my forms seem to be functional at the moment so problems solved there. I'm looking into the html form validator now following these instructions https://validator.w3.org/docs/install_win.html I'm sure this is a good source but why not get opinions Something I can't seem to figure out is when I zoom out of the page I would like the footer.php include to be positioned at the bottom of the page that way the page doesn't look short and stubby it stays filling the whole page. This would help for the mobile view sometimes, one of my friends was telling me it looked a little wierd with the bottom bar right beneath the words instead of at the bottom of his phone. I've been trying this out and made little progress by making my organization better but still haven't gotten the bar where I want it hah, I am trying though. This is my test page I have a footer bar to play with needs to be fixed. http://jsfiddle.net/PineSmokes/jxcgjuLu/3/
  3. I thought the form was pretty good, I did realized the username was set to 16 characters so I set it to 25, also for some reason I can't explain Chrome, which is my testing browser, won't autofill the form correctly even though I set the fields correctly. I understand not everyone verify's the email twice but I wanted to confirm it and the password so I got it and it seems to work. I made all my test accounts with usernames like Pineapples and PineTrees and Penguins, all worked fine, but the form did try to autofill with my email so I just changed it to what I wanted my display name to be. I'm using the username/display name for the comments section I'll be making and I wanted to add the option for users to log in with either their email or username, I like choices myself so, I figured so would everyone else. I do not have to click just the text I just re-tested it and I noticed one thing. When you click the button nothing happens, click it again and it reacts properly, it must have something to do with the way I ended up finding to get the buttons to display or something. Also the cursor, I made it myself, it's not the best thing in the world but I've had good reviews so far, all I car about is the customer, if her and her dad like it, I'll keep it, I haven't heard their input. It seems a bit much but these people are only going to be on the site for a minute to get a job submitted or something. Do you think any type of cursor is an eyesore or just this one hah? I could see how it could be an eyesore but it does kinda match the color of the page And the sparkles seem kinda cool cuz they're pretty much the same color too. I agree, it's not mobile friendly, but, it does work and it gets the job done at the moment. I will keep developing the site to be more mobile friendly that just wasn't the main goal for the site yet, kinda just made a duplicate of the desktop site with an ok navigation bar, it seems to highlight the page when I click the buttons. Also I'll be looking into the HTML Validation thanks, will that stop click jacking or why am I vulnerable to that. Here it is if you wanna look it over: HTML: <!--~~~~~~~~~~~~~~~~~~!!~~~~~~~~~~~~~~~~~~~~!! LOGIN & SIGN UP SECTION START !!~~~~~~~~~~~~~~~~~~!!~~~~~~~~~~~~~~~~~~~~--> <div id="FloatingForm" class="Form"> <!---------------------------------------- SIGNIN LOGIN BUTTONS & INPUT START ------------------------------------------> <div class="FloatingContainer"> <div class="<?php echo $_SESSION['LoginSignupDisplay']; ?>"> <button onClick="toggle('FloatingLoginForm')" class="button hvr-wobble-skew" type="button" id="Login" name="Login";>Login</button> <button onClick="toggle('FloatingSignUpForm')" class="button hvr-wobble-skew" type="button" id="Sign Up" name="Sign Up";>Sign Up</button> </div> <div> <form class="<?php echo $_SESSION['LogoutDisplay']; ?>" action="" method="POST"> <button class="button hvr-wobble-skew" id="Logout" name="Logout">Logout</button> </form> </div> </div> <!------------------------------------------ SIGNIN LOGIN BUTTONS & INPUT END ------------------------------------------> <!------------------------------------------------ FLOATING ** START --------------------------------------------------> <div class="FloatingContainer"> <!---------------------------------------- FLOATING SIGN UP FORM START --------------------------------------> <div id="FloatingSignUpForm" class="FloatingSignUpForm hide"> <div> <fieldset class="InsideFloatingSignUpForm"><legend align="center">Sign Up</legend> <form action="" method="POST"> <table width="430"> <tr> <td colspan="2" class="outterSignUpText">Name: </td> <td> <input type="text" size="15" placeholder="First name" name="firstname" value="<?php if(isset($_POST['firstname'])){ echo htmlentities($_POST['firstname']); }?>"> <input type="text" size="15" placeholder="Last name" name="lastname" value="<?php if(isset($_POST['lastname'])){ echo htmlentities($_POST['lastname']); }?>"> </td> </tr> <tr> <td colspan="2" class="outterSignUpText">User Name: </td> <td> <input type="text" size="35" placeholder="Also known as your display name" name="username" value="<?php if(isset($_POST['username'])){ echo htmlentities($_POST['username']); }?>"> </td> </tr> <tr> <td colspan="2" class="outterSignUpText">Email: </td> <td> <input type="email" size="35" name="email1" placeholder="Email will be kept anonymous" value="<?php if(isset($_POST['email1'])){ echo htmlentities($_POST['email1']); }?>"> </td> </tr> <tr> <td colspan="2" class="outterSignUpText">Confirm Email: </td> <td> <input type="email" size="35" name="email2" placeholder="Re-Enter Email"> </td> </tr> <tr> <td colspan="2" class="outterSignUpText">Password: </td> <td> <input type="password" size="35" placeholder="Password" name="password1"> </td> </tr> <tr> <td colspan="2" class="outterSignUpText">Confirm Password: </td> <td> <input type="password" size="35" placeholder="Re-Enter Password" name="password2"> </td> </tr> <tr> <td colspan="1" rowspan="2" class="outterSignUpText" style="text-align:center; width:75px"> Sign Up with Google </td> <td colspan="1" rowspan="2" class="outterSignUpText" style="text-align:center; width:75px"> Sign Up with Facebook </td> <td align="center"> <?php if(isset($_GET['SignUp'])){ ?><div class="success">Sign Up Complete</div><?php } ?> <div data-theme="light" class="g-recaptcha" data-sitekey="6Lfueg8TAAAAADgAEeIGZ-VCuAwgv0ayk99iJXv4"></div> </td> </tr> <tr> <td colspan="2" align="center"> <button name="SignUp" onClick="" class="button hvr-wobble-skew">Sign Up</button> <div class="fb-like hide" data-share="true" data-width="450" data-show-faces="true" style="display:none"> </div> </td> </tr> </table> </form> </fieldset> </div> </div> <!---------------------------------------- FLOATING SIGN UP FORM END --------------------------------------> <!---------------------------------------- FLOATING LOGIN FORM START --------------------------------------> <div id="FloatingLoginForm" class="FloatingLoginForm hide"> <div> <fieldset class="InsideFloatingLoginForm"><legend align="center">Log In</legend> <form action="" method="POST"> <table> <tr> <td colspan="1" class="outterSignUpText"> Email: <input type="text" name="email" class="center" value="<?php if(isset($_POST['email'])){ echo htmlentities($_POST['email']); }?>"><br> </td> </tr> <tr> <td colspan="1" class="outterSignUpText"> Password: <input type="password" name="password" class="center"><br><br> </td> </tr> <tr> <td colspan="2" align="center"> <button type="submit" name="Login" id="Login" class="button hvr-wobble-skew">Login</button> </td> </tr> </table> </form> </fieldset> </div> </div> <!---------------------------------------- FLOATING LOGIN FORM END --------------------------------------> </div> <!-------------------------------------------- FLOATING ** END --------------------------------------------> </div> <!--~~~~~~~~~~~~~~~~~~!!~~~~~~~~~~~~~~~~~~~~~!! LOGIN & SIGN UP SECTION END !!~~~~~~~~~~~~~~~~~~~!!~~~~~~~~~~~~~~~~~~~~--> If you actually don't mind looking over my PHP I attached that too but it seems long and I already fell like you're all over helping me I love all the help though and will take as much as you'll give me This is school to me, I stepped into this PHP with only base knowledge, just trying to grow as an individual. I know I have some conditions inside my logic and it felt wrong when I was making it but it works at the moment it just needs me to fix it so it's all perfect for re-use in future sites. I do want it to be top notch at some point just didn't expect to spit out a top notch script right off the bat. Took me most of this month to come up with what I have so far, hah. Just a small edit: Right after uploading the header.php I changed the $admin_urls to all lowercase to match the strtolower($_SESSION['url']) command: $admin_urls = array("http://www.golden-wand.com/pages/admin.php","http://www.golden-wand.com/pages/admin-test.php"); header.php
  4. Their not burnt their just slower than yours, all still present I promise I think I was just trying to learn the extents of those methods and you both covered them nicely I learned a quite a few helpful pointers and proper code methods. I'm done with this area chapter closed. I feel like most of the difficult ground work is now complete on my site I just have a few more things to work out but they aren't difficult I just put them off until last. The site is 100% functional now and directs me where I need to be (the admin-test.php page for work) and the company owner (the admin.php page) then it directs the user nowhere and gives them a little green line on top saying they are logged in. I have a full activation and now use the password_verify function instead of the homegrown method I had picked up along the way. Now that I can make users and log them in I'm going to add a comment box on the contact page that will only be allowed for logged in users otherwise the submit button will say something like Sign Up to Submit Comment. I feel very successful and feel I have learned a lot this month. http://www.golden-wand.com This site would probably have take someone like you two a day or two to make, hah, am I right? I am curious on how long some of you would take to make something like this. I'm assuming it's not long. I'm also assuming that I'll be getting up to a lot better speed with the next two jobs. Each one teaches me something new. I love coding, I'm about to start another site for another customer soon. I'm not really charging them much, since I'm really still learning and it's taking me 10 times longer than a pro with a wide knowledge base. Thanks for all the help off to my next task Nick Edit: Also, I'm going to be changing the one issue /Pages/ to /pages/ in a few minutes, then I'll never have another upper lowercase issue again, I'll always use lowercase from now on, now I understand why it's so important
  5. So does strtolower() lower case everything in the whole line making my command not only unnecessary but it causes an error. Does it lowercase both variables? It seems to have the first variable in parenthesize which seems like it would only do the one. I'm going to test this a bit later but while it was on my mind I wanted to post and ask for clarification. What I wrote is wrong: if($_SESSION['admin']=='1' && !in_array(strtolower($_SESSION['url']), strtolower($admin_urls)))
  6. Why the strtolower on only the first variable $_SESSION['url']? What if the admin url's ever had a capital in them wouldn't it stop working? I understand if I'm just supposed to know to not put capitals but isn't it just a little more fool proof to do this or am I incorrect? if($_SESSION['admin']=='1' && !in_array(strtolower($_SESSION['url']), strtolower($admin_urls))) You're answer is amazing
  7. Wow, see how much adding code helps? Holly crap, you solved something I've been DYING to know XD Totally not even part of my question but you NAILED IT I'm so happy now cuz by you showing me my button echoed out in php form not in html form I am now able to add all this to the top of the page where it should be $msg.="<input type=\"button\" value=\"Admin Page\" class=\"button hvr-wobble-skew\" onclick=\"location.href='http://www.golden-wand.com/Pages/admin.php'\">\n"; I was never able to add my button to a variable until NOW Every time I did it I would lose the onclick ability but now I see all I needed to do was to use a \ before the double quotes making it \" so happy you solved both problems, thanks again.
  8. You can see I got confused, if you completed the code there wouldn't be anything to get confused about sorry if I'm asking too much but it's the simple things that seem to confuse me. I did learn a few things from you, like the fact that it's easier to edit/add/delete data by doing what you stated. The problem is I had not fully understood the array part yet, I did try it but I failed. Is this the page with all the info regarding your answer? I've been there and I'm doing something wrong with this code. http://php.net/manual/en/language.operators.array.php Took me a bit almost asked another question but here it is now it's working I wasn't using in_array(): $a = array("email1", "email2", "email3"); if(in_array($_SESSION['email'], $a)) { echo "Success"; }
  9. Ended up needing to change the xor to || I guess it wasn't working and I thought it was if($_SESSION['url'] != ('http://www.golden-wand.com/Pages/admin.php'||'http://www.golden-wand.com/Pages/admin-test.php')){} Edit: And now I feel silly cuz it's still not working properly but it's working when I'm using == at the top of the page with the xor, but not down here with the !=
  10. To be simple this is less lines and less work in my opinion but I did get the answer from you so thanks, I wasn't thinking about putting them inside parenthesizes that solved everything. Took a second to realize how to make it more simple than setting an array like I've seen in some posts or if that's what you meant exactly then you should have copied my code and corrected it because I wasn't sure exactly what you meant. It would be nice for anyone who saw this post in the future to also see the complete answer so they don't have to figure it out themselves. I'll like your answer but for best answer please simply add the code so I feel like the answer is complete: if($_SESSION['url'] != ('http://www.golden-wand.com/Pages/admin.php'xor'http://www.golden-wand.com/Pages/admin-test.php')) {}
  11. Trying to simplify my code to something like: if($_SESSION['url'] != 'http://www.golden-wand.com/Pages/admin.php'||'http://www.golden-wand.com/Pages/admin-test.php') This is what works that I would like simplified: <!---------------------------------- ADMIN FUNCTIONS START -------------------------------> <?php if($_SESSION['admin']=='1'){ if($_SESSION['url'] != 'http://www.golden-wand.com/Pages/admin.php'){ if($_SESSION['url'] != 'http://www.golden-wand.com/Pages/admin-test.php'){ ?> <input type="button" value="Admin Page" class="button hvr-wobble-skew" onclick="location.href='http://www.golden-wand.com/Pages/admin.php'"> <?php }}} ?> <!----------------------------------- ADMIN FUNCTIONS END -------------------------------->
  12. Actually the first condition does work perfectly fine and you nailed the second one right on the head, that one seems to work fine but it is nice to know what two and three equal signs mean so thanks for that
  13. It seemed to be working at some point but I'm not sure what I did now it displays the Admin Page button forever, I don't want it to include the button if the user admin is on the page. On the top of the admin.php page after the session_start(); I have this: $_SESSION['url']="http://www.golden-wand.com/pages/admin.php"; In the header.php I have this: <?php if($_SESSION['admin']==='1'){ if($_SESSION['url'] != 'http://www.golden-wand.com/Pages/admin.php'){ ?> <input type="button" value="Admin Page" class="button hvr-wobble-skew" onclick="location.href='http://www.golden-wand.com/Pages/admin.php'"> <?php }} ?> It's seems to be skipping the second if statement, I'm probably doing something wrong. I originally was attempting to put the entire input Admin Page button into a variable to be echoed back in my message section but it never worked because the variable seems to mess up the onclick fucntion since it's unable to accept double quotes. Please let me know how to accomplish hiding the button if this page exists Thanks I need this here with every post right? I own this site: http://www.golden-wand.com/phpfreaks.txt just added it to my signature
  14. Does it seem like a good idea at all to place a variable on every page with the link to itself that way in the header I can use the variable I set on the page that loaded the header, I could make it a session variable even $_SESSION['url'] then call it like: header('Location: '.$_SESSION['url'].'?activationsent=1'); Seems to be working fine, guess I solved this one by myself today
  15. Main issue is I'm using this header page to display my login and signup with code and all so I had to change the header("Location lines from permanent to self, when they were permanent that was how I was going back to the "main" page (wiping the statement variable away). Since my new method to make it universal directs to self it always keeps those variables I used to drop which in turn leaves up messages I wish weren't there sometimes. I didn't think I had explained it properly the first time, hopefully there is enough information to find any sort of solution, thanks.
  • 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.