Jump to content

bspace

Members
  • Posts

    64
  • Joined

  • Last visited

Posts posted by bspace

  1. the "code" for a pound sign is £

     

    note the semicolon, your feed is not terminating the character reference correctly

    the 'funny symbol' represents &#163399, i assume the last bit '399' is the missing part of the price

     

    if you can't correct it at source, maybe you can do a search and replace

  2. first you can get the variable 'q' containing the coordinates using

     

    $coords = $_GET["q"];

     

    then split them at the ',' with explode

     

    $array_coords = explode(",", $coords);

    $coord1 = $array_coords[0];

    $coord2 = $array_coords[1];

     

    for further info google;

    $_GET

    explode()

    arrays

  3. well i for one wouldn't bother reinventing the wheel

     

    have a look at

    http://www.uploadify.com/

    and

    http://www.verot.net/php_class_upload.htm

     

    uploadify is jquery

    it needs a 'script' to do the actual uploading,

    i use a file i call upload.php

    this uses the php_class_upload class to do the work, at the end of this, if the upload succeeds i put the mysql update bit

     

    so, i use the jquery / uploadify bit on my main entry page

    this calls upload.php to do the lifting

    if the upload succeeds the database is updated with the file name

    uploadify can then, via a javascript callback, refresh part of your page with the newly uploaded image

     

    this lot takes a little understanding of using jquery/javascript and php together

    but you end up with a nice reactive file upload

     

    oh, and i'd use two tables as you suggest

    if in the future your going to need two or more images for the info, your good to go

  4. you'd be better putting the sidebar and content in separate divs, like this

     

    	
    <div class="content">
    <p>the quick brown fox jumps over the lazy dog.</p>
    </div>	
    <div class="sidebar">
    <p>stuff in the sidebar.</p>		
    </div>
    

     

    then your css goes like this

     

    	
    .sidebar {
    float:left;
    left:0px;
    position:relative;
    width:200px;
    }
    .content {
    float:right;
    position:relative;
    right:0;
    width:590px;
    }
    

     

    don't go adding padding / margin to these unless you can deal with possible box model problems

     

     

    as regards the way you've got the code right now, it's behaving just like it should

    if you wanted to go with it like that you'd have to float you're sidebar left

    then either give the <p> in the content a 200px left margin or float it right with a 590px width

  5. in this case you could remove everything after the last . in $ip giving 10.44.6.

     

    then this would work

     

    if ($ip == '10.44.6.')

     

    this won't work, because for instance, '10.44.6.' does not equal '10.44.6.1'.  You use something like strpos() instead.  Alternatively you can use regex to match it, if you want to match ranges. 

     

    but i wasn't sugesting comparing '10.44.6.' with '10.44.6.1'

    I was suggesting that if you take $ip, remove anything after the last '.'

    you will then effectively be comparing  '10.44.6.' with '10.44.6' no matter what the last part of the address is

     

    '10.44.6.' does equal '10.44.6.'

     

    there are obviously othe similar approaches, the point was that the check could be made without involving wildcards or netmasks etc

     

     

×
×
  • 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.