Cobble together a little bit of php occasionally but don't really understand the basics, like sessions.
There's a freeware captha script that you can add to an HTML form:
<img src="CaptchaSecurityImages.php?width=100&height=40 &characters=5" /><br />
<input id="security_code" name="security_code" type="text" /><br />
<input type="submit" name="submit" value="Submit" />
The CaptchaSecurityImages.php PHP is:
<?php
session_start();
blah blah
$_SESSION['security_code'] = $code;
blah blah
session_write_close();
?>
That works fine from a normal HTML form, but I want to use it in a form that is itself generated by php:
<?php include 'header.php'; ?>
<?php
etc
Removed the session start and close above and put session_start at beginning of php but can't access $_SESSION['security_code'] in the rest of the code.
Any ideas, cheers.
There's a freeware captha script that you can add to an HTML form:
<img src="CaptchaSecurityImages.php?width=100&height=40 &characters=5" /><br />
<input id="security_code" name="security_code" type="text" /><br />
<input type="submit" name="submit" value="Submit" />
The CaptchaSecurityImages.php PHP is:
<?php
session_start();
blah blah
$_SESSION['security_code'] = $code;
blah blah
session_write_close();
?>
That works fine from a normal HTML form, but I want to use it in a form that is itself generated by php:
<?php include 'header.php'; ?>
<?php
etc
Removed the session start and close above and put session_start at beginning of php but can't access $_SESSION['security_code'] in the rest of the code.
Any ideas, cheers.
Comment