ToonMariner
Members-
Posts
3,342 -
Joined
-
Last visited
About ToonMariner
- Birthday 07/03/1976
Contact Methods
-
MSN
toonmariner@hotmail.com
-
Yahoo
toonmariner@yahoo.co.uk
Profile Information
-
Gender
Male
-
Location
Newcastle upon Tyne, UK
ToonMariner's Achievements
Advanced Member (4/5)
0
Reputation
-
definitely the array structure - you can access it without having to do any further processing...
-
Hi guys n gals, I'm no win server 2008 guru so need a bit of help... I have PHP running on win server 2008 (that's what I have been dealt so no sniggering!)... getting the 'unable to load dynamic library for: php_curl.dll php_http.dll php_imap.dll php_mbstring.dll php_mcrypt.dll php_exif.dll php_sockets.dll uploadprogress.dll php_zip.dll (they are loaded in that order) other dlls load ok and these are: php_gd2.dll php_mysql.dll php_mysqli.dll php_pdo.dll php_pdo_mysql.dll the extension dir in php.ini is set (done it absolutely "D:\PHP\ext") and those dlls all exist within that directory. D:\PHP is definitely in the environemt PATH var... Only thing I have come across is a reference to msrvc70.dll is not present on the server but surely this should not prevent the libs being loaded! there is no reference to such a requirement in the docs. (found that on a thread so it could be irrelevant.) Any help/tips on resolving this would be VERY much appreciated.
-
have a look at using define - constants are globally available, and much more efficient that variables. Set these as configuration settings in a global include or similar
-
replace your jquery with this: $(document).ready(function(){ $("form#submit").submit(function() { // we want to store the values from the form input box, then send via ajax below var mssg = $('#Messages').val(); $.ajax({ type: "POST", url: "ajax2.php", data: "Messages="+ mssg, success: function(){ $('form#submit').hide(function(){$('div.success').fadeIn();}); } }); return false; }); });
-
it wasn't a point it was a question - you are concatenating to variables (which will make them a string) and then trying to assign an object to them.. rather than going down the variable variable route I'd suggest an array... <?php require_once("../Person/Person.php"); $count = $_POST['count']; $people = array() while ($add++ < $count) { $people[] = new Person('laryy'); } ?> however as you pass larry to the constructor I don't think this is your intention.... Rather than guessing at what you are trying to achieve please tell us. posting code without any description of what it is meant to do is often pointless (unless your code is good enough to document itself).
-
probably because you have the path to image wrong. the image tage takes the url (relative or absolute) to the actual image file - so unless you are using a dynamic image creation script the src attribute should contain the path and file name of the image. /picture/h - clearly this is is missing the extension!
-
$str = preg_replace('/Where: ([^\n]*)/m','Where: <a href="http://maps.google.com?q=$1">$1</a>', $str ); that will leave spaces in the url. IF you need the + in there then: preg_match('/Where: ([^\n]*)/m', $str , $matches ); $term = str_replace(' ', '+', $matches[1]); $str = preg_replace('/Where: ([^\n]*)/m','Where: <a href="http://maps.google.com?q='.$term.'">$1</a>', $str );
-
Connecting session numbers with a database
ToonMariner replied to Seaholme's topic in PHP Coding Help
// Get all the data from the dogs table $result = mysql_query("SELECT * FROM dogs WHERE owner=".$_SESSION['id']) or die(mysql_error()); -
have a look at this http://www.maxmind.com/app/geolitecountry.
-
Why should you not use Global $variable; ?
ToonMariner replied to TeddyKiller's topic in PHP Coding Help
because it is easy to inadvertently change this value by giving a new variable the same name of the 'global' and most likely destroying the integrity of your application there after. If there are values you want to be globally available then perhaps look at using constants (define()) or creating a registry class so at the very least you can control the scope of what can amend the variable. -
No that is an effect controlled by the browser - more specifically it should be javascript driven.
-
that would be because $itemarrayview[0] is only one record...
-
then why didn't you say you wanted each element rather than just selecting a specified 'row'? you could use <?php $selectedRow = $array[2]; list($patientid, $forename, $surname], $dob) = $selectedRow; ?> [i don't like list() but thats just me... or <?php $selectedRow = $array[2]; foreach( $selectedRow as $key => $val) { $$key = $val; } ?> The latter will produce variables of whatever your array indexes are called (provided they are not numeric - in which case it will fail miserably) so is in that sense a bit more robust.