Home News Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Any php coders out there?


You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion

Any php coders out there?
Reply
 
Thread Tools
Old 24-11-2009, 13:51   #16
Hiroki
- Israel's Son -
 
Join Date: Feb 2008
Location: Newcastle
Services: SkyHD, Freesat & Virgin Media TV/BB
Posts: 1,318
Hiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful one
Send a message via MSN to Hiroki
Re: Any php coders out there?

Quote:
Originally Posted by Strzelecki View Post
Yes that can be done using the built in FTP functions PHP has. However you would be much better using the HTTP Post method but this may restricted as to the size of files you can upload. Depending on what level of access to the server you have this may be adjustable.
There are also free Java file uplad applets out there that can display the local and remote folder tree and upload over FTP or HTTP POST. These can be embedded into a HTML page.
I think I have tried the HTTP Post method before and had a problem with the 2mb file size limit and without any knowledge of how to modify the php.ini I couldn't go any further.

Is there any free Java file upload applets you would recommend?

Thanks for the help btw it's much appreciated
Hiroki is offline   Reply With Quote
Old 24-11-2009, 17:18   #17
handyman
bah
 
handyman's Avatar
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 36
Services: M6 Keele
Posts: 5,455
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: Any php coders out there?

Quote:
Originally Posted by Mr Angry View Post
Sex on a stick.

I'll have a blast at these later today.
Might be a bit late to the party but I use this to create very quick editable bits on websites.

http://www.turningturnip.co.uk/free-...php-generator/

If anything just generating the code to create the Mysql table with it is a time saver in itself.
handyman is offline   Reply With Quote
Old 25-11-2009, 17:02   #18
handyman
bah
 
handyman's Avatar
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 36
Services: M6 Keele
Posts: 5,455
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: Any php coders out there?

Speaking of php coding (and specifically using it with Mysql).

I have a query that selects all courses that are in 'London'.

However we have more than one location in London so this field has been changed to 'London EC2M 7' or 'London EC3A' etc.

What do I need to change this to to make it pick all variations that start London?

AND (`location`='London')

Ta
HM
handyman is offline   Reply With Quote
Old 25-11-2009, 17:09   #19
Damien
Cable Forum Team
 
Damien's Avatar
 
Join Date: Mar 2004
Age: 25
Posts: 16,129
Damien has a pair of shiny starsDamien has a pair of shiny starsDamien has a pair of shiny starsDamien has a pair of shiny starsDamien has a pair of shiny stars
Damien has a pair of shiny starsDamien has a pair of shiny stars
Re: Any php coders out there?

Quote:
Originally Posted by handyman View Post
Speaking of php coding (and specifically using it with Mysql).

I have a query that selects all courses that are in 'London'.

However we have more than one location in London so this field has been changed to 'London EC2M 7' or 'London EC3A' etc.

What do I need to change this to to make it pick all variations that start London?

AND (`location`='London')

Ta
HM
Should be

WHERE Location LIKE 'London%'
Damien is online now   Reply With Quote
Old 25-11-2009, 17:20   #20
handyman
bah
 
handyman's Avatar
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 36
Services: M6 Keele
Posts: 5,455
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: Any php coders out there?

Quote:
Originally Posted by Damien View Post
Should be

WHERE Location LIKE 'London%'
Many thanks, all changed and works like a charm.
handyman is offline   Reply With Quote
Old 25-11-2009, 18:21   #21
Damien
Cable Forum Team
 
Damien's Avatar
 
Join Date: Mar 2004
Age: 25
Posts: 16,129
Damien has a pair of shiny starsDamien has a pair of shiny starsDamien has a pair of shiny starsDamien has a pair of shiny starsDamien has a pair of shiny stars
Damien has a pair of shiny starsDamien has a pair of shiny stars
Re: Any php coders out there?

No Problem. Be careful with those kind of queries as, well at least with MS SQL Server, they impact upon performance.
Damien is online now   Reply With Quote
Old 02-12-2009, 20:28   #22
Hiroki
- Israel's Son -
 
Join Date: Feb 2008
Location: Newcastle
Services: SkyHD, Freesat & Virgin Media TV/BB
Posts: 1,318
Hiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful one
Send a message via MSN to Hiroki
Re: Any php coders out there?

