PHP and MySQL are hard at first, though there are loads of websites that show you how to do simple stuff.
I would reccomend
http://www.w3schools.com/php/default.aspThis site is a great reffrence and does explain stuff quite well. I've made you a little crash course below :)
Making text appear on the screen,echo 'Your Text Here';I lie this think of this as an echo in a cave, you saw it and it will come back!
Using $'s (I forget the name). $ are a good way to store infomation for example
$mytext = "My Text Here";Now you have made the $ you can use an echo to make it come on the screen.
echo $mytext;I'm not going to confuse you to much, but if there is only a $ thingy in a echo you don't put any quotes (' or ") around it. There is a small diffrence between the ' and the ".
Using PHP to do math.Here's somthing cool you might like, getting php to do math for you (Like a calcuator), first make the $'s.
$number1 = "45";
$number2 = "23";then to get the server (Or the php) to do the math i like to do
$addednumber = $number1 + $number1Your can change the + (That adds) to any of the below
/ Divides
* Multiplys
+ Adds
- Subtracts
The if functionI use this for checking forms and so on, it's quite simple (Well to me it is),
if($number1 == "25"){
echo 'I don\'t like the number 25';
}elseif($number1 == "30"){
echo 'I don't like the number 30';
}else{
echo 'The first number is ok!';
}I like to put == for most of my if's, no idea why..it just works. I put the \ before the ' because in php \means do not process, though i could have put the echo in "". Below is a quick list of all the things an == can be
== Same As
>= Bigger Than
<= Smaller Than
You can change the "" to what ever you want! I've made a quick list below with the diffrent quotes you can use assumeing it's on ==,
$number2 No quotes needed, if it's the name as $number2.
NULL If nothing has been put.
TRUE If there is something in the variable.
the $_REQUEST functionThis can be used on forms to get infomation, it works like,
$_REQUEST['form name'];I like to put them info $'s you can do this by,
[/i]$formname = $_REQUEST['form name'];[/i]
Important stuffIn your php code you need to have
<?php starting it and
?> finsihing it.
To make comments you put
// Then your comment.