bspace
-
Posts
64 -
Joined
-
Last visited
Posts posted by bspace
-
-
well if you need your main file to be .html
then your gonna have to set up an .htaccess file containing
AddHandler x-httpd-php5 .php .html
-
well you could look at a java solution
e.g. JUpload
-
the "code" for a pound sign is £
note the semicolon, your feed is not terminating the character reference correctly
the 'funny symbol' represents 𧹇, 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
-
rewards based on storing info in cookies?
i think you need to rethink this and do it with php and your database
-
Headers MUST be sent before any output is started.
-
forget the $imagei stuff
put the refs in an array
eg
$pageImages = array("images/image1.jpg", "images/image2.jpg", "images/image3.jpg");
loop through the array
-
if the link is opening the image in a new window that usually means the javascript isn't working
are you sure the js is loading?
you might have better luck asking in the javascript subforum
-
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
-
as far as i can see it's doing what it's supposed to
pointing to page.pl.php
you still have'nt said what you actually want it to do that's different to this
why would you want it to be different? looks workable to me
-
i seem to remember that safari has/had a problem with 'innerHTML'
setting it (the 'innerHTML') to an empty string before giving it a new value may be a solution
-
well i for one wouldn't bother reinventing the wheel
have a look at
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
-
$filename = "/path-to-file/log.txt"; $handle = fopen($filename, "r"); $logfile_text = fread($handle, filesize($filename)); fclose($handle); $pos = strpos($logfile_text, '>', 1); $rtrv-ls = substr($logfile_text, 9, ($pos - 9));
a base to start from
-
there's a benchmark page at http://www.phpbench.com/
which suggests that foreach is quicker
(scroll down to find)
although whether it's actually noticable in practice would probably come down to how complicated the code in the loop was
in this case i'd go for ease of reading the code over marginal speed gain
there's a number of other rather interesting comparisons here too
-
$resuts
$result
note the difference
-
assume $profile is an array
$profile = array_map("intval", $profile); if ((min($profile) >= 0) && (max($profile) <= 1)) {.......}
might be one way
-
if i understand what you want to do then instead of
header('Location:script/Script.jar');
you need to look at readfile
and protect the folder with htaccess, to prevent direct navigation
-
or for a full php script look at timthumb
resize on the fly with local cache etc etc
-
not to solve the main problem, but
you shouldn't be using id="bold" in that loop, but class="bold"
and amend the css to reflect this
ID names should be unique to 1 html element
-
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
-
a quick google of "Online Font Converter" gets you from .pfb to .ttf etc
then google "@font-face"
useful link http://www.fontsquirrel.com/fontface/generator
-
$query = "select * from client_information where concat(name_last,name_first,etc) like \"%$searchfor%\"";
check out "concat" and "concat_ws"
-
infact going straight to
http://www.secretauctions.com/atv_list.php
works without going through the login
ie - logged in using firefox, copied and pasted above url into chrome - no errors, no login required
-
well it looks like a problem with 'photo' somewhere
show us the form code
-
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
Stripping out block of text in file
in PHP Coding Help
Posted
sure you want to remove the drop table?
to remove the comments