Jump to content

Canadian

Members
  • Posts

    57
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Canadian's Achievements

Member

Member (2/5)

0

Reputation

  1. Ok thank you! I will have to re-read that then. All the best,
  2. Here's the goal. After the user logs in on my login.php page I either redirect them by default to the "account.php" page OR redirect them to the last protected page they were trying to access. Here's what I'm doing. Using $_SESSION["username"] I'm verifying whether or not the user is logged in with my confirm_user_logged_in function below. If they are logged in, they go to the requested page. If not, I'm setting the page they came from as the $_GET variable 'last_page'. function confirm_user_logged_in() { if(!logged_in ()) { $last_page = $_SERVER['PHP_SELF']; $last_page_trim = ltrim ($last_page, '/'); $redirect_url = "login.php?last_page=" . $last_page_trim; redirect_to($redirect_url); } } function logged_in () { return isset($_SESSION["username"]); } function redirect_to($new_location) { header("Location: " . $new_location); exit; } This part works. If I go to my login.php page from "example.php" the $_GET['last_page'] value is set and I get the following in the url string. http://example.com/login.php?last_page=example.php Next... On the login.php page I'm testing to see whether or not $_GET['last_page'] isset. if (isset($_GET['last_page'])) { $last_page = $_GET['last_page']; } else { $last_page = "account.php"; } At this point if I echo $last_page I get the following result. example.php Here's the problem. If I call my "redirect_to" function it's always sending the user to account.php. Even though $_GET['last_page'] isset AND even though $last_page is set to "example.php", I'm still being sent to account.php. Here's the redirect_to function as called. redirect_to($last_page); Why is $last_page dropping the $_GET['last_page'] value as soon as I put it into the "redirect_to" function? Thanks!
  3. I guess in short I'm looking for a "production server ready" LAMP stack. XAMPP works for development servers... is there a production server options or a tutorial to get me there? Thanks
  4. I've been trying to set up a web server for weeks. I'm able to log in, secure the server, create IP tables, install the LAMP stack but then I'm lost. I have no idea how to configure the LAMP stack. I run a site that gets minimal traffic 360 days a year but spikes really high for about an hour days a year. I want to configure my LAMP stack to run efficiently for that type of situation. I want to make sure concurrent connection limits are correct, ulimit -n acceptable, max users are correct etc. Is there a "Pre-Configured" LAMP stack I could install or a tutorial anyone can recommend for configuring a LAMP stack for efficiency and security? I've good searched for days on end and just can't seem to find anything concrete. Thank you for your time!
  5. Hey thank you very much! I've been leaning towards Ubuntu so I'm glad you mentioned that option. I'll be sure to take a look at your suggestions. Thanks again,
  6. I'm fairly competent in front end design work. No expert, but enough to be dangerous. I'm interested in learning how to take a cloud server from scratch to a properly built, ready to scale, secure, efficient etc LAMP stack. I really have no experience in the topic. I've been going through a lot of information in the Rackspace Knowledge Center but was looking for a book or other tutorials to help me get started. At the current time, Linux is like Greek to me so a few books may be necessary. Thanks for your time and any suggestions.
  7. Thank you very much for the information. I have one last question. Perhaps hosting.com isn't the best hosting company for my situation. Are there any good ones you would recommend that offer managed dedicated solutions? Thanks again for your time, Chris
  8. My business has been growing and it is time to move on from a shared hosting account. I have been using hosting.com and they have suggested an Enterprise Cloud solution. The upside to this is my site will no longer be crashing (due to traffic) because the new hosting plan will be able to handle the load... the downside is the entire system has to be self managed. I have been doing front end development for years. I'm quite comfortable in that environment. However, I know nothing about back-end development. For example I have no idea where to begin with things like allocating resources, keeping things secure etc. Can anyone point me in a direction on where I could learn about these things? For example... are there any good books that would teach me how to manage my own hosting account? I'm pretty sure I'll be using MySQL, PHP, and Linux. Any help would be greatly appreciated. Thanks
  9. I'm using a simple form to grab an email address and send the person who signs up and automatic response. It was working for a while and now it's not. Not sure what happened. My hosting company told me to look into my headers. Can anyone help? Here is my code. Thanks, <?php /* Set e-mail recipient */ $subject = "Sign Up"; $headers = "From: admin@xxx.com" . "\r\n" . "CC: admin@xxx.com"; /* Check all form inputs using check_input function */ $sign_up_email_address = check_input($_POST['sign_up_email_address'], "Please enter your email address."); /* If e-mail is not valid show error message */ if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $sign_up_email_address)) { show_error("E-mail address not valid"); } /* Let's prepare the message for the e-mail */ $response_message = "Sample Message"; /* Send the message using mail() function */ mail($sign_up_email_address, $subject, $response_message, $headers); /* Functions we used */ function check_input($data, $problem='') { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); if ($problem && strlen($data) == 0) { show_error($problem); } return $data; } function show_error($myError) { ?> <?php echo $myError; ?> Thank you,
  10. Here is the solution... Remove position: relative; from... #vtab > div { margin-left: 80px; border: 1px solid #ddd; min-height: 500px; padding: 10px; position: relative; z-index: -1; -moz-border-radius: 20px; }
  11. I'm using a jQuery vertical tab script. For some reason I cannot get links or YouTube videoS inside of the tabs to work. Any idea why? Below is the HTML, CSS and JS. Any help would be greatly appreciated! Thanks, JS jQuery(document).ready(function($) {var a=$("#vtab>ul>li"); a.mouseover(function(){a.removeClass("selected"); $(this).addClass("selected"); var b=a.index($(this)); $("#vtab:first>div").hide().eq(b).show()}).eq(0).mouseover()}); HTML <div id="vtab"> <ul> <li class="day_one"></li> <li class="day_two"></li> <li class="day_three"></li> <li class="day_four"></li> </ul> <div> <h2>Day 1</h2> DAY 1 CONTENT <a href="http://www.google.com">Click here</a> </div> <div> <h2>Day 2</h2> DAY 2 CONTENT </div> <div> <h2>Day 3</h2> DAY 3 CONTENT </div> <div> <h2>Day 4</h2> DAY 4 CONTENT </div> </div> CSS #vtab { margin: auto; width: 940px; min-height:350px; } #vtab > ul > li { width: 80px; height: 80px; background-color: #ffffff !important; list-style-type: none; display: block; text-align: center; margin: auto; padding-bottom: 10px; border: 1px solid #fff; position: relative; border-right: none; opacity: .3; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30); } #vtab > ul > li.day_one { background: url('day_1.png') no-repeat center center; } #vtab > ul > li.day_two { background: url('day_2.png') no-repeat center center; } #vtab > ul > li.day_three { background: url('day_3.png') no-repeat center center; } #vtab > ul > li.day_four { background: url('day_4.png') no-repeat center center; } #vtab > ul > li.selected { opacity: 1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); border: 1px solid #ddd; border-right: none; z-index: 10; background-color: #ffffff !important; position: relative; } #vtab > ul { float: left; width: 80px; text-align: left; display: block; margin: auto 0; padding: 0; position: relative; top: 0px; } #vtab > div { margin-left: 80px; border: 1px solid #ddd; min-height: 500px; padding: 10px; position: relative; z-index: -1; -moz-border-radius: 20px; } #vtab > div > h4 { font-size: 18px; margin: 0px; padding: 0px; } /*IE7 Support*/ #vtab > ul > li.selected{ border-right: 1px solid #fff !important; } #vtab > ul > li { border-right: 1px solid #ddd !important; } #vtab > div { z-index: -1 !important; left:1px; }
  12. Ok!!! You're the man. I tried out your suggestions and it worked like a charm. Thank you very much!
  13. I'd like to make a quick update. I was mistaken with the version of IE that wasn't working. IE8 actually works. It's IE7 that doesn't work. I know IE7 is old but I'm still getting a considerable amount of traffic coming to my site who use IE7. Does this change the advice you gave me? Is there a simple IE7 fix? Sorry for mixing that up.
  14. Wow! Thanks for all of the help. I'm going on my 30th hour this weekend. I'm going to dig into this in the next week or so after I get the rest of my site live. The page you are helping me with will be live later. Thanks again!
×
×
  • 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.