Search found 191 matches

by pootergeist
Sat Nov 08, 2003 3:24 am
Forum: PHP coding => General
Topic: elseif or more elegant solution?
Replies: 8
Views: 1961

the obvious reduction would be to just state $shipping_zone = 'zone ' .$shipping_zone; effectively just prepending 'zone ' to any value of $shipping_zone You could also use a multiple ternery $shipping_zone = ($shipping_zone < 6) ? ($shipping_zone < 5) ? ($shipping_zone < 4) ...
by pootergeist
Sat Oct 18, 2003 11:33 am
Forum: PHP coding => Images
Topic: Watermark font always black
Replies: 2
Views: 1696

you MUST allocate the colour to the same image as you are writing to $white = imagecolorallocate( $img , 255,0,255); // defines an index as white for image pointer $img imagettftext( $photoImage , 12, 0, $horizmargin, $vertmargin, $white, $ttf, $waterMarkText); // writes string to image with pointer...
by pootergeist
Thu Oct 09, 2003 2:13 am
Forum: PHP coding => General
Topic: using " and '
Replies: 4
Views: 1117

personally I'd advise getting used to concatenating outof and backinto strings rather than using inline parsed variables mysql_query("SELECT * FROM `table` WHERE arg=" .$_COOKIE['var']. " AND arg2 LIKE '%" .$_POST["arg2"]. "'"); as you are not inside the string it doesn't mind what type of quoting y...
by pootergeist
Tue Sep 30, 2003 11:17 am
Forum: PHP Scripts
Topic: db paging: 404 not found
Replies: 4
Views: 2102

I'd guess that you have a snag in your code somewhere.

If you'd be kind enough to show us the code we might have a much better chance of deducing exactly what is fubar.
by pootergeist
Fri Sep 26, 2003 7:22 am
Forum: Free time
Topic: The best color
Replies: 4
Views: 2402

a bgcolor="silver" call would return as #C0C0C0 background which if you ask me is a lightish grey

maybe a tad extra blue and a teeny bit more of the red and green - something like #CACAD2

to get anything to actually look silver you'd have to run a gradient or light effect though.
by pootergeist
Thu Sep 25, 2003 4:39 am
Forum: Free time
Topic: DSS
Replies: 5
Views: 2635

Department of Social Security?
by pootergeist
Tue Sep 23, 2003 3:31 am
Forum: PHP coding => General
Topic: Passing values prob
Replies: 1
Views: 753

the easiest way (ie not sessions or cookies) would be to add the values to the form as hidden inputs <form method="post" ....... > foreach($_GET AS $var=>$val) { echo '<input name="' .$var. '" type="hidden" value="' .$val. '" />'; } might need a urldecode depending on your settings.
by pootergeist
Mon Sep 22, 2003 10:14 am
Forum: mySQL & php coding
Topic: news script
Replies: 9
Views: 3412

remove the WHERE id = $_GET[id] from the query
by pootergeist
Mon Sep 22, 2003 2:44 am
Forum: PHP coding => General
Topic: Prob displaying results in table.
Replies: 2
Views: 866

if you are not getting data out then I'd guess that the mysql query is returning nowt - you could test with

