Hi guys I need to convert coordinates in the following form:
N42-53.9°
W072-16.2°
INto something thats kinda like the following:
-90.7311
0.346944
A php function would be greatly appreciated - or just a formula would also be nice enough :)
...
Currently I have a form that submits an image with textfields such as
title, description and another field that autoincrements for imageID, another
area for the actual file , called vfile, and *** another part that has
3 checkboxes and a text field.
Everything works fine, and this is what it does. Submits the data to a database so that i...
Hello all,
I am trying to make use of the PHP driver for MS SQL Server version 1.0.
I have everything setup but I think I am having trouble loading up the extension php_sqlsrv_ts.dll. I have gone to the command line and try this:
C:\wamp\bin\php\php5.3.0>php.exe --re sqlsrv
Exception: Extension sqlsrv does not exist
C:\wamp\bin\php\p...
The print $content statement in node.tpl.php is causing my whole layout to break probably due to incorrect nesting of DIVs.
I want to check and fix that but I can't figure out what/where is the source of the $content variable in node.tpl.php file.
I'd appreciate any help. Thanks.
...
Running PHP on IIS6, how can I open and extract the contents of a CAB-file? Is there any way of doing this witout using exec? I don't have permission to run stuff with exec.
...
The Smarty FAQ suggests one way to handle cacheable fragments, but it needs each page controller to do tons of work up-front, instead of encapsulating things properly.
We want to get to a stage where we can do something like:
<div id="header">
{our_categories}
{our_subcategories category=$current_category}
</div>
The output of th...
I would like to say upfront that i am not a programmer. I'm 1 of 3 partners in a small start up. Two of us have a business and sales background, whilst the third guy is a very experienced Java Programmer/engineer (and a good friend).
As with most start ups we believe we'll be the next big website. We have found a opportunity that the "...
Hi there,
I am currently working on a very specialized PHP framework, which might have to handle large database transfers.
For example:
Take half of the whole user count; this should be every day's workspace for the framework.
So, if my framework is required by big projects, is it recommend to use single transactions with multiple qu...
I am working on a kinda document management system. The end users are business class users.
I currently check and allow files to be uploaded only if they are one of the followings:
"png|jpe?g|gif|xls|doc|docx|csv|ppt|txt|pdf|rtf"
my questions are -
If I add "xml" into the list? can they cause any security issue?
What other document...
Hello everone,
I am buidling a small job application website, and i'm using a the basis of a login system taken from a Nettuts.com tutorial.
The logging in works fine, but I am having trouble getting the details for the currently logged in user, for example if a user enters their personal details, i can process the data into the databas...
Hay guys. I'm kinda new to OOP in PHP. I've learnt how to write and create objects. Is there a way to take an object and pass it to another script? either using GET or POST or SESSION or whatever. If there isn't how would i assign an object some variables on one page, then assign the same object more variables on another page?
Thanks
...
Hay, when should variables be set within a PHP class?
<?php
class MyClass {
var $my_var; // here? like var $my_var = null;
function __construct(){
$this->my_var = null; // or here?
}
}
?>
...
How do i write a code that builds a mysql query depending on what values drop lists have?
If nothing is chosen in a drop list, then the drop list value is 001 so then the query should not include this drop list in the search!
Please help...
I have this so far:
foreach($_GET as $key => $value) {
if ($value != '001') {
...
A->b->c might exist but c might not exist. How do i check it?
...
Hay All, I've converting a lot of my code to the short hand IF statement to cut down loading time/code.
Most of these have been IF statements with ELSE's. However i can see to get it to work on just plain IF statements
($this->left_eye_sph >= 0) ? $this->transpose_left_eye()
Any suggestions?
...
I'm developing a form validation class in PHP. When form validation fails, I can easily redirect again to the form's html page but without error information. I would like to redirect to the form's page with the specific errors about which fields failed and why.
How should I do this? Should I send information back via GET or POST? and in...
Below code works fine:
<?php session_start();
$_SESSION['color'] = 'blue';
class utilities
{
public static $color;
function display()
{
echo utilities::$color = $_SESSION['color'];
}
}
utilities::display(); ?>
This is what I want but doesn't work:
<?php ses...
I upgraded php-common and php-devel packages on CentOS 5.3 system. Now, when I try to access any PHP script in a browser I get garbage like this:
If I try to CURL GET the page, or try plain HTML, CSS or JS in the browser everything looks OK.
Encoding is set to UTF-8 in both PHP itself and the PHP output via "Content-Type: text/html; ...
I have a social networking site which is beginning to gain some momentum and has an expanding user-base. We currently allow the users to import their blog, flickr and twitter feeds. We use the php library simplepie to read the feeds and then we check the DB to make sure we do not have a duplicate entry for each found feed item. If the fe...