Показать сообщение отдельно
Старый 10.10.2012, 18:29
pomuс вне форума Посмотреть профиль Отправить личное сообщение для pomuс Найти все сообщения от pomuс
  № 10  
Ответить с цитированием
pomuс

Регистрация: Sep 2012
Сообщений: 204
не очень понял если честно... то есть подгрузил пхп, а из него еще взть вытянуть картинку? там в ПХП нету таких переменных отдельно на картнку
PHP код:
<?php 
session_start
();

if( isset(
$_POST['submit'])) {
   if( 
$_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {
        
// Insert you code for processing the form here, e.g emailing the submission, entering it into a database. 
        
echo 'Thank you. Your message said "'.$_POST['message'].'"';
        unset(
$_SESSION['security_code']);
   } else {
        
// Insert your code for showing an error message here
        
echo 'Sorry, you have provided an invalid security code';
   }
} else {
?>

    <form action="form.php" method="post">
        <label for="name">Name: </label><input type="text" name="name" id="name" /><br />
        <label for="email">Email: </label><input type="text" name="email" id="email" /><br />
        <label for="message">Message: </label><textarea rows="5" cols="30" name="message" id="message"></textarea><br />
        <img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" /><br />
        <label for="security_code">Security Code: </label><input id="security_code" name="security_code" type="text" /><br />
        <input type="submit" name="submit" value="Submit" />
    </form>

<?php
    
}
?>
я в ПХП делетант, понадобилось только для капчи ервый раз за все время...