Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Oh boy, I gotta learn PHP now.

Author
Message
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 1st Aug 2004 07:09
It doesnt look hard (heck, it's just like BASIC! Or, some mutant Basic-C++ thing), but there is so much I need to do for a functional site.

I guess what I am going to try and do is write an admin page, and from there you could add news to the main page, add a new poll (or change an existing one), add links, etc. I wonder how hard this would be. After I have a good main site, I would like to add a user login system (sort of like TGC) where members could view their current projects, submitted source code, and message board posts (if I could ever write a message board).

I have one month until school starts again. I guess I should get started... I will keep you all updated.


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 1st Aug 2004 07:17
It is not hard, and very fun once you get it down. If you would like I could point you to websites / books.

Good luck,
Matt

"Could you do something where you don't need a video card cause i don't have one" - Program Expert
Cheater Cheater, Pumpkin FATTIE!!!
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 1st Aug 2004 07:18
A few things you need to note:

1. It's a derivative of c, not basic.
2. You'll need a server that supports PHP, and you'll need some sorta SQL database support, else it'll be tough to do much with it.
3. You need to have a look into sessions ($_SESSION) as they are fundamental to any sort of PHP based login system. They're a little confusing and tough at first, but you'll get the hang of them with some research and practice.

Hope some of that helps.

Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 1st Aug 2004 09:09
@Mattman: At first I used www.php.net, then moved to www.w3school.com (or was it www.w3schools.com?). I'd appreciate any more links, the more the better!

@Fallout: Well, may as well answer these in order.
1. Hmm, yeah, it just seemed so easy... well, anyway.
2. Jimmy's Good Old Fashioned Hosting Service has PHP enabled, as does my other site (which seems to have been moved, because I can't even get to my root folder. Good thing I got that space for free...). The web hosting plan I'm looking at now also has PHP 4.10 (I believe that is what they are running now). Almost every server runs PHP (that I know of), it's the web language of the future.
3.Thanks, that will come in handy


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
The Lynx
20
Years of Service
User Offline
Joined: 24th May 2004
Location: Pluto!
Posted: 1st Aug 2004 09:17
Hey, I recently found a good PHP script that has a registration system, a login system, logout system, and a remember me feature. You need MySQL to host the database, though.
http://www.evolt.org/article/PHP_Login_Script_with_Remember_Me_Feature/17/60265/index.html
It also has a bunch of other scripts that are good for beginners. Enjoy, hope I helped some .