<? while ($row = mysql_fetch_array ($result)) ?>
<? { ?>
<tr><td colspan="4"><pre>
<? print_r($row); ?>
</pre></td></tr>
etc etc
by pootergeist
Sat Sep 20, 2003 11:01 am
Forum: PHP coding => General
Topic: $_POST isn't working all the time
Replies: 1
Views: 1061

well firstly ?50 would be accessed through $_GET or $_REQUEST and secondly - without seeing your form code and associated php receiving code we'd simply be trying blindly to guess at where your script has snags.
by pootergeist
Wed Sep 10, 2003 8:31 am
Forum: JavaScript
Topic: OnChange doesn-t work !!!!
Replies: 2
Views: 2172

your arrays are named multimedia_C , _H and _I yet your option values are information-technology_C etc
by pootergeist
Tue Sep 09, 2003 2:54 am
Forum: PHP General
Topic: W3C Validator and Session
Replies: 2
Views: 1139

apparently

Code: Select all

ini_set('arg_separator.output', '&amp;');


will also work
by pootergeist
Mon Sep 08, 2003 1:51 pm
Forum: PHP General
Topic: W3C Validator and Session
Replies: 2
Views: 1139

If your error_reporting doesn't complain about trying to set session variables without instantiating the session, you could use if(strpos($_SERVER['USER_AGENT'],'W3C_Validator') < 0) { session_start(); } so the validator doesn't get a session start and thus the sid ...
by pootergeist
Mon Sep 08, 2003 10:01 am
Forum: Free time
Topic: most used free (sub)domain
Replies: 12
Views: 5308

Back off topic...

swirlee wrote:Actually, the possessive "its" never has an apostrophe.


Ah, in that case they'll be using a glaring grammatical error on their front page ;)

Also looks like you'll be doing the proof-reading for Redcircle :)
by pootergeist
Mon Sep 08, 2003 3:24 am
Forum: PHP coding => General
Topic: checking to see if a file exists
Replies: 2
Views: 973

if(file_exists('/home/hjsahj/hafh/file.ext'))
by pootergeist
Sun Sep 07, 2003 2:12 am
Forum: Free time
Topic: most used free (sub)domain
Replies: 12
Views: 5308

That sentence can be argued as grammatically correct as Tokelau is both a Proper Noun and debatably living, thus the it becomes a possessional reference of a living Proper Noun - the domain names belong to it, they are it's domain names. Similar to saying swirlee's last post, the apostrophe indicate...
by pootergeist
Thu Sep 04, 2003 12:30 pm
Forum: PHP coding => General
Topic: Php upload file
Replies: 5
Views: 1556

UPLOAD_ERR_OK Value: 0; There is no error, the file uploaded with success. UPLOAD_ERR_INI_SIZE Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini. UPLOAD_ERR_FORM_SIZE Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form. U...
by pootergeist
Thu Sep 04, 2003 3:24 am
Forum: PHP Scripts
Topic: PHP & OOP - Image_Thumbnails
Replies: 4
Views: 2331

I think you should set the compression/quality as a variable (maybe even one passed to the constructor) as 60% is not going to be acceptable to most designers. For a static value I'd reccommend 85% or even 90 I also have a thumbnailing class being distributed from most of the class distro sites and ...
by pootergeist
Thu Sep 04, 2003 3:17 am
Forum: PHP coding => General
Topic: Php upload file
Replies: 5
Views: 1556

is_uploaded_file is vaguely deprecating in favour of the reg_globs OFF and $_FILES array manner of addressing variables if($_FILES['userfile']['error'] == 0) { // we have an upload // usable vars echo ' 'temporary file name = ' .$_FILES['userfile']['tmp_name']. '<br /> 'file size = ' .$_FILES['userf...
by pootergeist
Tue Sep 02, 2003 1:53 am
Forum: Free time
Topic: NS7 vs IE6
Replies: 46
Views: 37449

surely if you were going to use IE (which might get a forced ie6.5 soon due to the patent issues with eolas) you'd opt to use either myIE2 ( m - free ) or iRider ( m - paid [arguably the best browser developed from the IE engine]) and take advantage of tabbed browsing and other extra features rather...
by pootergeist
Sat Aug 30, 2003 10:50 am
Forum: JavaScript
Topic: Maximize a Browser Window
Replies: 5
Views: 3367

I agree, why maximize a remote browser and risk annoying people. Personally I surf in a window somewhere in the region of 900 by 800 with a few applications scattered around the edge. Most sites fit that space quite nicely. Then you get the odd one that maximizes to fill 1600x1200 (or 1840x1380 some...
by pootergeist
Thu Aug 28, 2003 10:30 am
Forum: PHP coding => General
Topic: having a blond moment
Replies: 3
Views: 1249

you wanna keep the last four

$arg = substr($string,-4);

or lose the last four

$arg = substr($string,0,-4);
by pootergeist
Wed Aug 27, 2003 1:07 am
Forum: PHP coding => Images
Topic: SOLVED: Original Filenames in images from PHP
Replies: 3
Views: 1959

because you are sending a redirect ("Location: ...") header, you are still just sending the http request to the file in question. Using a location header also means you cannot access files above public root or where-ever a direct http request cannot access. To stream the file, you'd probably do best...
by pootergeist
Tue Aug 26, 2003 7:02 am
Forum: PHP coding => Images
Topic: To preload or not to preload, that is the question.
Replies: 4
Views: 2054

if they are just photos then no you shouldn't preload. preloading is used so that an image is cached ready for when a page needs it - such as mouseover navigation buttons. As they change when the mouse runs over them, preloading is used so that they don't have to be downloaded at the time of mouseov...
by pootergeist
Wed Aug 13, 2003 9:34 am
Forum: PHP General
Topic: anyone know how this works? amazing!
Replies: 5
Views: 1701

php|arch uses a similar approach - a linked pdf file that is password protected. You can download last Jans issue and see for yourself.