VGMaps
November 21, 2017, 10:36:36 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 [2]   Go Down
  Print  
Author Topic: Recent updating  (Read 6434 times)
0 Members and 1 Guest are viewing this topic.
JonLeung
Administrator
*****
Offline Offline

Posts: 3129


« Reply #15 on: May 14, 2008, 06:05:20 PM »

Ah, that's where this topic went.



Sorry for not saying much about that .php file since the last time I tried.



I haven't ever had a chance to properly learn HTML.  PHP seems like a whole 'nother world.  Maybe I'm just ignorant.



What program(s) would you recommend for PHPing?  I've gotten spoiled with FrontPage for "coding" HTML.  I think if I could be more familiar with PHP I'd be much less hesitant to use it.  I don't care that it's as natural as breathing for some of you, this might as well be Greek rocket science for me!



I've been busy the last little while.  Kinda ruined the "new daily thumbnails" streak.  Finally decided on a car.  I'll be getting a red 2008 Mazda3 Sport (sedan), fairly loaded.  My first car.  Pathetic to finally have it now, but hey.  I'll be picking that up Thursday next week once the rest of this paperwork crap is finished.  I suppose I have to look into insurance tonight.  *sigh*
Logged
Revned
Hero Member
*****
Offline Offline

Posts: 1091



« Reply #16 on: May 14, 2008, 07:08:01 PM »

*cough* The Greeks didn't have rockets *cough*



For plain old PHP, I think you can just type it in Notepad and upload it to your site. For MySQL, though, you need database software on both your web server and your computer.
Logged

Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #17 on: May 15, 2008, 01:46:41 AM »

PHP is just a scripting language so all you need is a text editor. Preferably one with syntax highlighting; I tend to use ConTEXT. That, and a web browser pointing to a tutorial and/or the PHP website.



You'll probably want to get a local webserver set up for testing. I use WampServer, which is Apache, PHP and MySQL for Windows. Then, with a little configuring, you can have a test version of the site on a local disk that you can view in a web browser, rather than having to upload to test changes. This is assuming the site's running on similar software, of course.



Synchronising your local disk copy with the site is another issue. I use rsync but it's quite hard to set up.



A word of warning: PHP code is easy to write, but hard to write well. 99% of what you find online, posted as "tutorials" or "tips", is in fact rubbish.



If you do ever decide to rewrite the site from static HTML to be DB-driven, a framework like Ruby on Rails (probably not supported by your host) or CakePHP (PHP clone) is probably a god start. But that's probably at least a few years off.
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #18 on: May 15, 2008, 02:25:26 PM »

When you are starting out, it's good practice to type out the example code instead of using copy/paste when using tutorials. Especially if you are learning a language like PHP which uses semicolons and curly braces.  You have to get used to typing things that way.



Also make sure you really understand what is going on when you do tutorials or look at sample code.  If the tutorial uses a function without explaining what it is, you need to look it up.  http://php.net/function_name is the easiest way to quickly lookup functions (or objects) for PHP.



Taking small steps is the best way to go.  If you learn too much too quickly you'll just end up forgetting it.
Logged
JonLeung
Administrator
*****
Offline Offline

Posts: 3129


« Reply #19 on: May 18, 2008, 05:11:48 PM »

Maybe for now I'll just keep using the HTML index.



I would like the random map thumbnails thing to be cleaner though.  DarkWolf, maybe what I need is just a PHP thing for those, just a single square, though, which I can make iframes for as many as I need.  That would be easier, I think, than a whole index.php, at least while my PHP knowledge is still non-existent.
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #20 on: May 19, 2008, 04:41:21 AM »

Iframes are nasty. Just rename index.html to index.php and it ough to still work. Then it's a matter of inserting <?php ?> around the code to insert the thumbnails, and presto: embedded dynamic content without iframes.
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #21 on: May 19, 2008, 01:26:08 PM »

Yeah that's essentially what I did.  AJAX is an option, instead of an IFRAME, to keep the server side code out of the HTML page.  But a bit tedious for just that one thing.



If you could still upload a version of the file named index2.php, I would like to take a look at why it isn't loading properly.
Logged
Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!