User Profile
Collapse
-
Now that's weird, I seem to have got it working now! No idea what I've done, but there seemed to be a problem somewhere around the rand() function. Thanks for your help guys! :) -
Hi pbmods,
Neither of those work I'm afraid, if I replace $photoid with an arbitary number, say '4', in my original code it works fine, it's just when I replace it with the random string that I get the problem.
Cheers...Leave a comment:
-
OK, here's what I get:
Warning: rand() expects parameter 2 to be long, object given in /home/default/lichfielddc.gov .uk/user/htdocs/flickr.php on line 30
Fatal error: Call to a member function attributes() on a non-object in /home/default/lichfielddc.gov .uk/user/htdocs/flickr.php on line 17
Any ideas?
Cheers...Leave a comment:
-
simple_xml - Call to a member function on a non object
Hi,
I'm having a few problems using the simple_xml and the Flickr API. I'm trying to get a random image from a group pool and print out the results. It works fine when I enter a photo id manually, but when I try and generate a random number I get the above error. Here's my code:
[PHP]
function findAttribute($ object, $attribute) {
foreach($object->attributes() as $a => $b) {
if ($a ==... -
That's perfect thanks. I used relative positioning to pull the right column 10 pixels to the right and it looks great in all browsers. Thanks a lot! :)Leave a comment:
-
IE6 z-index problems
Hi,
I'm getting ready to launch a new design for a site I've been working on. The homepage has three columns and I wanted to change the reading order so the middle column came first. I've done a bit of trickery with padding and positioning and all works fine in proper browsers, unfortunately in IE6 the left column is invisible:
http://www.ratemyplace.org.uk/newsite/index.php
I've tried to rectify this... -
Struggling to find an RPM for my version of PHP (Fedora)
Hi,
I'm not too comfortable working on the command line in Fedora, but I'm trying to run a script that requires me to have php-xml and php-xmlrpc. I'm running php version 5.1.6, but the only rpms I can find are for php 5.1.6-3 and installing them obviously throws up a missing dependency error. I've tried upgrading php via yum, and that doesn't seem to work either. Any ideas? I'm tearing my hair out here!!
Cheers -
The usePointFromPos tcode function should then pass the point to the returnCoords function, which then returns the coordinates (in theory anyway!)Leave a comment:
-
Function results not being returned
Hi,
I'm having a bit of trouble using Google Maps and the Google Ajax Search API, I'm trying to take a postcode, geocode it and then calculate the distance between the that postcode and a second geocoded postcode. If the point is less than 5 miles away, I then put a point on the map. My code is here:
Code:function createMarker(point,html) { // FF 1.5 fix html = '<div style="white-space:nowrap;">'
-
Problem uploading files
Hi,
It seems that every time I put together a new script to upload a file I always have problems, here's the latest one:
I've got a form with two file input fields, when I submit the form, everything goes OK, but the files don't upload, the permissions on the folders are fine and dandy (Both 777). Here's my code:
[PHP]if(is_uploaded_ file($_FILES['image']['tmp_name'])){
$target_path = "/home/default/ratemyplace.org .uk/user/htdocs/newsite/images/premimages/";... -
Yeah, I'd rather do it server side if at all possible, otherwise I'm duplicating work. Any ideas?Leave a comment:
-
Reload page asynchronously using Prototype
Hi,
I'm currently putting together a stylesheet switcher for a project I'm working on, it's a server side solution at the moment, and I'd like to AJAX it up and avoid page reloads. I'm using Prototype's Ajax.Request method like so:
Code:function resizetext(size) { new Ajax.Request('resize.php', {method: 'get', parameters: {style: size} }); }
-
Safely querying a MySQL database record that has quotes in it
Hi,
I'm trying (and failing) to find a safe method that returns records from a database if they have quotes in them, for example, if I generate a query like this:
SELECT * FROM foo WHERE bar LIKE 'here's pezholio's record with quotes'
Obviously it will be unsafe as I haven't escaped the quotes. I've tried storing the records with slashes already in them and then searching ie:
SELECT * FROM... -
He he! Yeah, I'm quick, I'll give myself that! Your original suggestion works pretty well - think I'm going to adapt that. I've tried the white-space property before, all I get is one long line of content.
Thanks both of you for your help :)Leave a comment:
-
Inline list items taking up two lines
Hi,
I've got an inline list with a label and checkbox in each list item, each item comes from a MySQL database and, chances are that, in future, the list will become longer.
My problem is that in IE6 and 7 one list item is split over 2 lines (i.e. the label is on one line and the checkbox is on the next line), so it looks kinda ugly, not to mention causing usability issues for less experienced users.
... -
Joined query ignoring the second part of my query
Hi,
I've got two tables, one called events, which has an id field (eventid), a name field (eventname), a start date (datefrom) and an end date (date to), and another called events_to_group type, which has an event id and a group type id, which refers to another table which stores the names of various different types of events.
What I want to do is select all the events that have a particular group type id and are current... -
I'd avoid anything like that to be honest, the last thing a user would be expecting when they click a radio button is to be taken to a different page.Leave a comment:
-
Yeah, got it working great. The ID was specified elsewhere in the script, but I think Rand's solution is neater :)
Thanks for all your help guys!Leave a comment:
-
Ah, thanks! :) I think it's the journalist in me trying to create clever titles! Your solution worked like a charm by the way. Any ideas why my original code didn't work?
Cheers...Leave a comment:
-
Nah, I meant 'table', but you get the idea :)
The usage of array_diff is right I think, if I print_r it I get:
Code:Array ( [10] => 11 [11] => 12 [12] => 13 [13] => 14 [14] => 15 )
Leave a comment:
No activity results to display
Show More
Leave a comment: