Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //you can define variables
- $variable = "This is a VARIABLE";
- //You can also echo that variable
- echo $variable;
- //or make it more complicated
- $echo $variable . " " . ". What's Up?";
- lets do a php form
- if (!isset($_POST['submit']) { ?>
- Lets pretend this is a form, but I'm not going to write it.
- <?php }
- if (isset($_POST['submit']) {
- $user = $_POST['user'];
- $pass = $_POST['[pass];
- if ($pass=="kingpin") {
- echo "True";
- } else {
- echo "False;
- }
- }
- // this probably wont help you lol. but this is some examples.
- /*
- this is for block comments while the previous was line comments
- */
- //heres a for loop
- for ($i=1; $i<=5; $i++)
- {
- echo "The number is " . $i . "<br />";
- }
- //basically outputs 1 -5; says if i = 1 but is < then 5 add a number each loop. Good luck!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement