Jump to content

floridaflatlander

Members
  • Posts

    671
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by floridaflatlander

  1. You didn't have a doc type on a page I looked at. If cost is an issue put the whole thing in a wrapper and center, change your hover color in your menu, on the white background it's hard to see and it really is old school but you need to design for your customers and not us. What is the customer expecting?
  2. Have you looked at your source to see if anything is being included? Show some of your source php file around the include so we can see what your doing.
  3. I'm not sure I know what your doing. If this .. <?php include ("css/additionalcss.css"); ?> Take out the php tags in your css and try it Opening and closing php tags should be <?php & ?> I don't know where you're at in your script as far as opening and closing php tags go. Play with it and see what happens
  4. The form looks okay I have this stuff around it }} e bf version 3.0
  5. ?> <style type="text/css"> // css content in here </style> <? Are these opening and closing php tags like you have them in your file?
  6. Where is line 83? Usually the problem will be around line 83, a missing , or ; somewhere north of that line.
  7. I've been thinking that I needed to build a database to store sessions in. However, seeing a post in another topic got to pondering if I really need it now. My site is very small and as of now the login script makes the normal sessions variables, member id, display name, etc., and I've also thrown in http_user_agent. If sessions are destroyed by logging out or by closing the browser is a session database really needed? How much does site size matter? Say on a very small site (10-15 people a day, no money changing hands, just logging in and posting) or medium small site (50-100 people a day, no money ...) ? Thanks
  8. That was it, my host hasn't got back to me yet but they had been working on my site a few days ago and I'm guessing assigned register_globals on for some reason and didn't assign it to off again when they were through Thanks again
  9. Are doing this on a php file? Are your paths correct?
  10. Thanks PFMaBiSmAd, I'll check into that. The file I loaded said register_globals is on, I went to my host control panel and it said register_globals is off. I've contacted my host and they should be in touch with me shortly. I'll mark this closed when I check and see if the main problem is solved. Thanks all for the help
  11. My register_globals settings are to on A user has to click a logout link to logout or close the browser. Here is the logout code on the logout page <?php ...calls to connect to db ..call header // If no member id session variable exists, redirect the user: if (!isset($_SESSION['id_mem'])) { $url = "$home/index.php"; // Define the URL: ob_end_clean(); // Delete the buffer. header("Location: $url"); exit(); // Quit the script. } else { // Log out the user. $_SESSION = array(); // Destroy the variables. session_destroy(); // Destroy the session itself. setcookie (session_name(), '', time()-300); // Destroy the cookie. } ?> Yes, it updates the db and to play I added // Test to see id_mem value $id_mem = $_SESSION['id_mem']; header("Location: $home/member/index.php?user=$id_mem"); exit(); // Quit the script. To see if $_SESSION['id_mem'] still had a value after the insert and it did, sending me to the correct user page /member/index.php?user=20
  12. ONE of my SESSION values isn't remaining after login while others do. This works fine on my localhost, it's on the live site that there is a problem and it just started yesterday. Before that it worked great. Out of the four SESSIONs made I can only echo three values on other pages, member id the most important doesn't transfered to other pages Notes: all these files are in the same folder, there is a SESSION started for the member id on the login page, you can see that it is used in the redirect below and the redirect works fine with the redirect going to the correct page " $home/member/index.php?user=$id_mem " Here is the login page // Here's the basic login page info <?php # login.php session_start(); ob_start() ...connect to db & header called... ...Form validation..... if ($e && $p) { // If everything's OK. // Query the database: $q = "SELECT id_mem, display_name, mem_group FROM sn_members WHERE (email='$e' AND password=SHA1('$p')) AND active IS NULL"; $r = mysqli_query ($dbc, $q) or trigger_error("Query: $q\n<br />MySQL Error: " . mysqli_error($dbc)); // or die("Error: ".mysqli_error($dbc)); if (@mysqli_num_rows($r) == 1) { // If a match was made. // Register the values & redirect: // Give SELECTED elements a session $_SESSION = mysqli_fetch_array ($r, MYSQLI_ASSOC); $_SESSION['agent'] = md5($_SERVER['HTTP_USER_AGENT']); mysqli_free_result($r); // Update db for last login $id_mem = $_SESSION['id_mem']; // <<< SESSION member id has a value here because it's used in the redirect below $ip = $_SERVER['REMOTE_ADDR']; // Get ip address of person logging in $q = "UPDATE sn_members SET last_login = Now(), ip = '$ip' WHERE id_mem = '$id_mem' LIMIT 1"; $r = mysqli_query ($dbc, $q) or trigger_error("Query: $q\n<br />MySQL Error: " . mysqli_error($dbc)); header("Location: $home/member/index.php?user=$id_mem"); exit(); // Quit the script. } ?> Here is the main page that a user would be redirect to above <?php // /member/ all member info is through this folder session_start(); ob_start(); if (isset($_GET['user']) && is_numeric($_GET['user'])) { $user = $_GET['user']; $user = $user; if ($user < 0) { header("Location: $home/index.php"); exit(); } } if ((!isset($_SESSION['id_mem'])) && (!isset($_SESSION['agent']) OR ($_SESSION['agent'] != md5($_SERVER['HTTP_USER_AGENT'])))){ // If not a logged in member redirect header("Location: $home/index.php"); exit(); // Quit the script. } ?> Thanks in advance for the help SJ
  13. Well, when I make the window smaller it works for me in both ie 7&8. I see from firebug you have your body set to body { border: 0 solid #000000; margin: 0 auto; width: 800px; } The body is everthing in the monitor. You don't have any style for the class "topMenu" which most people name wrapper or allcontant. Play a little and use body { margin: 0; padding: 0; } .topMenu { /* AKA allcontent, AKA wrapper */ border: 0 solid #000000; margin: 0 auto; width: 800px; } Also ck for different padding and margin settings between elements on different pages
  14. Is it that your slider bar on the right is displayed on some pages but not others? To me it worked better in ie7 than ie8 or firefox. Also as a note I didn't see your front page logo in ie but I see it in firefox.
  15. I just thought about that as my dinner was cooking. I use PHP_SELF on pages that don't need really need security(I hope), no login or out or entering or editing info etc. I'm going to ck into REQUEST_FILENAME, thanks
  16. I use // Start defining the URL... // URL is http:// plus the host name plus the current directory: $url = dirname($_SERVER['PHP_SELF']); // Remove any trailing slashes: $url = rtrim($url, '/\\'); $file = basename($_SERVER['PHP_SELF']); $file = "/$file"; $url = $url.$file; You can echo $url or $file or both and see what they give you on different pages I don't know what you want but I then use a switch function to determine the info page I needs //$folder = ''; when online <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< switch ($url) { case "$folder/index.php": $page_title = 'Xyz'; $h1 = 'Xyz'; $h2 = 'xxx'; $description = page description'; $keywords = 'keywords'; break; // Default is to include the main page. // Note no robots as default default: $page_title = 'Xyz'; $h1 = 'Xyz'; $h2 = 'xxx'; $description = page description'; $keywords = 'keywords'; break; } I use this nto determine the folder if (stristr($_SERVER['HTTP_HOST'], 'local') || (substr($_SERVER['HTTP_HOST'], 0,7) == '127.0.0')) { $local = TRUE; $home = 'http://localhost/local-folder'; // No backslash, it's added in switch $folder = '/local-folder'; $debug = TRUE; } else { $local = FALSE; $home = 'http://www.website.com'; $folder = ''; //$folder = ''; when online } I throw the $home in links like <a href="<?php echo "$home"; ?>/index.php">Home</a> that way they work on my localhost & online $folder is used in the switch file
  17. With a little work it may work You have a lot of minor errors according to http://validator.w3.org/. Put your url in w3 and then look at your source html and find the problem in your php files. There is two mentions of open comment tags with no closing tags. There are escaping slashes in your JavaScript, meaning you used single quotes or something and then escaped the double quotes. Many are repeated errors, something wrong with your code not smarties . Get fire foxes fire bug and it will also help you find your problems. PS it will look d****n fine when your through
  18. Have you viewed your source code? Somethings wrong with your css or with the html that your php is echoing. Also it helps to have something in a div to see your style if your divs don't have height.
  19. I'm not sure what you're asking, you can use any column for the WHERE clause in the delete. I put my deletes in single quotes like WHERE user_id = '1' or something like WHERE user_id ='$user_id' Are you sure there is a record WHERE user_id = 1 AND question_id = 7 AND answer_id = 3 Why does your " AND `answer_id` " have quotes? Have you tried " or die("Error: ".mysqli_error($dbc)); " to see if there is a specific error. Also use LIMIT 1 if you're deleting just one row.
  20. Are you running this after a SELECT query and before an UPDATE ? if you are if(empty($row['login_ip'])){ $login_ip = $_SERVER['REMOTE_ADDR']; $q = "UPDATE table ................ SET login_ip = '$login_ip'"; }
  21. How do you input your time? Yesterday I put 'Now()' with single quotes in my sql statement by mistake instead of Now() and it entered 0000-00 etc, in my database.
  22. Yea I just saw that, I don't use '{$contribution}' in a query, i use '$contribution' I don't know if that's it or not. I was hoping someone with more knowledge like Pikachu2000 will chime in.
  23. I can't see anything right off hand have you tried " or die("Error: ".mysqli_error($dbc));"
×
×
  • 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.