Jump to content

Pezmc

Members
  • Posts

    50
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.pegproductions.com

Profile Information

  • Gender
    Not Telling

Pezmc's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi everyone, Me suffering a major problem with a website that I just can't explain, http://www.bradfordians.co.uk/, simply is completely blank for some combinations of OS and browser (or entirely for one person, for exaple working on a laptop at one house and not at another). These screenshots demonstrate: http://browsershots.org/http://www.bradfordians.co.uk/ The website (as far as my experience tells me) has no PHP problems nor any HTML/CSS problems (W3C valid: http://validator.w3.org/check?uri=http: ... ans.co.uk/) Does anyone know what the problem is? *Bows to knowledge* Many thanks,
  2. Sorry epic fail on the forum chosen... leave_field is the same as leavefield I was just testing removing the _ to see if it made a difference.
  3. Simple JS to clear fields and enable/disable a submit button, it works fine in all browsers except IE (grr...) IE throws a Object expected error on line 19, 21, 32 & 34 of the html L19 onfocus="join_field(this,'[email protected]')" onblur="leave_field(this,'[email protected]')" /></p> L21 onfocus="join_field(this,'p4ssxord')" onblur="leave_field(this,'p4ssxord')" /></p> L32 onfocus="join_field(this,'03cucjamf')" onblur="leave_field(this,'03cucjamf')" /></p> L34 onfocus="join_field(this,'p4ssxord')" onblur="leavefield(this,'p4ssxord')" /></p> I have absolutely no idea what is causing this error. Why is IE always so different? Does anyone know what is causing it & how to fix it? <form id="activate" name="activate" method="post" action=""> <div class="legend">Activate Your Account</div> <div class="form"> <p><label for="username">SLS Username: </label><input type="text" name="username" id="username" value="03cucjamf" onfocus="join_field(this,'03cucjamf')" onblur="leave_field(this,'03cucjamf')" /></p> <p><label for="password">SLS Password: </label><input type="password" name="password" id="password" value="p4ssxord" onfocus="join_field(this,'p4ssxord')" onblur="leavefield(this,'p4ssxord')" /></p> <p><input type="submit" name="submit" id="activateb" value="Activate" disabled="disabled" /></p> </div> </form> // JavaScript Document function join_field(what, text) { if(what.value == text) { what.value=''; what.style.color='#000'; } } function leavefield(what, text) { if(what.value == '') { what.value=text; what.style.color='#888'; } } function checkifempty() { if (document.login.username.value!=='[email protected]'&&document.login.username.value!=='') { if(document.login.password.value!=='p4ssxord'&&document.login.password.value!=='') { document.login.loginb.disabled=false; document.login.loginb.style.color = "#000"; document.login.loginb.style.border = "1px #000 solid"; } else { document.login.loginb.disabled=true; document.login.loginb.style.color = "#888"; document.login.loginb.style.border = "1px #ccc solid"; } } else { document.login.loginb.disabled=true; document.login.loginb.style.color = "#888"; document.login.loginb.style.border = "1px #ccc solid"; } if (document.activate.username.value!=='[email protected]'&&document.activate.username.value!=='') { if(document.activate.password.value!=='p4ssxord'&&document.activate.password.value!=='') { document.activate.activateb.disabled=false; document.activate.activateb.style.color = "#000"; document.activate.activateb.style.border = "1px #000 solid"; } else { document.activate.activateb.disabled=true; document.activate.activateb.style.color = "#888"; document.activate.activateb.style.border = "1px #ccc solid"; } } else { document.activate.activateb.disabled=true; document.activate.activateb.style.color = "#888"; document.activate.activateb.style.border = "1px #ccc solid"; } } if (document.all || document.getElementById) { setInterval("checkifempty()",100) }
  4. Thanks! Took a while! It must be a problem with my version of IE8 (latest). Can anyone else see the bug I am describing? (all the menu is on the left of the page and not floating to the left of the notepad)
  5. I have just noticed that IE8 completely destroys a website I recently made for a client, even when it is in compatibility mode. What on EARTH is going on? It works in every other browser (even abstract browsers like Gecko see: http://browsershots.org/http://www.m4mad.com/) http://www.m4mad.com/ Please advise what is going on, I have no idea how to fix this...
  6. Wow, thank you for downloading it to try and help me solve my problem. I have just discovered the bug does not appear in beta only in the dev chrome releases. Still can't figure out how to fix it. Thank you four your help.
  7. Part 1: Trying to create a new template for a blog however I have found a weird bug in chrome and was wondering if there was anyway around it. See http://beta.pegproductions.com/blog/ in any browser (safari, ie, firefox) notice how the vertical "rainbow" meets up with the prism at the bottom and the vector art on the left is the same color as the part of the rainbow it is connected to. Now open the site in chrome, as you may have noticed there is now a very thin purple like between the red vector art and the rainbow, and at the bottom all the lines are misaligned but still start and stop in the same places. Anyone know a work around so it looks the same? Part 2: As you can see on http://beta.pegproductions.com/blog/ at the bottom there is a black footer, for some reason I cannot understand in my head how I can have a layout similar to fluid coulomb fixed coulomb (the one with the peg in) fluid coulomb. As in that the left hand coulomb fills the left hand "space" and the right hand coulomb fills in the right hand "space", with the center one displaying the logo as usual. This is to place two sets white text along the bottom of the website with a gap in between the two so they don't overlap with the Peg. Any ideas? Part 3: Thank you for your time, I hope you can help!
  8. Thanks! Got it to work with: Query to get previous id : "SELECT id FROM TABLENAME WHERE id < $currentId order by id DESC LIMIT 1" (it will return 3) Query to get next id : "SELECT id FROM TABLENAME WHERE id > $currentId order by id LIMIT 1" (it will return 6)
  9. Trying to create the good old "previous" and "next" buttons in PHP for a database of news. News is just taken from the database where the ID posted (get) is equal to the ID and published = 1 (whether its online) Say I have this database Id Title Published 1 News Item 1 3 News Item 1 6 News Item 0 7 News Item 1 9 News Item 1 How if the current id is 1 can I show only next and link to id 3? or if the ID is 3 show previous (linking to one) and next linking to 7 or if the ID is 7 show previous (linking to three) and next linking to 9 or if 9 show just previous (linking to 7) Sorry rather hard concept to explain! Hope you can help!
  10. *BANGS HEAD ON TABLE REPETITIVELY* Was using the old geo_ip database I had with different collumb names Sorry guys! A bit of late night coding (3am) ness.
  11. Doing this it printed/echoed: SELECT * FROM `geo_ip` WHERE '1357240672' >= `begin_num` AND '1357240672' <= `end_num` Array ( [0] => 34 [id] => 34 [1] => 7.57.75.64 [begin_ip] => 7.57.75.64 [2] => 9.19.255.255 [end_ip] => 9.19.255.255 [3] => 121195328 [begin_num] => 121195328 [4] => 152305663 [end_num] => 152305663 [5] => US [country] => US [6] => United States [name] => United States ) I don't see any problems there What is sprintf about? Never have heard of it! Surely that can't be making the difference? I tried it without and there was no change apart from it appearing in a different order: "SELECT * FROM `geo_ip` WHERE 1357240672 >= `begin_num` AND 1357240672 <= `end_num` Array ( [0] => 24173 [id] => 24173 [1] => 80.229.0.0 [begin_ip] => 80.229.0.0 [2] => 80.229.255.255 [end_ip] => 80.229.255.255 [3] => 1357185024 [begin_num] => 1357185024 [4] => 1357250559 [end_num] => 1357250559 [5] => GB [country] => GB [6] => United Kingdom [name] => United Kingdom )" Thanks to all people trying to help!
  12. If you are asking what I think you are its exactly as with the other ones $status = mysql_real_escape_string($_POST['status']); $going = mysql_real_escape_string($_POST['going']); $looking = mysql_real_escape_string($_POST['looking']); $life = mysql_real_escape_string($_POST['life']); PHP will just get the "value" of selected option in the box
  13. Here is a little script that I CANNOT get to work! It is crazy! It is a problem with the mysql_fetch_array but I can't understand why. When the page is visited you see: Unknown and no errors at all. When I run "SELECT * FROM `geo_ip` WHERE '$ipnum' >= `begin_num` AND '$ipnum' <= `end_num`" manually from PhpMyAdmin with my $ipnum it works fine and outputs two rows. I don't understand why this script doesn't work at all? I am using the geo_ip database. Does anyone know what is going on? function connect_me(){ $DB_USER = 'REMOVED'; $DB_PASSWORD = 'REMOVED'; $DB_HOST = 'REMOVED'; $dbc = mysql_connect ($DB_HOST, $DB_USER, $DB_PASSWORD) or die(mysql_error()); mysql_select_db('REMOVED') or die(mysql_error()); mysql_query("SET NAMES `utf8`") or die(mysql_error()); if($ERROR_REPORTING == 1){ do_error($error,2);} } function disconnect_me(){ @mysql_close($dbc); @mysql_close(); } function check_ip(){ $ipParts = explode(".", $_SERVER["REMOTE_ADDR"]); if ($ipParts[0] == "165" && $ipParts[1] == "21") { if (getenv("HTTP_CLIENT_IP")) { $ip = getenv("HTTP_CLIENT_IP"); } elseif (getenv("HTTP_X_FORWARDED_FOR")) { $ip = getenv("HTTP_X_FORWARDED_FOR"); } elseif (getenv("REMOTE_ADDR")) { $ip = getenv("REMOTE_ADDR"); } } else { return $_SERVER["REMOTE_ADDR"]; } return $ip; } function get_country(){ $user_ip = check_ip(); $temp = explode('.',$user_ip); $ipnum = 16777216*$temp[0] + 65536*$temp[1] + 256*$temp[2] + $temp[3]; $qry = mysql_query("SELECT * FROM `geo_ip` WHERE '$ipnum' >= `begin_num` AND '$ipnum' <= `end_num`") or die(mysql_error()); $get_country = mysql_fetch_array($qry) or die(mysql_error()); if ($get_country['country_name']=="") { return 'Unknown'; } else { return $get_country['country_name'].':'.$get_country['iso_code']; } } $country_info = explode(':',get_country()); echo $country_info; disconnect_me(); PS, checkip works fine (tested with echo)
  14. I am currently using .htaccess as below to make "fake" htm files with php. RewriteEngine On RewriteRule ^pages/(.*).htm /index.php?page=$1&pages=1 However I have encounted a problem when I am trying to include php files to my script. Say template.php is stored at mysite.com/template.php and it is being included with include('template.php'); if I hit mysite.com/index.php?page=home&pages=1 it works fine. However if I hit mysite.com/pages/home so I am relying on htaccess it returns a include fail, file not found. How on earth do I get around this?
  15. How can I get this array to work? I am trying to add data to an array for every row of data? This is a sellection of queries that I need to parse into an array so a function can use the arra to draw a graph. I am new to arrays how can I get this to work? Please help? //Sql Query //Day Name $sql = "SELECT count(*) as cnt, DAYNAME(date) as dnr, TO_DAYS(date) as tdr FROM $dbsql WHERE date >= DATE_SUB( CURRENT_DATE, INTERVAL 6 day ) GROUP BY dnr,tdr ORDER BY tdr"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $comma = ","; $xdata .= '"'.$row[dnr].'"'.$comma; } //Data $sql = "SELECT count(*) as cnt, DAYNAME(date) as dnr, TO_DAYS(date) as tdr FROM $dbsql WHERE date >= DATE_SUB( CURRENT_DATE, INTERVAL 6 day ) GROUP BY dnr,tdr ORDER BY tdr"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $comma = ","; $ydata .= $row[cnt].$comma; } //Trim Extra Commas $ydata = substr($ydata, 0, strlen($ydata)-1); $xdata = substr($xdata, 0, strlen($xdata)-1); $y = array($ydata); $x = array($xdata); $title = "Unique Hits/Day"; $labelx = "Day"; $labely = "Unique Hits";
×
×
  • 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.