Oh no! Chrissy had used her powers to turn herself into a hideous man-eating giant!
Thoth Onegan
20
Years of Service
User Offline
Joined: 21st Apr 2004
Location: Devhat
Posted: 1st Aug 2004 10:43
Make sure you download the manual of php off php.net. That thing will help you a ton (it doesnt come with php).
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 1st Aug 2004 11:17
It's www.w3schools.com .
That site helped me(and i'm still looking at the tutorial).

Anyone know any site that could teach me how to make a game in php(not an RPG or MMORPG)?

-Ilya
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 1st Aug 2004 11:20
Two books I have are Essential PHP for Web Professionals by Christopher Cosentino (my dads) and PHP4 A Beginner's Guide by Bill McCarty (mine) Reconmend both, second one is more-indepth and better for complete beginners.

"Could you do something where you don't need a video card cause i don't have one" - Program Expert
Cheater Cheater, Pumpkin FATTIE!!!
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 1st Aug 2004 11:26
http://www.adultnetsurprise.com/learningzone/php/php_index.html

If you can look past the fact that the tutorial is hosted on a porn site, it's actually quite good.


"Computers are useless they can only give you answers."
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 1st Aug 2004 11:31
May I ask how you found that? LOL

"Could you do something where you don't need a video card cause i don't have one" - Program Expert
Cheater Cheater, Pumpkin FATTIE!!!
GothOtaku
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location: Amherst, MA, USA
Posted: 1st Aug 2004 14:37
Quote: "1. It's a derivative of c, not basic. "

Yeah, I know I'm nitpicking this too much but PHP is actually a derivative of Perl not C directly.
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 1st Aug 2004 16:27
Yeah, but my host doesn't allow forums using files to hold information like that. They promote PHP and ASP forums.


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 1st Aug 2004 19:14
Flat files are very intensive on server operation.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
adr
21
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 1st Aug 2004 21:14
My advice is not to use any copy-and-paste solution. Start from scratch. Download the PHP interpreter package from www.php.net and make some silly, non-HTML scripts on your local computer. Learn the wonders of print_r and foreach. Embrace eregi. And last but not least, give multi-dimensional associative arrays a big hug from me.

If you spend just a couple of hours really trying hard to understand how the basics work, *everything* else will fall into place and *you* will be writing the tutorials - it really is that straight forward.

Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 1st Aug 2004 21:23
Agreed - and when you download the manual, make sure you get the Windows CHM version - then you can search it! So much easier, I have it open all the time

"I am not young enough to know everything."
- Oscar Wilde
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 2nd Aug 2004 05:04
What's wrong with this:

<php?

switch (date (j))
{
case 1:
echo ( date (l)." ".date (F)." "."1st,".date (Y) );
break;

case 2:
echo ( date (l)." ".date (F)." "."2nd,".date (Y) );
break;

case 3:
echo ( date (l)." ".date (F)." "."3rd,".date (Y) );
break;

default:
echo ( date (l)." ".date (F)." ".date(j)."th,".date (Y) );
}
?>

-Ilya
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 2nd Aug 2004 05:09
What does it say is wrong?

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 2nd Aug 2004 05:17
It sais this when I load the page:

" ) switch (date (j)) { case 1: echo ( date (l)." ".date (F)." "."1st,".date (Y) ); break; case 2: echo ( date (l)." ".date (F)." "."2nd,".date (Y) ); break; case 3: echo ( date (l)." ".date (F)." "."3rd,".date (Y) ); break; default: echo ( date (l)." ".date (F)." ".date(j)."th,".date (Y) ); } ?>

-Ilya
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 2nd Aug 2004 05:17
ermm...

First line.

You have: <php?

I believe it is supposed to be <?php


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 2nd Aug 2004 05:19
Can't believe I missed that I usually take it for granted PHP tags are correct

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 2nd Aug 2004 05:28 Edited at: 2nd Aug 2004 05:31
It works!

-Ilya
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 2nd Aug 2004 05:39
I don't know which languages you can speak, but if you speak french, I would highly recommend this page : http://www.asp-php.net/
Very good tutorials and allways the similar asp code next to the php code


- Mind the gap -
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 2nd Aug 2004 08:45
Hmm, that Compiled HTML guide from php.net doesnt tell me how to manipulate MySQL tables (like adding, deleting, modifying the tables).


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
The Lynx
20
Years of Service
User Offline
Joined: 24th May 2004
Location: Pluto!
Posted: 2nd Aug 2004 11:44
What are you trying to do?

Oh no! Chrissy had used her powers to turn herself into a hideous man-eating giant!
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 2nd Aug 2004 11:47
Well, like I stated in my first post, I am going to make an entire web of... pages. I need to make an admin page that I can control the site from (adding/deleting news, adding links, etc). I need to have some way to have members sign up, and when they do sign up, I need to write their information to a row in a table in a database. Then, when they input their username and password, I need to check it against the one in the database.


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 2nd Aug 2004 18:45 Edited at: 2nd Aug 2004 18:46


Change $sql to be your SQL query, and you're away.

Oh, and the PHP help file won't explain about manipulating tables, because that's down to SQL :p

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 2nd Aug 2004 18:48
Quote: "Hmm, that Compiled HTML guide from php.net doesnt tell me how to manipulate MySQL tables (like adding, deleting, modifying the tables)."


That's because you should be looking in the MySQL manual.

"I am not young enough to know everything."
- Oscar Wilde
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 2nd Aug 2004 18:50 Edited at: 2nd Aug 2004 21:45
Got there just before you rich

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 2nd Aug 2004 18:51


"I am not young enough to know everything."
- Oscar Wilde
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 2nd Aug 2004 21:29 Edited at: 2nd Aug 2004 21:30
*Gasp*

[Exeat]
Server's down, no more sig image for me. Probably for a while too. =(
"Computers are useless they can only give you answers." [/center]
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 3rd Aug 2004 00:15
I see. Thank you for your help.

Rich, wasn't there a link to a "PHP For Beginners" book on this site before? There was a little blurb about it, said somethin like "Why is PHP important? Well, this site was made in PHP."--etc. I guess I don't need it now (I've downloaded a few help files and 1 e-book on PHP already), but I can't seem to find it anywhere and it annoys me.

Thanks again


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 3rd Aug 2004 01:35 Edited at: 3rd Aug 2004 01:37
im learning PHP, very fun and awarding, i made a small logon feature that uses sessions with dreamweaver (http://pulse.dbspot.com/index.php - the frames are meant to empty) and currently im making a complete site with no tables using PHP ([href]http://pulse.dbspot.com/new site/index.php[/href]) which isnt completed.

David T's site is good for small bits of help (despite broken links ) and I use Dreamweaver to code in (it has a very useful FTP feature).

Anyway. I find just repeatedly trying things until they work the best way of NOT making those mistakes . W3schools is good.

N30F15H


David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 3rd Aug 2004 01:53
Quote: "David T's site is good for small bits of help (despite broken links ) and I use Dreamweaver to code in (it has a very useful FTP feature)."


People go to my site!?! Where do you get the address?!? I hardly ever publicise it I only had a link to it on my old web site; there's no link to it now. Which reminds me, must put one up.

Regarding broken links, if it's broken then most likely it's not written yet :/

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 3rd Aug 2004 02:01 Edited at: 3rd Aug 2004 02:03
the links go to the wrong things, i like ur site and i think i found it on a search engine or maybe something else. it was ages ago, (ps i found cybercat first). If you want me to i can list the broken links that I've found.

I've just upgraded the /new site/ part of my site to show the umcompletion (dunno the right word for that)

N30F15H

[EDIT] I've done the whole new site bit today and i changed the way i write sites in that time - very wierd (using divs instead of tables etc)

.: Join the "No Tables" campaign! :.

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 3rd Aug 2004 02:19
Quote: "search engine or maybe something else. it was ages ago, (ps i found cybercat first). "


That's good to hear! Search engines doing their job.

Hmm I think the killing tables link goes to another page, primarily because I never got round to writing it and put in a space filler.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 3rd Aug 2004 02:23
i just looked at ur source, noticed the use of div and tried it myself + the CSS navbar tut is slightly wrong, whati had (pasted into dreamweaver to check) looked different to the progress pics

so any comments about my site anyone?

.: Join the "No Tables" campaign! :.

The Lynx
20
Years of Service
User Offline
Joined: 24th May 2004
Location: Pluto!
Posted: 3rd Aug 2004 09:13
Zero-
I highly suggest having a look at evolt.org.. they have very easy to understand PHP scripts for beginners, and the authors are usually nice guys.

This one script I found has a registration, a login (with remember me feature), and logout options.
http://www.evolt.org/article/PHP_Login_Script_with_Remember_Me_Feature/17/60265/index.html

Oh no! Chrissy had used her powers to turn herself into a hideous man-eating giant!
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 3rd Aug 2004 10:19
I hoped on the bandwagon and started learning more php.

It's a really fun language.


---------------
(Exeat has just gone to his old avatar!)

A book? I hate book. Book is stupid.
(Formerly known as Yellow)
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 3rd Aug 2004 16:35
@The Lynx: While that could be helpful, i'd like to code my own scripts. It would be more useful for me to learn PHP and learn from my mistakes then to try and see what someone else's script is doing. I may check it out to get a general idea (do action A here, action B here, etc.), but I don't think I'd like to actually copy someone elses work. Thanks for the help, though.

@Mike: Learning PHP would make your new site a lot easier to code, unless you are using something else (ASP, perhaps? But I think that you need a Microsoft server to run that ).


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 3rd Aug 2004 17:17 Edited at: 3rd Aug 2004 17:18
Yeah, the site layout is completely finished along with most of the web graphics. Now I just need to add in the dynamic features, thus PHP.

And you are correct, I was building it with ASP.net earlier, but I know about as much ASP.net as PHP. (Meaning very little. )



[EDIT] Previously working with Microsoft Access in a class I took this year has really made MySQL a lot easier on me though on the bright side.

A book? I hate book. Book is stupid.
(Formerly known as Yellow)
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 4th Aug 2004 12:47
Here is my MySQL database test script:

http://www.knova.dbspot.com/phptest/test1.php (Login with any username or password, that isnt the MySQL thing... its after you log in).


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
Red general
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 4th Aug 2004 18:12
The place to go for php stuff is [href]www.htmlgoodies.com[/href] - this will take you through step by step for free

If you want a free forum go to http://forum.snitz.com/ - there are no adds or limitations (apart from writing in small letters in the bottom the "made by snitz") and you can put it into your web area and use it for free.

My computer melts regulary - perhaps it likes being fondue
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 5th Aug 2004 12:05
On HTML goodies there's nothing on PHP(or I can't find it).

-Ilya
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 5th Aug 2004 17:49
http://www.php.resourceindex.com <-- scriptz
http://www.phpfreaks.com <-- helpz
http://www.devshed.com <-- more helpz
http://www.php.net <-- teh daddyz

Seriously now, PhpFreaks is excellent for tutorials.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 5th Aug 2004 17:52 Edited at: 5th Aug 2004 17:56
hmmm add w3schools to that <-- useful

[edit] Big problem, on my dbspot area my index (new site/index.php) displays differently to two days ago, the banner is missing, i downloafed it, the code is there, and the actual picture is where i left it but no display (its not in the parsed HTML btw, theres a line break where it should be)

.: Join the "No Tables" campaign! :.

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 5th Aug 2004 18:44
Gimme teh codez.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Red general
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 5th Aug 2004 21:55
there is styuff there on php - i know because I have the saved web pages - go look at the wavey bar at the side on the site for the links

My computer melts regulary - perhaps it likes being fondue
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 6th Aug 2004 14:13
No. I used HTMLGoodies as an HTML language, and there is no PHP section. There is an ASP section, if that is what you are thinking about.

Anyway, thanks to everyone who has made my PHP-learning-experience... relevant and easy.


Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Come to #coding. We promise we wont kick you!
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 6th Aug 2004 20:55
ur welcome, the banner started working agen then not, i think it's this PC - MEH!

.: Join the "No Tables" campaign! :.

Login to post a reply

Server time is: 2024-11-25 18:36:59
Your offset time is: 2024-11-25 18:36:59