View Full Version : learning php {read}
Flisker
10-01-2009, 10:26 PM
Hey
I'm trying to learn php and I need some ideas on what to make so I can practice to get better.
Thanks
Playstation23
10-01-2009, 10:32 PM
Learn the basics first, then make things like a basic status system?
or maybe just a page of text using php.
Jackboy
10-01-2009, 10:35 PM
Learn the basics first, then make things like a basic status system?
or maybe just a page of text using php.
Lol page of text in php is just an echo. How will that benefit him. Basic status would not be good for begginers.
Start modifying scripts IMHO
Calon
10-01-2009, 10:39 PM
Tizag is your best friend.
Protege
10-01-2009, 10:39 PM
A basic script that searches google via file_get_contents and displays it.
Search tip when doing it 'php tutorials'
Sorry I had to do that, good place is tizag.com for php.
Calon
10-01-2009, 10:46 PM
A basic script that searches google via file_get_contents and displays it.
Search tip when doing it 'php tutorials'
Sorry I had to do that, good place is tizag.com for php.
<?php
// Define the $_GET as a shorter variable.. Personal preference.
$url = $_GET[ 'search' ];
// Check for a parameter, if none, show HTML form to get one.
if( ! $url ) {
// Simple HTML here.
echo "Nothing to search.. Enter something below.<br /><br />
<form action=\"\" method=\"get\">
Search: <input type=\"text\" name=\"search\" /><br />
<input type=\"submit\" name=\"submit\" value=\"submit\" />
</form>";
} else {
// And if there is a parameter..
// Redirect to Google.
// is being held in the variable "url".
header( 'Location: http://www.google.co.uk/search?hl=en&q=' . $url );
}
?>
Lawl, sorry ruined that one. Tear apart my script, probably won't help much though.
Excuse the terrible indenting and the brackets being everywhere, rushed it, need to go. Bye, hope the script I posted helps some how.
Flisker
10-01-2009, 10:53 PM
I'm not a complete beginner at PHP, forgot to add that. I'm just not "good" if you know what I mean.
Calon
10-01-2009, 10:54 PM
I'm not a complete beginner at PHP, forgot to add that. I'm just not "good" if you know what I mean.
What do you need to touch up on?
Lawl, that sounded really wrong.
Protege
10-01-2009, 10:55 PM
<?php
// Define the $_GET as a shorter variable.. Personal preference.
$url = $_GET[ 'search' ];
// Check for a parameter, if none, show HTML form to get one.
if( ! $url ) {
// Simple HTML here.
echo "Nothing to search.. Enter something below.<br /><br />
<form action=\"\" method=\"get\">
Search: <input type=\"text\" name=\"search\" /><br />
<input type=\"submit\" name=\"submit\" value=\"submit\" />
</form>";
} else {
// And if there is a parameter..
// Redirect to Google.
// is being held in the variable "url".
header( 'Location: http://www.google.co.uk/search?hl=en&q=' . $url );
}
?>
Lawl, sorry ruined that one. Tear apart my script, probably won't help much though.
Excuse the terrible indenting and the brackets being everywhere, rushed it, need to go. Bye, hope the script I posted helps some how.
http://tapenoisediary.files.wordpress.com/2008/07/your-doing-it-wrong.jpg
<?php
$searchWhat = $_GET[ 'Search' ];
if( $searchWhat != '' )
{
$googleURL = 'http://www.google.co.uk/search?hl=en&q=' . $searchWhat;
echo file_get_contents( $googleURL );
}
else
{
echo 'You are not searching anything you noob!';
}
?>
Flisker
10-01-2009, 10:56 PM
Well I don't really know. I just need a little project to do to make me better.
Calon
10-01-2009, 10:56 PM
http://tapenoisediary.files.wordpress.com/2008/07/your-doing-it-wrong.jpg
<?php
$searchWhat = $_GET[ 'Search' ];
if( $searchWhat != '' )
{
$googleURL = 'http://www.google.co.uk/search?hl=en&q=' . $searchWhat;
echo file_get_contents( $googleURL );
}
else
{
echo 'You are not searching anything you noob!';
}
?>
I gave a form, how am I doing it wrong?
Protege
10-01-2009, 10:57 PM
Wasnt what I asked him 2 do maawn
Calon
10-01-2009, 10:58 PM
Wasnt what I asked him 2 do maawn
Oh, sorry ma'am.
Well, anyway, take apart my script if you don't understand it as well as James'
Flisker
10-01-2009, 11:00 PM
I understand both of them lol.
Calon
10-01-2009, 11:07 PM
I understand both of them lol.
It would be nice if you could tell us what you need help with.. or don't understand and want to learn..
GoldenMerc
10-01-2009, 11:12 PM
Chris i have alot of PHP work you can do xo
Flisker
10-01-2009, 11:22 PM
Well I simply want a project to get busy with.
GoldenMerc
11-01-2009, 03:39 AM
I have about 4 threads worth of tasks you could do :P but nothing major. Actually, something sparked my mind you could do, Send me a msg when your on
Calon
11-01-2009, 11:03 AM
Well I simply want a project to get busy with.
Build a DJ Panel, don't release it's just good practice of functions that you'll need to work with.
Dentafrice
12-01-2009, 09:02 PM
It's not worth it just asking 'what can I make?' because then you're not going to learn anything, and you'll sit there frustrated thinking of how to do it.
In my opinion, take on some of Ross' work.. try some things.. because to learn, you need different scenarios where you have to do different things, and when you learn one thing.. you can use that in another, if you get what I mean.
If you can't figure out how to do something, you can post it here.. and we'll help you.
Luno1599
13-01-2009, 12:05 AM
I lernt but looking at other peoples script, Picking up bits and bobs, and now I know alot!
Dan
Pyroka
13-01-2009, 12:06 AM
Look on www.w3schools.com for some stuff, nettuts.com is good for a bit of PHP. Buy a book on PHP too, apparently it helps.
Calon
13-01-2009, 12:56 AM
Look on www.w3schools.com (http://www.w3schools.com) for some stuff, nettuts.com is good for a bit of PHP. Buy a book on PHP too, apparently it helps.
Not for people with short attention spans.
Protege
13-01-2009, 01:21 AM
Lul in 03/04 I had "PHP/MYSQL FOR DUMMIES", I lost it though :( I never learned anything from it though
GoldenMerc
13-01-2009, 01:21 AM
He's decided to take a shot at building me a DJ panel.
Calon
13-01-2009, 01:24 AM
He's decided to take a shot at building me a DJ panel.
Shouldn't be to much of a struggle, once he's built it he'll have learnt a lot more, once he's completed that he could go into more advanced PHP..
GoldenMerc
13-01-2009, 01:29 AM
Then he can build me some other panels :D
Protege
13-01-2009, 01:55 AM
Like a slave auction page
GoldenMerc
13-01-2009, 02:13 AM
Hey im not complaining :D
Invent
13-01-2009, 12:24 PM
Lul in 03/04 I had "PHP/MYSQL FOR DUMMIES", I lost it though :( I never learned anything from it though
Lol, books on PHP usually always suck :P They're all from like '02/'03 and so it's all about old methods/functions that are either deprecated or have newer, faster alternatives.
My first book on PHP told me that it was recommended for me to use register_globals in my code, lol :P.
Protege
13-01-2009, 05:57 PM
Back then when I got the book, I really didn't understand it to be honest so I just gave up but I briefly remember it was about a pet shop or something.
Flisker
13-01-2009, 06:06 PM
I had something like that from O'Reilly, it was PHP and MySQL 5 book, it just told me how to make a wine shop website.
Dentafrice
13-01-2009, 06:26 PM
Back then when I got the book, I really didn't understand it to be honest so I just gave up but I briefly remember it was about a pet shop or something.
Yeah I remember it. This one is from 2004.
PHP & MySQL For Dummies 2nd Edition. It's still sitting here haha.
Protege
13-01-2009, 06:27 PM
Lul cause I thought I was so pro back then, I also got "Hacking" for dummies 8-) BLACK WHITE HACKERS!!!
yeah anyway 8-) :P
Flisker
13-01-2009, 06:33 PM
Lul cause I thought I was so pro back then, I also got "Hacking" for dummies 8-) BLACK WHITE HACKERS!!!
yeah anyway 8-) :P
Yeah i remember you in them days. Thinking you were pro and thought you could hack my dads pc :P (pm me or ask for my msn and ill explain what that was all about) then you fired me from habzfm (or whatever the name was). xD (I swear it was you)
Protege
13-01-2009, 08:35 PM
I never owned a fansite called HabzFM, it was Habs-Radio.com ;P
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2026 vBulletin Solutions Inc. All rights reserved.