All pastes #2118193 Raw Edit

Someone

public text v1 · immutable
#2118193 ·published 2012-02-12 02:46 UTC
rendered paste body
<?php
//connect to server
require('../pinecountydatabase.php');
?>
<html>
<head>
 <title>Make A Wish</title>
</head>
<body>
<?

if ( !isset($_POST['wish']) ) {
	print '
	<h1>Make A Wish</h1>
	<img src="images/wish_well.jpg" />
	<form action="wellindex2.php" method="POST">
	<p><strong>Your Name: </strong><input type="text" name="name" /></p>
	<p><strong>Your Wish: </strong><input type="text" name="wish" /></p>
	<p><input type="submit" value="Make A Wish!" /></p>
	<form method="post" action="verify.php">';
 
    require_once('recaptchalib.php');
    $publickey = "6LcyTc0SAAAAAMb--58SH1FZ5laKx7hxMGWwe04"; 
    echo recaptcha_get_html($publickey);
	print '</form>';
} else {
	if ( empty($_POST['name']) ) {
		$name = 'Anonymous';
	} else {
		$name = $_POST['name'];
	}

	print '<p>Thanks for your wish!</p>';
	print '<p>Your name is:<br />' . $name . '</p>';
	print '<p>You wished:<br />' . $_POST['wish'] . '</p>';

	mysql_query('insert into welltable2 (name, wish) values ("' . mysql_real_escape_string($name) . '", "' . mysql_real_escape_string($_POST['wish']) . '")') or die(mysql_error());
}

?>
<p>If you want to see what other people have wished for, <a href="wellview2.php">go here</a>.</p>

</body>
</html>