• 12-12-2023, 13:05:21
    #1
    Bu sayfaya Google Recaptcha nasıl ekleyebilirim? Chat-GPT ile yapmaya çalışıyorum ama sayfayı bozuyor ve Google Recaptcha çalışmıyor.
    Edit: Bard da yapamadı.

    <?php
        m_header();
    ?>  
    <main class="main pages">
    <div class="page-header breadcrumb-wrap">
        <div class="container">
            <div class="breadcrumb">
                <a href="<?php echo m_permalink('home'); ?>" title="<?php echo LG_HOME; ?>"><i class="fi-rs-home mr-5"></i><?php echo LG_HOME; ?></a>
                <span></span> <?php echo LG_CONTACT; ?>
            </div>
        </div>
    </div>
    <div class="page-content pt-50 pb-50">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-sm-12">
                <div class="bg-white rounded shadow-sm overflow-hidden mt-2">
                <div class="p-3 bg-light">
                <h1 class="m-0 text-dark d-flex align-items-center font-md"><?php echo LG_CONTACT; ?></h1>
                </div>
                <div class="p-3">
                <form action="" method="post">
                <p><?php echo LG_CONTACT_INFO; ?></p>
                <?php
                $ok = 0;
                if($_POST)
                {
                    if(m_u_p('subject')=='' or m_u_p('name')=='' or m_u_p('phone')=='' or m_u_p('email')=='' or m_u_p('msg')=='')
                    {
                        echo m_alert(LG_ERROR,LG_PLEASE_FILL_ALL_FIELD);
                    }
                    else
                    {
                        $data = [
                        'name' => m_u_p('name'),
                        'subject' => m_u_p('subject'),
                        'email' => m_u_p('email'),
                        'phone' => m_u_p('phone'),
                        'msg' => m_u_p_msg('msg'),
                        'ip' => m_ip(),
                        'date' => $db->now(),
                        'status' => 0
                        
                        ];
                        $ok = 1;
                        $query = $db->table('contact')->insert($data);
                        
                        echo m_alert(LG_SUCCESS,LG_CONTACT_SUCCESS_MESSAGE);
                    }
                }
                if($ok==0)
                {
                ?>
                <div class="row">
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label class="form-label"><?php echo LG_NAME; ?></label>
                            <input type="text" class="form-control" name="name" required value="<?php echo m_u_p('name'); ?>">
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label class="form-label"><?php echo LG_YOUR_PHONE; ?></label>
                            <input type="text" class="form-control" name="phone" required value="<?php echo m_u_p('phone'); ?>">
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label class="form-label"><?php echo LG_YOUR_EMAIL; ?></label>
                            <input type="email" class="form-control" name="email" required value="<?php echo m_u_p('email'); ?>">
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label class="form-label"><?php echo LG_SUBJECT; ?></label>
                            <input type="text" class="form-control" name="subject" required value="<?php echo m_u_p('subject'); ?>">
                        </div>
                    </div>
                    <div class="col-sm-12 col-md-12">
                        <div class="form-group">
                            <label class="form-label"><?php echo LG_YOUR_MESSAGE; ?></label>
                            <textarea class="form-control" name="msg" required style="height:250px"></textarea>
                        </div>
                    </div>
                </div>
    
                <button type="submit" class="btn btn-primary"><?php echo LG_SUBMIT; ?></button>
    
                <?php
                }
                ?>
                </form>
                </div>
                </div>
                        
                </div>
                
                <div class="col-lg-4 col-sm-12">
                
                        <div class="bg-white rounded shadow-sm overflow-hidden mt-2">
                        <div class="p-3 bg-light">
                        <h4 class="m-0 text-dark d-flex align-items-center font-md"><?php echo LG_PHONE; ?></h4>
                        </div>
                        <div class="p-3">
                            <i class="fa fa-phone"></i> <?php echo m_setting('company_phone'); ?>
                        </div>
                        </div>
                        <div class="bg-white rounded shadow-sm overflow-hidden mt-2">
                        <div class="p-3 bg-light">
                        <h4 class="m-0 text-dark d-flex align-items-center font-md"><?php echo LG_WHATSAPP; ?></h4>
                        </div>
                        <div class="p-3">
                            <i class="fab fa-whatsapp"></i> <?php echo m_setting('company_whatsapp'); ?>
                        </div>
                        </div>
                        <div class="bg-white rounded shadow-sm overflow-hidden mt-2">
                        <div class="p-3 bg-light">
                        <h4 class="m-0 text-dark d-flex align-items-center font-md"><?php echo LG_ADDRESS; ?></h4>
                        </div>
                        <div class="p-3">
                            <i class="fa fa-map-marker-alt"></i> <?php echo m_setting('company_address'); ?>
                        </div>
                        </div>
                </div>
        </div>
    </div>
    </main>
    
    <?php
        m_footer();
    ?>
  • 12-12-2023, 13:59:25
    #3
    Google captcha kullanıp boşyere sayfanızı kastırmayın. Düşürseniz yükü çok hafif kullanışlı zor bir captcha ekleyebilirim.
  • 12-12-2023, 14:17:14
    #4
    Hocam teşekkür ederim, bakacağım.
    Protex adlı üyeden alıntı: mesajı görüntüle
    Google captcha kullanıp boşyere sayfanızı kastırmayın. Düşürseniz yükü çok hafif kullanışlı zor bir captcha ekleyebilirim.
    Teşekkür ederim, halledemezsem fiyat isterim.