Hi I am new to php programing and I was trying to make up a simple script like a captcha but I cannot get the validation part of it working. I think it should work but it is not. Anyone know what is wrong. Any help is greatly appreciated. Here is the code:
Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Captcha</title>
</head>
<body>
<?php
$alpha = 'abcdefghijklmnopqrstuvwxyz' ;
$shuffle = str_shuffle($alpha) ;
$partial = substr($shuffle , 0 , 4) ;
echo "$partial <br /><br />" ;
if (isset($_POST['submitted'])) {
//Valdate the info
if ($_POST['input'] != $partial) {
echo "Your answer does not match the capthcha. Please try again.<br /><br />" ;
} else {
echo "You answered correctly!<br /><br />" ;
}
}
?>
<form action="capthcha2.php" method="post">
<p>Enter Captcha: <input name="input" type="text" size="20" /></p>
<input name="submit" type="submit" value="Submit" />
<input name="submitted" type="hidden" value="true" />
</form>
</body>
</html>
Image resize
Hi again fellersI managed to sort out the issues with the folder, Final hurdle is this: Code: function ResizeJPEG($filename, $width, $height){ list($width_orig, $height_orig) =
i have no idea why this isn't working
Code: <?phpsession_start();include("connect.php");error_reporting(E_ALL);ini_set('display_errors', '1'); $username = "Master";$password = "pword";$host =
Need help/w Page: 1,2,3,4 function!
So I have this code im working on where it's ment to display seperate pages having 20 logs eachI'm having SOOOOOOOOO much trouble with it... it's supposed to work! >,<I get the right
How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.I am working on a application which uses HTTP connection, but the problem here is that the response from server is late... I want to create
When file included, REMOTE_ADDR is server's?
I have an index file that handles my site, basically index.php?page=ip will activate "require('./ip.php')".In the included file I have $ip = $_SERVER['REMOTE_ADDR']; and when it FIRST
Deleting a record php
Attempting to setup delete a record page. The below code I put together doesn't seem to work. | <?$delid=$_GET['delid'];echo $delid;if(isset($_POST['submit'])){$delquery="DELETE FROM table
url- go to webpage
i have an input text field and submit button.how do i make the url entered into the textfield go to that webpage?
random generation
hii need help with generating thisnumbers from 1-12i want to generate in random order 60 times in total the numbers 1-12and generate 5 results from each number.so in the total of the 60 return result
COde for a Cc
I'm not receiving $ft as a Cc. Why is that??$to = "$email";$headers = "From:" .$tf."\r\n";$headers .= "Cc: $tf\r\n";$subject = "SUBJECT"; $message =
Form validation with functions
Hi thereI am trying to make a very simple form validation function. I currently have the followingfunction formValidate($field, $msg) { if (empty($_POST['$field'])) { $errors[] = $msg; } else