You know I have been trying for days to make an ftp upload page using php with no luck (i'm in way over my head) so I was wondering if anyone had any idea how I could do this.

I've managed to make a simple image upload page which is a start I suppose
Hiroki is offline   Reply With Quote
Old 02-12-2009, 21:54   #23
Mr Angry
Angry is as angry does..
 
Mr Angry's Avatar
 
Join Date: Jan 2006
Location: Belfast
Posts: 3,874
Mr Angry has a pair of shiny starsMr Angry has a pair of shiny starsMr Angry has a pair of shiny stars
Mr Angry has a pair of shiny starsMr Angry has a pair of shiny starsMr Angry has a pair of shiny starsMr Angry has a pair of shiny starsMr Angry has a pair of shiny starsMr Angry has a pair of shiny starsMr Angry has a pair of shiny starsMr Angry has a pair of shiny starsMr Angry has a pair of shiny starsMr Angry has a pair of shiny stars
Re: Any php coders out there?

I think I have a php upload script which will handle practically anything you throw at it - interested?
__________________

"Exercising the right to exorcise the right".

Mr Angry is offline   Reply With Quote
Old 02-12-2009, 22:22   #24
Hiroki
- Israel's Son -
 
Join Date: Feb 2008
Location: Newcastle
Services: SkyHD, Freesat & Virgin Media TV/BB
Posts: 1,318
Hiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful oneHiroki is the helpful one
Send a message via MSN to Hiroki
Re: Any php coders out there?

Yeah please really interested
Hiroki is offline   Reply With Quote
Old 03-12-2009, 11:15   #25
handyman
bah
 
handyman's Avatar
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 36
Services: M6 Keele
Posts: 5,455
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: Any php coders out there?

Quote:
Originally Posted by Mr Angry View Post
I think I have a php upload script which will handle practically anything you throw at it - interested?
Very interested as well in that as well. I'll PM you.

I'm stuck with something that you nice helpful people at Cf may be able to assist with.

I have a database of training courses.

I have a date variable
$date = mysql_result($result,$i,"date");

I have length in days:
$length = mysql_result($result,$i,"length");

I can format date so its in the right order:
$date = date("d/m/y",strtotime($date));

What I cannot seem to work out is to get the end date of the course.

I have tried lots of ways but non seem to work it right.
handyman is offline   Reply With Quote
Old 03-12-2009, 12:07   #26
punky
Gone
Alpha Bravo Charlie Champion
 
Join Date: Jun 2003
Age: 30
Posts: 14,760
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: Any php coders out there?

Quote:
Originally Posted by handyman View Post
Very interested as well in that as well. I'll PM you.

I'm stuck with something that you nice helpful people at Cf may be able to assist with.

I have a database of training courses.

I have a date variable
$date = mysql_result($result,$i,"date");

I have length in days:
$length = mysql_result($result,$i,"length");

I can format date so its in the right order:
$date = date("d/m/y",strtotime($date));

What I cannot seem to work out is to get the end date of the course.

I have tried lots of ways but non seem to work it right.
Like this:

PHP Code:
$date mysql_result($result,$i,"date");

$length mysql_result($result,$i,"length");

$enddate date("d/m/y"strtotime($date " + $length days")); 
punky is offline   Reply With Quote
Old 03-12-2009, 12:20   #27
handyman
bah
 
handyman's Avatar
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 36
Services: M6 Keele
Posts: 5,455
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: Any php coders out there?

Success although I think I might have spotted my problem as I had tried that one but it did not work. I realized I needed to run it before I changed the date format.

Here's an extension of that for you since it now works but is still wrong.

Courses are x days long so the start date of 7/12/09 and a 3 day course with the above gives a finish date of 10/12/09. However a 3 day course starting on 7/12/09 finishes on 9/12/09.

I could simply remove 1 day from length and that would be fine except for a 1 day course lol.

I think I may be able to work round this but may be back here in ten with another question :-)

OMG it works !!
PHP Code:
if ($length <= 1) {
$enddate date("d/m/y",strtotime($date));
}
else {
$correctlength $length 1;
$enddate date("d/m/y"strtotime($date " + $correctlength days")); 


Last edited by handyman; 03-12-2009 at 12:40.
handyman is offline   Reply With Quote
Old 04-12-2009, 17:42   #28
Keyz333
cf.addict
 
Keyz333's Avatar
 
Join Date: Oct 2007
Location: Yateley, Hampshire
Age: 21
Services: Virgin TV & Broadband
Posts: 261
Keyz333 will become famous soon enoughKeyz333 will become famous soon enoughKeyz333 will become famous soon enough
Send a message via AIM to Keyz333 Send a message via MSN to Keyz333 Send a message via Skype™ to Keyz333
Re: Any php coders out there?

List of a couple of Uploaders - http://www.uploadscript.com/

Or you can try and make your own with a tutorial - http://www.w3schools.com/PHP/php_file_upload.asp

Keyz333 is offline   Reply With Quote
Old 08-12-2009, 12:51   #29
handyman
bah
 
handyman's Avatar
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 36
Services: M6 Keele
Posts: 5,455
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: Any php coders out there?

I'm developing a website at the moment which is an online broker site. Front end templates all looking good and I have done a trial of part of the back end.

For the trial I have 4 tables and have ended up with 35 php files/pages to manage them.
With each table there is a add/added/update/updated/delete/deleted and index (extra pages are a multi page form to add the actual transaction).

Is this the right way to be approaching this? I will have many many more tables in the end and it seems like I'm just going to end up with an exponential amount of files to manage.
handyman is offline   Reply With Quote
Old 08-12-2009, 13:04   #30
Damien
Cable Forum Team
 
Damien's Avatar
 
Join Date: Mar 2004
Age: 25
Posts: 16,129
Damien has a pair of shiny starsDamien has a pair of shiny starsDamien has a pair of shiny starsDamien has a pair of shiny starsDamien has a pair of shiny stars
Damien has a pair of shiny starsDamien has a pair of shiny stars
Re: Any php coders out there?

Quote:
Originally Posted by handyman View Post
I'm developing a website at the moment which is an online broker site. Front end templates all looking good and I have done a trial of part of the back end.

For the trial I have 4 tables and have ended up with 35 php files/pages to manage them.
With each table there is a add/added/update/updated/delete/deleted and index (extra pages are a multi page form to add the actual transaction).

Is this the right way to be approaching this? I will have many many more tables in the end and it seems like I'm just going to end up with an exponential amount of files to manage.
This really does depend on what the responsibilities of those files are. Could you give us an idea? It's a good idea to have multiple classes, in this case files I guess, but you need to make sure each file has a clear purpose and responsibility. One file to handle customers, another to handle products and so on.

If your performing the same type of operations, say customers, then only have one file for which handles adding, deleting, and so on.
Damien is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Google Search




All times are GMT +1. The time now is 17:39.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Copyright © 2003 - 2012, Cable Forum.
(server1.cableforum.co.uk)

SEO by vBSEO 3.3.2