Skip to content

Commit

Permalink
added php
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownforce committed Jan 16, 2012
0 parents commit d437993
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
18 changes: 18 additions & 0 deletions forms.php
@@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Forms</title>
</head>
<body>
<form>
<label for="planet">Fav. Planet</label>
<input id="planet">
<button type="submit">Submit</button>
</form>
</body>
</html>
24 changes: 24 additions & 0 deletions index.php
@@ -0,0 +1,24 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Query Strings</title>
</head>

<body>
<?php if (isset($_GET['name'])) : ?>
<?php
echo $_GET['name'];
echo ' ';
echo $_GET['lastname'];
?>
<?php endif; ?>
<br />
<a href="name.php?name=Petrus">Petrus</a>
<a href="name.php?name=Loser">Loser</a>
<a href="name.php?name=Thomas">Thomas</a>
<a href="name.php?name=Guyy">Guyy</a>


</body>
</html>
18 changes: 18 additions & 0 deletions name.php
@@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Say Hello</title>
</head>

<body>

<!--
'isset()' allows us to check if an index in an array exists, before trying to use it
-->
<?php if (isset($_GET['name'])) : ?>
<h1>Hello, <?php echo $_GET['name']; ?></h1>
<?php endif; ?>

</body>
</html>

0 comments on commit d437993

Please sign in to comment.