Hey
I'm trying to learn php and I need some ideas on what to make so I can practice to get better.
Thanks

Hey
I'm trying to learn php and I need some ideas on what to make so I can practice to get better.
Thanks
Never argue with an idiot, he'll drag you down to his level, and beat you with experience.
And 15 mins later...Originally Posted by Recursion
*oh trust me
*I would NEVER go ATi
Sapphire ATI Radeon HD 5850 1024MB GDDR5 PCI-Express Graphics Card £195.73 1 £195.73
*ordered.
Learn the basics first, then make things like a basic status system?
or maybe just a page of text using php.
Tizag is your best friend.
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.
Hi, names James. I am a web developer.
Lawl, sorry ruined that one. Tear apart my script, probably won't help much though.PHP Code:<?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 );
}
?>
Excuse the terrible indenting and the brackets being everywhere, rushed it, need to go. Bye, hope the script I posted helps some how.
Last edited by Calon; 10-01-2009 at 10:51 PM.
I'm not a complete beginner at PHP, forgot to add that. I'm just not "good" if you know what I mean.
Never argue with an idiot, he'll drag you down to his level, and beat you with experience.
And 15 mins later...Originally Posted by Recursion
*oh trust me
*I would NEVER go ATi
Sapphire ATI Radeon HD 5850 1024MB GDDR5 PCI-Express Graphics Card £195.73 1 £195.73
*ordered.
Lawl, sorry ruined that one. Tear apart my script, probably won't help much though.PHP Code:<?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 );
}
?>
Excuse the terrible indenting and the brackets being everywhere, rushed it, need to go. Bye, hope the script I posted helps some how.
PHP Code:<?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!';
}
?>
Hi, names James. I am a web developer.
Well I don't really know. I just need a little project to do to make me better.
Never argue with an idiot, he'll drag you down to his level, and beat you with experience.
And 15 mins later...Originally Posted by Recursion
*oh trust me
*I would NEVER go ATi
Sapphire ATI Radeon HD 5850 1024MB GDDR5 PCI-Express Graphics Card £195.73 1 £195.73
*ordered.
Want to hide these adverts? Register an account for free!