Showing posts with label md5. Show all posts
Showing posts with label md5. Show all posts

Monday, 20 August 2012

Useful PHP quick test page

I developed this page a little while ago to do quick tests. Essentially, you just put items in the text box and press submit. The benefit of the page is that all the reloading is done for you. There is no need to keep using back or forward buttons. Just carry on making adjustments to your code and keep trying. The page will use the changes you make.

In the example below, I am outputing an md5 version of my input, but you can create your own functions and just replace the bit where md5 is called (highlighted in red).

$myname = $_GET ? html_entity_decode($_GET['myname']) : NULL;
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<!--[if IE]>
<script src=""></script>
<link rel="stylesheet" href="" />
<script src=""></script>
google.load("jquery", "1");
<label for="myname">Type your string</label>
<input type="text" name="myname" id="myname" value="<?php  echo $myname; ?>" />
<button type="submit">Submit</button>
<p><?php echo $myname ? md5($myname) : NULL; ?></p>
    locStr = '<?php echo basename(__FILE__); ?>?str='+$('#myname').val();