Search found 14 matches

by speckytwat
Mon Dec 04, 2017 8:33 am
Forum: PHP coding => General
Topic: Issue with notifications when data added to table
Replies: 2
Views: 56

Re: Issue with notifications when data added to table

Thanks for all the info, I'll make a note :)
by speckytwat
Wed Nov 29, 2017 4:44 am
Forum: PHP coding => General
Topic: Issue with notifications when data added to table
Replies: 2
Views: 56

Issue with notifications when data added to table

Having an odd issue with an internal messaging system which sends a message to a member messages table (it also sends a message to the sender, so they're basically cc'd and have a copy). The messages themselves are simply copied to a mySQL table rather than sent out, users have to log in to see them...
by speckytwat
Wed Nov 29, 2017 1:49 am
Forum: PHP coding => General
Topic: Sorting data by smallest distance first from Distance Matrix service
Replies: 5
Views: 62

Re: Sorting data by smallest distance first from Distance Matrix service

Ok, I've no idea how I would even start with that- I think I'll have to give up on this whole problem. The frustrating thing is that someone out there must have some code that does exactly what I need it to as I've seen websites that do this.
by speckytwat
Tue Nov 28, 2017 6:09 am
Forum: PHP coding => General
Topic: Sorting data by smallest distance first from Distance Matrix service
Replies: 5
Views: 62

Re: Sorting data by smallest distance first from Distance Matrix service

Ok, that sounds even more complicated then. So I store the distance for every record as a separate field, so I need... what, lots of UPDATE statements for each member postcode i.e each distance calculation? And then I fetch the data from that field and sort by it?
by speckytwat
Tue Nov 28, 2017 3:59 am
Forum: PHP coding => General
Topic: Sorting data by smallest distance first from Distance Matrix service
Replies: 5
Views: 62

Sorting data by smallest distance first from Distance Matrix service

Hi, I'm using Google's distance matrix service to calculate the distance between a user-submitted postcode and the postcodes of members in a mySQL database. Which works fine except for one thing, it shows the members in a random order, I need them to be displayed in order of closest (smallest distan...
by speckytwat
Mon Nov 13, 2017 10:30 am
Forum: PHP coding => General
Topic: Postcode search based on distance
Replies: 3
Views: 101

Re: Postcode search based on distance

Ok, but presumably I need to input all the possible postcodes into the database somehow? I've never heard of "location geography" in mySQL, does that specify the type of postcode? Still don't see how I can get it working with PHP though, if the user has to input a postcode in their search, where doe...
by speckytwat
Mon Nov 13, 2017 10:25 am
Forum: PHP coding => General
Topic: Second digit in integer array being stripped
Replies: 2
Views: 59

Re: Second digit in integer array being stripped

Ok, I'll try revising it. Thanks.
by speckytwat
Fri Nov 10, 2017 12:26 am
Forum: PHP coding => General
Topic: Second digit in integer array being stripped
Replies: 2
Views: 59

Second digit in integer array being stripped

I have a section of script that grabs the ID of a member from a ticked checkbox, and inserts those values into a messages database table in mySQL. The weird thing is that the ID ($recipientid in the script below) has one of his digits stripped, for example I tested with IDs 17 and 23 and it inputted...
by speckytwat
Tue Nov 07, 2017 7:12 am
Forum: PHP coding => General
Topic: Postcode search based on distance
Replies: 3
Views: 101

Postcode search based on distance

Hi, I'm trying to find a way to allow users to search based on UK Postcode and have results pulled from a database of members all of whom have a postcode associated with them (i.e their location). For example the user types in W1 1AA and the query pulls in members in order of how far away they are f...
by speckytwat
Wed Oct 11, 2017 12:57 pm
Forum: PHP coding => General
Topic: Issue with adding checkbox values to mySQLdb
Replies: 1
Views: 132

Issue with adding checkbox values to mySQLdb

Hi, I'm trying to insert multiple records into a mySQL table for a basic intgernal messaging system. I've got it working except for some checkboxes which I use to select the users that the sender wants to send their message to. Basically each checkbox corresponds to the unique ID of the user (recipi...
by speckytwat
Fri Oct 06, 2017 8:23 am
Forum: PHP coding => General
Topic: Issue with protecting files from download
Replies: 3
Views: 186

Re: Issue with protecting files from download

Thanks, I tried using that but what happened was that it outputted lots of strange characters over the screen e.g diamonds with question marks inside them etc... How would I use that code inside what I already have though? i.e how would I integrate it with the file display in the user's download pag...
by speckytwat
Fri Oct 06, 2017 7:12 am
Forum: PHP coding => General
Topic: Issue with protecting files from download
Replies: 3
Views: 186

Issue with protecting files from download

I have a problem with a folder in a site, where I have a simple PHP login system and a landing page where a user can download their personal file (a PDF) via a download link. I want to stop people from being able to browse directly to the PDF via web browser without logging in. It seems that this is...
by speckytwat
Mon Sep 11, 2017 8:36 am
Forum: PHP coding => General
Topic: Functions not working... probably simple reason?
Replies: 3
Views: 202

Re: Functions not working... probably simple reason?

Thanks, I did include my database connection script in the functions.php, do I need to do something else?
by speckytwat
Mon Sep 11, 2017 7:22 am
Forum: PHP coding => General
Topic: Functions not working... probably simple reason?
Replies: 3
Views: 202

Functions not working... probably simple reason?

Hi, I've been trying to set up functions to tidy up code in a project and avoid repetition for some things. One of those things is a simple database query that just fetches a list of company names. It works fine when put inside a SELECT in a form, as follows: <label for="_Exhibitor1">Exhibitor 1</la...