Skip to content

Instantly share code, notes, and snippets.

@Xhendor
Created May 27, 2015 00:47
Show Gist options
  • Save Xhendor/6e19bc2fa6298ebc171e to your computer and use it in GitHub Desktop.
Save Xhendor/6e19bc2fa6298ebc171e to your computer and use it in GitHub Desktop.
Ejemplo#1 PHP
<?php
/**
* Created by PhpStorm.
* User: xhendor
* Date: 5/26/15
* Time: 17:22
*/
?>
<html>
<?php
echo "<body> <title>Mi primera Vez</title>";
for ($x = 1; $x <= 100; $x++) {
echo "<h1> Esta es una prueba de PHPStorm</h1>";
}
if ($_GET['variableA'] == 1) {
echo "<script>alert('MENSAJE A'); </script>";
} else if ($_GET['variableA'] == 2) {
echo "<script>alert('Mensaje A2'); </script>";
}else if(strcmp($_GET['variableB'],'texto')==0){
echo "<script>alert('Mensaje 2'); </script>";
}else if(strcmp($_GET['variableB'],'texto2')==0){
echo "<script>alert('Mensaje 3); </script>";
}
$a=$_GET['variableC'];
switch($a){
case 1:
echo "<script>alert('Mensaje del case'); </script>";
break;
}
echo "</body>";
?>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment