This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
mysql_connect("localhost", "root", ""); | |
mysql_select_db("testing"); | |
?> | |
<form action="" method="post"> | |
<select name="country"> | |
<?php | |
$country_query = "SELECT country_id, country_name FROM countries"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PDO MySQL initial code | |
* | |
* User permissions of database | |
* Create, Alter and Index table, Create view, and Select, Insert, Update, Delete table data | |
* | |
* @package PhpFiddle | |
* @copyright Copyright (c) 2012 - 2013, PhpFiddle.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once "dBug!.php"; | |
$dsn = "mysql:host=localhost;dbname=xfiddlec_max;port=3306"; | |
$user_name = "xfiddlec_user"; | |
$pass_word = "public"; | |
$connect = new PDO($dsn, $user_name, $pass_word); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<table border="1" width="90px" height="50px"> | |
<tr><td> | |
<form action=f.php method=POST> | |
Rollno<input type=text name=Roll><br> | |
Name<input type=text name=Na><br> | |
<select name=couse> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ColorPalette{ | |
public $color; | |
public function __construct($color){ | |
$this->color = $color; | |
} | |
public function color_mod($hex, $diff) { | |
$rgb = str_split(trim($hex, '# '), 2); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function calculate($array_1, $array_2){ | |
$x = 0; $total = 0; | |
foreach($array_1 as $element){ | |
$total += ($element - $array_2[$x]); | |
$x++; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title><strong>Encomenda recebida com sucesso!</strong></title> | |
</head> | |
<body> | |
Encomendou: | |
<li> | |
<ul> | |
1 pizza 4 Queijos | |
2 coca-cola |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
?> | |
<html> | |
<head> | |
<title><strong>Encomenda recebida com sucesso!</strong></title> | |
</head> | |
<body> | |
Encomendou: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a=$_request[$a] | |
?> | |
<form> | |
<table width="278" height="201" border="1" align="center" cellpadding="0" cellspacing="0"> | |
<tr> | |
<td colspan="2" align="center" style="color:#FF0000; font-size:24px;"><?php echo $c; ?></td> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Made the headers bold on this one. Maybe can use css to do that next time? | |
$cars=array("Dodge"=>array("Avenger","Challenger","Charger","Dart"),"Toyota"=>array("Highlander","Tundra","Corolla"),"Nissan"=>array("Sentra","Altima","Maxima")); | |
foreach($cars as $x=>$x_value) | |
{ | |
echo "<b>Make: $x<br></b>"; | |
foreach($x_value as $y){ |