Jump to content

peranha

Members
  • Posts

    878
  • Joined

  • Last visited

Everything posted by peranha

  1. Do you have error reporting on, are you outputing data before the header is called? if you are outputing anything, they it will not redirect. Put this at the top of the page and see if anything is erroring out error_reporting(E_ALL);
  2. You think that this is bad, look at what he just posted a few minutes ago about a topic from 2006. http://www.phpfreaks.com/forums/index.php/topic,86802.0/topicseen.html
  3. This is my clean_data function // Data cleaning function to clean data before inputing to database. function clean_data($string) { $string = addslashes($string); $string = htmlspecialchars($string); $string = mysql_real_escape_string($string); return $string; Should it be something different.
  4. When I insert data into my database, it is put in just as it was typed. on output, the data all runs together in one single line. How do I force a br in the data? ex. line 1 line 2 line 3 outputs as line1line 2line3 This is the code that I use to insert data to the database. $update = clean_data($_POST['update']); $query = "INSERT INTO " . $pre . "updates (upddate, upddone) VALUES ('{$date}', '{$update}')"; $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); Here is the code to display the output from the database. $query = "SELECT upddate, upddone FROM bsc_updates ORDER BY upddateid desc $limit"; $result = mysql_query($query) or die ("<b class='red'>There are no updates on record.</b>"); if (mysql_num_rows($result) > 0) { while($row = mysql_fetch_row($result)) { echo $row[0] . '<br />'; echo stripslashes($row[1]) . '<br />'; } }
  5. could you set a cookie on the users computer, and check to see if that cookie is there. Not use a session, but a plain old cookie?
  6. What is this file auth_user_fns.php is it outputing anything?? check line 102 of that file and see if there is something there.
  7. We also need to know the problem. is it supposed to echo something, what is it supposed to do.
  8. Anyone think of anything?? I cant seem to find anything that will work. Thanks.
  9. you would put in the if if ((trim($_POST['birthday']) == '') || $_POST['birthday'] == 'mm-dd-yyyy') { $birthdayempty = 1; } That will trim out all spaces and make sure it is not equal to 0 characters. It will also check to make sure that something is filled in other than the default which I am just guessing. not too good with java either, so not sure how to code that if you want to go that way.
  10. You want to look up BB code.
  11. if($playerdead1 [Time_Left] > 0 && $PHP_SELF != 'inventory.php') { Should be if($playerdead1 [Time_Left] > 0 && $_SERVER['PHP_SELF'] != 'inventory.php') { Give that a try.
  12. You could do if $_POST['uname'] == '' { $unameempty = 1; } if $_POST['gender'] == '' { $genderempty = 1; } if $_POST['birthday'] == '' { $birthdayempty = 1; } Then you could do if $unameempty == 1 { echo "<b>username</b>"; } else { echo "username"; } if $genderempty == 1 { echo "<b>gender</b>"; } else { echo "gender"; } if $birthdayempty == 1 { echo "<b>birthday</b>"; } else { echo "birthday"; } Something like that should work.
  13. where are you defining $link as well, dont see it anywhere, and what is if in the query for??
  14. Put this at the top of the page to be blocked unless logged in and see if this works. <?php session_start(); if (!isset($_SESSION['session_name'])) { header ("Location: index.php"); exit; } echo "this works fine is sessions is working."; ?> This is just a basic check. the code that mark gave you will tell you if the session is working or not by echoing the session_id. if you get a blank page, then your sessions arent working.
  15. $query = "SELECT * FROM intowar1"; should be something like $query = "SELECT * FROM intowar1 WHERE ipadd = '$ipnumber'"; you are currenty selecting all addresses. then $row = mysql_fetch_row($result) or die("ERROR LEVEL 4");
  16. mysql_query("INSERT INTO intowar1 (ipaddress, thedate) VALUES('{$ipaddress}', '{$thedate}')") Try that i added '{ }' to the values. That is what I use.
  17. Yes, you need session_start(); at the top of the page before you can destroy it.
  18. Also the form and the input name are both named 'name' not sure but that might cause an issue later.
  19. I am guessing by this statement that some of the images are working? You need to tell or show exactly what is or is not working. None of the images work when I have the htaccess with the first post. The ip addresses are static private address on my network, so I know they are right, and will not be changed unless I change them myself, (or a hacker gets in and changes them). I call images with <img src="your_image.jpg"> on all pages, and with the first script, none of the images show up even though 127.0.0.1 is set to allow access. Also 192.168.150.100 is my PC, and when I just navigate to the server via the private ip address, not the website, the images show up, just when i go to the website, they do not show up. I just put in the Index -options as I know it will show an error, and will still use the images in the website, but I need to do both use the images in the website, and block access to the folder, and block direct access to them if someone knows the direct path.
  20. Anyone know how to do this? If I put Options -Indexes in the htaccess, I get the pics to come up on pages, and block direct access to the folder, but now if they know the file name, They can access the pic. Can this be done with htaccess, or do i need something else to block this access. I cant seem to find anything anywhere that will do this.
  21. have you tried contacting osCommerce to see if you can get it from there?? Maybee someone with that software can upload if for you, or download the software again, and just copy that file from the installer??
  22. This line echo 'ite Url: <input value='$linkasd' type='text' size='10' maxlength='40' name='link'> <br />' you do not close with ; echo 'ite Url: <input value='$linkasd' type='text' size='10' maxlength='40' name='link'> <br />'; also start php with <?php not <? unless you know it will be supported.
×
×
  • 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.