PHP!
Displaying 1-9 of 9 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Omni

It half way occurred to me that learning PHP might enable me to create a simple but easier to maintain and organize site.

As I am lazy/studying for exams, I figured I'd just post the idea here. Does anyone have a favorite PHP resource? I'm fairly certain there's some http://www.php.org or such main site (similar to http://www.python.org for Python users).

If I wanted to use PHP to create pages with dynamic content, what do I need to use to ...um, store the content? I think people have mentioned SQL before. Any favorite links I could check to find out about that?

Posted on 2005-05-04 18:20:55

ThinIce

official site

PHP.NET (the official site) is almost everything anyone needs, it has a CRAPLOAD of examples as well as examples in user comments, everything is covered extremely thoroughly.

resource

Posted on 2005-05-04 18:41:29

Omni

Thanks. I'll take a look at those soon.

Posted on 2005-05-04 21:28:11

Overkill

apache.org. For your localhost server, which enables you to run PHP at home.

php.net. For PHP, obviously. The documentation kicks serious butt, and you can find things in the manual simply by adding the name of the thing you want to find to the end of the php.net (example: http://www.php.net/explode). Some things you'll be using a lot are the $_GET[], $_POST[] and $_REQUEST[] superglobals, mysql_query(), mysql_fetch_row(). Something I bet you'll love about PHP once you get into it is the string handling, array handling, the interesting GD image library wrappers, and the simple-to-declare-and-use variables.

mySQL.com. MySQL is the thing you'll want to use to get databases for PHP. It's recommended you check somewhere else like w3schools or something when you're first learning about queries, since MySQL's documentation tended to go a little far in my opinion when I started :/. Of particular interest, you'll want to learn about and SELECT, INSERT, DELETE, UPDATE, AUTO_INCREMENT, PRIMARY_KEY, LAST_INSERT_ID, and NOW().

phpMyAdmin.net. phpMyAdmin is a very nice MySQL database managing thing in php. Most webhosts put a phpMyAdmin folder up to access the database of your online site. Use phpMyAdmin to make tables and databases (when you have database-making privileges), and even export data, tables and databases (which I wish I knew earlier, because I didn't want to spend all that time, manually updating the online database after changing my localhost ;__;)

If you're making a site with dynamic content, you might also want to use Cascading Style Sheets to make page generation simpler. Read up <form>s and <input>s too!

Posted on 2005-05-05 06:54:59

Omni

Will I need CSS just for updating tables of information, like newsposts and project info? I originally thought CSS was just an appearance thing, and all I really need is a way to create a more easily maintainable site.

Let's say my webhost (thanks to Blue Zodiakos) already has MySQL installed for his site. What kind of configuration (if he's willing) would I have to do to be able to use it for my own database stuff as well (if this even possible)? Or is that question better answered by the documentation?

Posted on 2005-05-05 10:28:15

Overkill

Omni: Yes, CSS entirely appearance, but come on, conform to the W3C standards. It's much better to have the following in a stylesheet and set a tag's class, ...

<style>
.newstitlecell
{
border: 1px solid #111111;
background-color: #0055CC;
color: #FFFFFF;
font-family: Courier New;
font-size: smaller;
}
</style>

<?php

echo '<table>
<tr>
<td class='newstitlecell'>
Hay, new post guys!!!
</td>
</tr>
</table>';

?>

... if you set a table cell a certain way for a news table many times for instance. You probably shouldn't use <table>s either, but whatever.

And, to get a database set up for you, just ask Blue Zodiakos to create a new database for you using the host's phpmyadmin. Then you also gotta ask him what the MySQL login is, which is used by your code when you mysql_connect() to access your database.

Posted on 2005-05-05 14:51:37 (last edited on 2005-05-05 14:55:07)

Omni

Hey, that's pretty useful. Thanks.

Posted on 2005-05-05 17:30:43

RageCage

using apache to install a testing enviroment for php can be a serious bitch. Use XAMPP -

XAMPP does all the bullshit for you including installing apache, mysql and php as well as other things I don't personally use.

Also, if you ever need some quick help, you can IM me on AIM. s/n - actionsketch

Posted on 2005-05-07 09:28:58 (last edited on 2005-05-07 09:32:02)

Omni

I'll keep that link in mind. Right now I probably won't attempt much until I'm out of school, though...

Posted on 2005-05-07 10:04:17


Displaying 1-9 of 9 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.