oni-kun
Members-
Posts
1,984 -
Joined
-
Last visited
-
Days Won
1
Everything posted by oni-kun
-
General question about numbers vs. text in code
oni-kun replied to galvin's topic in PHP Coding Help
Depends on the scale of the project. ID's are much easier to implement and maintain, but WHERE `id`= 3 or WHERE `id` = 'Kentucky' is the same in the end. As for speed, it is negligable. -
$mysqlresult = '1,7,9,10,15'; $array = explode(',', $mysqlresult); print $array[2]; //9 print '<br/>' . print_r($array);
-
PHP is a serverside language and cannot directly interact with the client. Thankfully AJAX and JS's onChanged() function will be in your interest and can get the job done.
-
Also I am trying to figure out the echo code that will allow me to echo the value in that div class on that page. I am sorry to be a pain and I know I am probably over my head with this. Why are you not using file_get_html()? Load_file doesn't create an object. I believe: $ret = $html->find('div[class=hpNCHeader]')->innerhtml; Should work, but it shows that in the manual.
-
Browser don't recognize the new updated text file for download.
oni-kun replied to ask9's topic in PHP Coding Help
Make caching private for Internet Explorer, and disable it for all other browsers via header -
Why aren't you doing anything with the array? $arr = $_GET['select2']; $contacts = implode(', ', $arr); //e-mail1, e-mail2 in php's mail() acceptable format mail
-
No problem. There are many other methods, but that is the most simple and efficient.
-
$orig = "Music Video"; $str = str_replace(" ", "", $orig); echo $str;
-
ini_set('max_execution_time', $whatIsTheLimit);
oni-kun replied to johnsmith153's topic in PHP Coding Help
ini_set('max_execution_time', -1); Duh. -
isset and I'd recommend against using shorttags, as they may not parse as PHP code in some cases (such if a simple server configuration was done, upgrade, etc, they would not work). Use <?php and ?> respectively.
-
There's simply enough filesize on uploaded files. There's a nice article on image resizing here: http://articles.sitepoint.com/article/image-resizing-php It'd make sense to keep all custom images such as http://www.dyno-charts.com/upload/Mustang.jpg Becoming http://www.dyno-charts.com/chart.php?whichchart=Mustang.jpg (It's a jpeg, so it'd lose its quality naturally on that type of expansion.) I guess it's just personal preference, but it's nice to keep it a fair size, because a lot of pictures uploaded may/should be a suitable size for displaying rather than taking up space.
-
$i+=1 would have (double assigning), but $i++ is simply an iteration pointer (Post-increment as in other languages) such as ++$i for pre-incrementing. It's a faster pointer.
-
function authSendEmail($from, $namefrom, $to, $nameto, $subject, $message) { //SMTP + SERVER DETAILS /* * * * CONFIGURATION START * * * */ $smtpServer = $smtpserver; $port = $smtpport; Where is $smtpserver and $smtpport defined? They aren't, therefor fopen (fputs) has nothing to connect to.
-
Actionscript is ECMA (like JS), var++ is Java/C.
-
I could write a clone function in 6-10 lines with md5, It's not large. And by version, it came out 5.0.0, Fairly old release.
-
$i += 1 if ($i == 3){ echo '</tr><tr>' $i = 0 --> $i++; if ($i == 3){ echo '</tr><tr>'; $i = 0;
-
"mysql_num_rows" is the number of rows to feed into the table, to make it variable length. It doesn't list the column names.
-
It's got an original 'old'/clean style to it. Only thing I can see negligable is the quality of some of the pictures posted, they're a bit too expanded.
-
Your header is glued to the top of the page, (IE/FF/Chrome) which is quite contradictory to aesthetics, and the "Custom google search" seems to be put in there out of the blue, You should add matching patterns to the background to allow it to be implemented properly, else it's more an eyesore than a useful task (if you are even using it for search and not ads..)
-
I have another domain on the same network purely for that use, It runs intranet to transfer nightly backups to the 'database archive' I created, since it's internal bandwidth it's fairly fast.
-
http://thedesignspace.net/MT2archives/000472.html Should bring some answers to light.
-
The bloody source is 100mbs+, I don't get that.